MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / test_bounds

Function test_bounds

tests/bytes.cc:21–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21static void test_bounds()
22{
23 Bytes b1 = {1, 2, 3, 4};
24 assert(b1.size() == 4);
25 assert(b1[0] == 1);
26 assert(b1[3] == 4);
27 check_oob(b1, 4);
28
29 Bytes b2 = b1.slice(1, 2);
30 assert(b2.size() == 2);
31 assert(b2[0] == 2);
32 assert(b2[1] == 3);
33 check_oob(b2, 2);
34}
35
36static void test_loop()
37{

Callers 1

mainFunction · 0.70

Calls 3

check_oobFunction · 0.85
sliceMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected