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

Method testReserve

test/tests/containers/TestArray.h:354–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352 }
353
354 void testReserve() {
355
356 Array<int> array1(mAllocator);
357 array1.reserve(10);
358 rp3d_test(array1.size() == 0);
359 array1.add(1);
360 array1.add(2);
361 rp3d_test(array1.size() == 2);
362 rp3d_test(array1[0] == 1);
363 rp3d_test(array1[1] == 2);
364
365 array1.reserve(1);
366
367 array1.reserve(100);
368 rp3d_test(array1[0] == 1);
369 rp3d_test(array1[1] == 2);
370 }
371
372 void testIterators() {
373

Callers

nothing calls this directly

Calls 3

reserveMethod · 0.45
sizeMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected