Skip to content

Commit 45269cf

Browse files
committed
fix(test): avoid random collision in SimpleSetTest
1 parent 20e2eb0 commit 45269cf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

folly/container/test/heap_vector_types_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ TEST(HeapVectorTypes, SimpleSetTest) {
193193
EXPECT_FALSE(cs2.find(32) == cs2.end());
194194
EXPECT_TRUE(cs2.contains(32));
195195

196-
// Bad insert hint.
197-
s2.insert(s2.begin() + 3, 33);
198-
EXPECT_TRUE(s2.find(33) != s2.begin());
199-
EXPECT_TRUE(s2.find(33) != s2.end());
196+
// Bad insert hint. Use value outside random range (0-99999).
197+
s2.insert(s2.begin() + 3, 100002);
198+
EXPECT_TRUE(s2.find(100002) != s2.begin());
199+
EXPECT_TRUE(s2.find(100002) != s2.end());
200200
check_invariant(s2);
201-
s2.erase(33);
201+
s2.erase(100002);
202202
check_invariant(s2);
203203

204204
it = s2.find(32);

0 commit comments

Comments
 (0)