diff options
| author | Martin Ridgers <[email protected]> | 2021-10-15 16:04:56 +0200 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-10-15 16:04:56 +0200 |
| commit | 402dfddf62d979319038801a926809e33839e096 (patch) | |
| tree | e8a8e99c7f4718a5fcc363245cc19e16a41bea25 /zencore/string.cpp | |
| parent | If/def around Windows-only headers (diff) | |
| parent | httpasio: Implemented support for specifying accept type via url suffix (diff) | |
| download | zen-402dfddf62d979319038801a926809e33839e096.tar.xz zen-402dfddf62d979319038801a926809e33839e096.zip | |
Merged main
Diffstat (limited to 'zencore/string.cpp')
| -rw-r--r-- | zencore/string.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/zencore/string.cpp b/zencore/string.cpp index 7acdc16f0..76cd69871 100644 --- a/zencore/string.cpp +++ b/zencore/string.cpp @@ -938,6 +938,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; |