summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx/tests/string_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bx/tests/string_test.cpp')
-rw-r--r--3rdparty/bx/tests/string_test.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/3rdparty/bx/tests/string_test.cpp b/3rdparty/bx/tests/string_test.cpp
index 40f58cf636e..48ee8d83b9a 100644
--- a/3rdparty/bx/tests/string_test.cpp
+++ b/3rdparty/bx/tests/string_test.cpp
@@ -535,3 +535,17 @@ TEST_CASE("strFindBlock", "")
bx::StringView result = bx::strFindBlock(test1, '{', '}');
REQUIRE(19 == result.getLength() );
}
+
+TEST_CASE("hasPrefix", "")
+{
+ REQUIRE( bx::hasPrefix("abvgd-1389.0", "abv") );
+ REQUIRE(!bx::hasPrefix("abvgd-1389.0", "bvg") );
+ REQUIRE( bx::hasPrefix("abvgd-1389.0", "") );
+}
+
+TEST_CASE("hasSuffix", "")
+{
+ REQUIRE( bx::hasSuffix("abvgd-1389.0", "389.0") );
+ REQUIRE(!bx::hasSuffix("abvgd-1389.0", "1389") );
+ REQUIRE( bx::hasSuffix("abvgd-1389.0", "") );
+}