aboutsummaryrefslogtreecommitdiff
path: root/zencore/string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zencore/string.cpp')
-rw-r--r--zencore/string.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/zencore/string.cpp b/zencore/string.cpp
index 49824a910..8e7921bb6 100644
--- a/zencore/string.cpp
+++ b/zencore/string.cpp
@@ -929,6 +929,13 @@ TEST_CASE("string")
{
using namespace std::literals;
+ SUBCASE("hash_djb2")
+ {
+ CHECK(HashStringAsLowerDjb2("AbcdZ"sv) == HashStringDjb2("abcdz"sv));
+ CHECK(HashStringAsLowerDjb2("aBCd"sv) == HashStringDjb2("abcd"sv));
+ CHECK(HashStringAsLowerDjb2("aBCd"sv) == HashStringDjb2(ToLower("aBCd"sv)));
+ }
+
SUBCASE("ForEachStrTok")
{
const auto Tokens = "here,is,my,different,tokens"sv;