MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / unittest

Function unittest

libraries/BitArray/test/unit_test_001.cpp:40–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39
40unittest(test_constructor)
41{
42 BitArray ba;
43
44 assertEqual(BA_NO_MEMORY_ERR, ba.getError());
45
46 ba.begin(0, 1000);
47 assertEqual(BA_ELEMENT_SIZE_ERR, ba.getError());
48 ba.begin(33, 1000);
49 assertEqual(BA_ELEMENT_SIZE_ERR, ba.getError());
50 ba.begin(1, 1000);
51 assertEqual(BA_OK, ba.getError());
52
53 assertEqual(1, ba.bits());
54 assertEqual(1000, ba.capacity());
55 assertEqual(125, ba.memory());
56 fprintf(stderr, "\tSEGMENTS:\t %d\n", ba.segments());
57}
58
59
60unittest(test_set_get_toggle)

Callers

nothing calls this directly

Calls 11

bitsMethod · 0.80
capacityMethod · 0.80
segmentsMethod · 0.80
getErrorMethod · 0.45
beginMethod · 0.45
memoryMethod · 0.45
setMethod · 0.45
getMethod · 0.45
toggleMethod · 0.45
clearMethod · 0.45
setAllMethod · 0.45

Tested by

no test coverage detected