Line | Branch | Decision | Exec | Source |
---|---|---|---|---|
1 | #include "pch.h" | |||
2 | #include "rusefi_lua.h" | |||
3 | #include "lua_lib.h" | |||
4 | ||||
5 | 4 | TEST(LuaFordFocusII, PPS_low) { | ||
6 | 1 | const char* realdata = TWO_BYTES_MSB R"( | ||
7 | ||||
8 | function testFunc() | |||
9 | data = {0x0e, 0x8f, 0x7d, 0x90, 0x27, 0x10, 0x00, 0x7d} | |||
10 | return getTwoBytesMSB(data, 6, 1) | |||
11 | end)"; | |||
12 | ||||
13 |
3/7✓ Branch 3 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 11 not taken.
✓ Branch 12 taken 1 time.
✗ Branch 15 not taken.
✗ Branch 20 not taken.
✗ Branch 23 not taken.
|
1 | EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(realdata).value_or(0), 0x7d); | |
14 | 1 | } | ||
15 | ||||
16 | 4 | TEST(LuaFordFocusII, PPS_high) { | ||
17 | 1 | const char* realdata = TWO_BYTES_MSB R"( | ||
18 | ||||
19 | function testFunc() | |||
20 | data = {0x0e, 0x8f, 0x7d, 0x90, 0x27, 0x10, 0xC8, 0x80} | |||
21 | return getTwoBytesMSB(data, 6, 1) | |||
22 | end)"; | |||
23 | ||||
24 |
3/7✓ Branch 3 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 11 not taken.
✓ Branch 12 taken 1 time.
✗ Branch 15 not taken.
✗ Branch 20 not taken.
✗ Branch 23 not taken.
|
1 | EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(realdata).value_or(0), 0xC880); | |
25 | 1 | } | ||
26 |