summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorgustrb <gustavoreisbauer@gmail.com>2023-03-14 08:40:53 -0300
committerLinus Groh <mail@linusgroh.de>2023-03-14 21:34:32 +0000
commit5141c865879bc8de6ffd98d4ea6f3fbd59b6434b (patch)
treed345ceaaee8949c57b91705f07469d6b08e187a7 /Tests
parent8ba6cd6ab97017df8e402480ad3b8cac8a498525 (diff)
downloadserenity-5141c865879bc8de6ffd98d4ea6f3fbd59b6434b.zip
AK: Rename CaseInsensitiveStringViewTraits to reflect intent
Now it is called `CaseInsensitiveASCIIStringViewTraits`, so we can be more specific about what data structure does it operate onto. ;)
Diffstat (limited to 'Tests')
-rw-r--r--Tests/AK/TestHashMap.cpp2
-rw-r--r--Tests/AK/TestStringView.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/Tests/AK/TestHashMap.cpp b/Tests/AK/TestHashMap.cpp
index 3ca4dbe71b..b16534d625 100644
--- a/Tests/AK/TestHashMap.cpp
+++ b/Tests/AK/TestHashMap.cpp
@@ -111,7 +111,7 @@ TEST_CASE(case_insensitive)
TEST_CASE(case_insensitive_stringview)
{
- HashMap<StringView, int, CaseInsensitiveStringViewTraits> casemap;
+ HashMap<StringView, int, CaseInsensitiveASCIIStringViewTraits> casemap;
EXPECT_EQ(casemap.set("nickserv"sv, 3), AK::HashSetResult::InsertedNewEntry);
EXPECT_EQ(casemap.set("NickServ"sv, 3), AK::HashSetResult::ReplacedExistingEntry);
EXPECT_EQ(casemap.size(), 1u);
diff --git a/Tests/AK/TestStringView.cpp b/Tests/AK/TestStringView.cpp
index 39b19f3a3e..bc098bc137 100644
--- a/Tests/AK/TestStringView.cpp
+++ b/Tests/AK/TestStringView.cpp
@@ -196,7 +196,7 @@ TEST_CASE(case_insensitive_hash)
auto string3 = "aBcDeF"sv;
auto string4 = "foo"sv;
- EXPECT_EQ(CaseInsensitiveStringViewTraits::hash(string1), CaseInsensitiveStringViewTraits::hash(string2));
- EXPECT_EQ(CaseInsensitiveStringViewTraits::hash(string1), CaseInsensitiveStringViewTraits::hash(string3));
- EXPECT_NE(CaseInsensitiveStringViewTraits::hash(string1), CaseInsensitiveStringViewTraits::hash(string4));
+ EXPECT_EQ(CaseInsensitiveASCIIStringViewTraits::hash(string1), CaseInsensitiveASCIIStringViewTraits::hash(string2));
+ EXPECT_EQ(CaseInsensitiveASCIIStringViewTraits::hash(string1), CaseInsensitiveASCIIStringViewTraits::hash(string3));
+ EXPECT_NE(CaseInsensitiveASCIIStringViewTraits::hash(string1), CaseInsensitiveASCIIStringViewTraits::hash(string4));
}