MCPcopy Create free account
hub / github.com/chen3feng/toft / TEST

Function TEST

container/skiplist_test.cpp:40–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38};
39
40TEST(SkipTest, Empty) {
41 Arena arena;
42 Comparator cmp;
43 SkipList<Key, Comparator> list(cmp, &arena);
44 ASSERT_TRUE(!list.Contains(10));
45
46 SkipList<Key, Comparator>::Iterator iter(&list);
47 ASSERT_TRUE(!iter.Valid());
48 iter.SeekToFirst();
49 ASSERT_TRUE(!iter.Valid());
50 iter.Seek(100);
51 ASSERT_TRUE(!iter.Valid());
52 iter.SeekToLast();
53 ASSERT_TRUE(!iter.Valid());
54}
55
56TEST(SkipTest, InsertAndLookup) {
57 const int N = 2000;

Callers

nothing calls this directly

Calls 15

RandomSeedFunction · 0.85
ContainsMethod · 0.80
SeekToFirstMethod · 0.80
SeekToLastMethod · 0.80
PrevMethod · 0.80
ReadStepMethod · 0.80
WriteStepMethod · 0.80
ValidMethod · 0.45
SeekMethod · 0.45
NextMethod · 0.45
InsertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected