Displaying 1 result from an estimated 1 matches for "doubleentrysettest".
2009 Apr 28
2
[LLVMdev] infinite looping on hashtables
...-----------------------------------
===//
+
+#include "gtest/gtest.h"
+#include <llvm/ADT/DenseSet.h>
+
+using namespace llvm;
+
+namespace {
+
+// Test fixture
+class DenseSetTest : public testing::Test {
+};
+
+// Test hashing with a set of only two entries.
+TEST_F(DenseSetTest, DoubleEntrySetTest) {
+ llvm::DenseSet<unsigned> set(2);
+ set.insert(0);
+ set.insert(1);
+ // Original failure was an infinite loop in this call:
+ EXPECT_EQ(0, set.count(2));
+}
+
+}
------------------------------------------------------
This test works fine, so long as it passes. If the observed fail...