Skip to content

Commit

Permalink
Test config parameter newline handling
Browse files Browse the repository at this point in the history
  • Loading branch information
lemniscate8 committed Jul 1, 2021
1 parent dc5cc04 commit 4d776e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/config/assets/config_setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ EMP_BUILD_CONFIG( MyConfig,
VALUE(TEST_STRING, std::string, "default", "This is a string!"),
CONST(TEST_CONST, int, 91, "This is an unchanging const!"),
VALUE(TEST_STRING_SPACE, std::string, "abc def ghi", "This is a string with spaces."),
VALUE(TEST_STRING_WHITESPACE, std::string, "What about...\n\t...whitespace in values?", "This is a string with newlines and tabs."),
//VALUE(MUTATION_RATE, float, 0.025, "This is my mutation rate.", MUT_RATE),
VALUE(MUTATION_RATE, float, 0.025, "This is my mutation rate."),
)
2 changes: 2 additions & 0 deletions tests/config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ TEST_CASE("Test config", "[config]"){

REQUIRE(config.RANDOM_SEED() == 123);

REQUIRE(config.TEST_STRING_WHITESPACE() == "What about...\n\t...whitespace in values?");

}

}

0 comments on commit 4d776e1

Please sign in to comment.