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

Method testIterators

test/tests/containers/TestSet.h:402–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400 }
401
402 void testIterators() {
403
404 Set<int> set1(mAllocator);
405
406 rp3d_test(set1.begin() == set1.end());
407
408 set1.add(1);
409 set1.add(2);
410 set1.add(3);
411 set1.add(4);
412
413 Set<int>::Iterator itBegin = set1.begin();
414 Set<int>::Iterator it = set1.begin();
415
416 rp3d_test(itBegin == it);
417
418 size_t size = 0;
419 for (auto it = set1.begin(); it != set1.end(); ++it) {
420 rp3d_test(set1.contains(*it));
421 size++;
422 }
423 rp3d_test(set1.size() == size);
424 }
425
426 void testConverters() {
427

Callers

nothing calls this directly

Calls 5

beginMethod · 0.45
endMethod · 0.45
addMethod · 0.45
containsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected