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

Function unittest

libraries/Troolean/test/unit_test_001.cpp:51–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51unittest(test_constructor)
52{
53 Troolean f(false);
54 Troolean t(true);
55 Troolean u(-1);
56 Troolean v(u);
57
58 // should not use these
59 assertFalse(f);
60 assertTrue(t);
61
62 // use these
63 assertTrue(f.isFalse());
64 assertTrue(t.isTrue());
65 assertTrue(u.isUnknown());
66 assertTrue(v.isUnknown());
67
68}
69
70
71// TODO extend operators comparison etc

Callers

nothing calls this directly

Calls 3

isFalseMethod · 0.80
isTrueMethod · 0.80
isUnknownMethod · 0.80

Tested by

no test coverage detected