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

Function unittest

libraries/DEVFULL/test/unit_test_001.cpp:41–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40
41unittest(test_all)
42{
43 DEVFULL df;
44
45 assertEqual(INT_MAX, df.available());
46 assertEqual(0x0000, df.peek());
47 assertEqual(0x0000, df.read());
48 assertEqual(-28, df.write('a'));
49 assertEqual(-28, df.write((const uint8_t*) "hello\n", 6));
50 assertEqual(-28, df.print("hello world"));
51 assertEqual(-56, df.println("hello world")); // -56 ==> two underlying write calls...
52}
53
54unittest_main()
55

Callers

nothing calls this directly

Calls 4

availableMethod · 0.45
peekMethod · 0.45
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected