[llvm] [ADT] Add back ability to compare StringSet (PR #91374)

Aleksandr Platonov via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 22:46:08 PDT 2024


================
@@ -73,4 +73,12 @@ TEST_F(StringSetTest, Contains) {
   EXPECT_FALSE(Set.contains("test"));
 }
 
+TEST_F(StringSetTest, Equal) {
+  StringSet<> A = {"A"};
+  StringSet<> B = {"B"};
+  ASSERT_TRUE(A != B);
+  ASSERT_FALSE(A == B);
+  ASSERT_TRUE(A == A);
----------------
ArcsinX wrote:

I added this check because there is a similar one in StringMap tests https://github.com/llvm/llvm-project/blob/main/llvm/unittests/ADT/StringMapTest.cpp#L451

https://github.com/llvm/llvm-project/pull/91374


More information about the llvm-commits mailing list