MCPcopy Create free account
hub / github.com/apache/kvrocks / TEST_F

Function TEST_F

tests/cppunit/iterator_test.cc:116–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114};
115
116TEST_F(DBIteratorTest, AllKeys) {
117 engine::DBIterator iter(*ctx_, rocksdb::ReadOptions());
118 std::vector<std::string> live_keys = {"a", "b", "d", "hash-1", "set-1", "zset-1", "list-1",
119 "stream-1", "bitmap-1", "json-1", "json-2", "json-3", "sortedint-1"};
120 std::reverse(live_keys.begin(), live_keys.end());
121 for (iter.Seek(); iter.Valid(); iter.Next()) {
122 ASSERT_TRUE(!live_keys.empty());
123 auto [_, user_key] = iter.UserKey();
124 ASSERT_EQ(live_keys.back(), user_key.ToString());
125 live_keys.pop_back();
126 }
127 ASSERT_TRUE(live_keys.empty());
128}
129
130TEST_F(DBIteratorTest, BasicString) {
131 engine::DBIterator iter(*ctx_, rocksdb::ReadOptions());

Callers

nothing calls this directly

Calls 15

ReadOptionsClass · 0.85
ComposeNamespaceKeyFunction · 0.85
DecodeFixed64Function · 0.85
GetSlotIdFromKeyFunction · 0.85
ExtractNamespaceKeyFunction · 0.85
ZAddFlagsClass · 0.85
beginMethod · 0.80
endMethod · 0.80
SeekMethod · 0.80
UserKeyMethod · 0.80
IsSlotIdEncodedMethod · 0.80

Tested by

no test coverage detected