[PATCH] D53260: [ADT] Fix a bug in DenseSet's initializer_list constructor.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 14 12:17:21 PDT 2018
dblaikie added inline comments.
================
Comment at: unittests/ADT/DenseSetTest.cpp:83-87
+TYPED_TEST(DenseSetTest, InitializerListWithNonPowerOfTwoLength) {
+ // Make sure the initializer list works even when its length is not a power
+ // of two.
+ TypeParam set({1, 2, 3});
+}
----------------
"Don't crash" tests always look a bit suspect to me (like "test that this does anything other than crash" is not a particularly strong constraint). Maybe test that it contains the desired contents after such construction, and/or that the capacity or buckets or whatever is the expected power of two?
Repository:
rL LLVM
https://reviews.llvm.org/D53260
More information about the llvm-commits
mailing list