MCPcopy Create free account
hub / github.com/cactus-compute/cactus / test_batch

Function test_batch

tests/test_index.cpp:138–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138bool test_batch() {
139 IndexFixture f("test_batch");
140 if (!f.init()) return false;
141
142 if (f.add_batch(0, 100) != 0) return false;
143
144 if (f.get(0).second != "doc0") return false;
145 if (f.get(50).second != "doc50") return false;
146 if (f.get(99).second != "doc99") return false;
147
148 if (f.del({10, 20, 30, 40, 50}) != 0) return false;
149 if (f.get(50).first == 0) return false;
150 if (f.get(51).first != 0) return false;
151
152 return true;
153}
154
155bool test_query() {
156 IndexFixture f("test_query");

Callers 1

mainFunction · 0.85

Calls 4

add_batchMethod · 0.80
delMethod · 0.80
initMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected