Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/IntrospectiveTests/String.tests.cpp
diff options
context:
space:
mode:
authorPhil nash2019-04-26 11:26:45 +0100
committerPhil nash2019-04-26 11:26:45 +0100
commit46066ede17c8d91f8f38828e0f66394455548bfd (patch)
treeafef6b9a726d324f2234cbb3f1cce1941abcd550 /projects/SelfTest/IntrospectiveTests/String.tests.cpp
parent182fc3e46e65191045567e6fcbfee8476e408889 (diff)
parent69817831780b9b833c792d8c8ccd60f9b279c343 (diff)
downloadcatch3-46066ede17c8d91f8f38828e0f66394455548bfd.tar.gz
Merge branch enum stringification work
Diffstat (limited to 'projects/SelfTest/IntrospectiveTests/String.tests.cpp')
-rw-r--r--projects/SelfTest/IntrospectiveTests/String.tests.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/projects/SelfTest/IntrospectiveTests/String.tests.cpp b/projects/SelfTest/IntrospectiveTests/String.tests.cpp
index ae21bb3c..cb2c350c 100644
--- a/projects/SelfTest/IntrospectiveTests/String.tests.cpp
+++ b/projects/SelfTest/IntrospectiveTests/String.tests.cpp
@@ -202,3 +202,15 @@ TEST_CASE( "replaceInPlace", "[Strings][StringManip]" ) {
CHECK( s == "didn|'t" );
}
}
+
+TEST_CASE( "splitString", "[Strings]" ) {
+ using namespace Catch::Matchers;
+ using Catch::splitStringRef;
+ using Catch::StringRef;
+
+ CHECK_THAT( splitStringRef("", ',' ), Equals(std::vector<StringRef>() ) );
+ CHECK_THAT( splitStringRef("abc", ',' ), Equals(std::vector<StringRef>{"abc"} ) );
+ CHECK_THAT( splitStringRef("abc,def", ',' ), Equals(std::vector<StringRef>{"abc", "def"} ) );
+}
+
+