MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / testContains

Method testContains

test/tests/containers/TestSet.h:286–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284 }
285
286 void testContains() {
287
288 Set<int> set1(mAllocator);
289
290 rp3d_test(!set1.contains(2));
291 rp3d_test(!set1.contains(4));
292 rp3d_test(!set1.contains(6));
293
294 set1.add(2);
295 set1.add(4);
296 set1.add(6);
297
298 rp3d_test(set1.contains(2));
299 rp3d_test(set1.contains(4));
300 rp3d_test(set1.contains(6));
301
302 set1.remove(4);
303 rp3d_test(!set1.contains(4));
304 rp3d_test(set1.contains(2));
305 rp3d_test(set1.contains(6));
306
307 set1.clear();
308 rp3d_test(!set1.contains(2));
309 rp3d_test(!set1.contains(6));
310 }
311
312 void testFind() {
313

Callers

nothing calls this directly

Calls 4

containsMethod · 0.45
addMethod · 0.45
removeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected