diff options
| author | Phil nash | 2019-04-04 15:55:46 +0100 |
|---|---|---|
| committer | Phil nash | 2019-04-04 15:55:46 +0100 |
| commit | 43428c609332fcf270cc3c3ada28b2c1427d8e2a (patch) | |
| tree | 311c62325d062c8bebd2b57ebd4c8c0ab36ebd8d /projects/SelfTest/IntrospectiveTests/String.tests.cpp | |
| parent | 08147a23f923103c87d1eac3dc30a9ecc4a753c4 (diff) | |
| download | catch3-43428c609332fcf270cc3c3ada28b2c1427d8e2a.tar.gz | |
First commit of STRINGIFY_ENUM
Diffstat (limited to 'projects/SelfTest/IntrospectiveTests/String.tests.cpp')
| -rw-r--r-- | projects/SelfTest/IntrospectiveTests/String.tests.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/projects/SelfTest/IntrospectiveTests/String.tests.cpp b/projects/SelfTest/IntrospectiveTests/String.tests.cpp index ae21bb3c..007774a9 100644 --- a/projects/SelfTest/IntrospectiveTests/String.tests.cpp +++ b/projects/SelfTest/IntrospectiveTests/String.tests.cpp @@ -202,3 +202,14 @@ TEST_CASE( "replaceInPlace", "[Strings][StringManip]" ) { CHECK( s == "didn|'t" ); } } + +TEST_CASE( "splitString", "[Strings]" ) { + using namespace Catch::Matchers; + using Catch::splitString; + + CHECK_THAT( splitString("", ',' ), Equals(std::vector<std::string>() ) ); + CHECK_THAT( splitString("abc", ',' ), Equals(std::vector<std::string>{"abc"} ) ); + CHECK_THAT( splitString("abc,def", ',' ), Equals(std::vector<std::string>{"abc", "def"} ) ); +} + + |