MCPcopy Create free account
hub / github.com/KDE/kdevelop / add

Method add

kdevplatform/util/tests/test_embeddedfreetree.cpp:234–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232{
233public:
234 void add(uint i)
235 {
236 if (realSet.find(i) != realSet.end()) {
237 QVERIFY(set.contains(i));
238 return;
239 } else {
240 QVERIFY(!set.contains(i));
241 }
242 clock_t start = clock();
243 realSet.insert(i);
244 std_insertion += clock() - start;
245
246 start = clock();
247 set.insert(i);
248 emb_insertion += clock() - start;
249
250 start = clock();
251 bool contained = realSet.find(i) != realSet.end();
252 std_contains += clock() - start;
253
254 start = clock();
255 set.contains(i);
256 emb_contains += clock() - start;
257
258 QVERIFY(set.contains(i));
259 QVERIFY(contained);
260 set.verify();
261 }
262
263 void remove(uint i)
264 {

Callers 2

randomizedTestMethod · 0.45
sequentialTestMethod · 0.45

Calls 5

findMethod · 0.45
endMethod · 0.45
containsMethod · 0.45
insertMethod · 0.45
verifyMethod · 0.45

Tested by

no test coverage detected