[llvm-branch-commits] [llvm] [ADT] Add more useful methods to SmallSet API (PR #108601)
Jakub Kuderski via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Sep 24 08:28:45 PDT 2024
================
@@ -17,6 +17,66 @@
using namespace llvm;
+TEST(SmallSetTest, ConstructorIteratorPair) {
+ auto L = {1, 2, 3, 4, 5};
+ SmallSet<int, 4> S(std::begin(L), std::end(L));
+ for (int Value : L)
+ EXPECT_TRUE(S.contains(Value));
----------------
kuhar wrote:
You can also do `EXPECT_THAT(S, UnorderedElementsAreArray(L));`. This prints nice error messages.
Also elsewhere below.
https://github.com/llvm/llvm-project/pull/108601
More information about the llvm-branch-commits
mailing list