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

Method testIndexing

test/tests/containers/TestArray.h:282–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280 }
281
282 void testIndexing() {
283
284 Array<int> array1(mAllocator);
285 array1.add(1);
286 array1.add(2);
287 array1.add(3);
288
289 rp3d_test(array1[0] == 1);
290 rp3d_test(array1[1] == 2);
291 rp3d_test(array1[2] == 3);
292
293 array1[0] = 6;
294 array1[1] = 7;
295 array1[2] = 8;
296
297 rp3d_test(array1[0] == 6);
298 rp3d_test(array1[1] == 7);
299 rp3d_test(array1[2] == 8);
300
301 const int a = array1[0];
302 const int b = array1[1];
303 rp3d_test(a == 6);
304 rp3d_test(b == 7);
305
306 array1[0]++;
307 array1[1]++;
308 rp3d_test(array1[0] == 7);
309 rp3d_test(array1[1] == 8);
310 }
311
312 void testFind() {
313

Callers

nothing calls this directly

Calls 1

addMethod · 0.45

Tested by

no test coverage detected