only: canam
This commit is contained in:
parent
894fb7153c
commit
cd19753a7d
|
@ -14,6 +14,30 @@ TEST(canam, ecu102_1) {
|
||||||
EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(realdata).value_or(0), 0x45);
|
EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(realdata).value_or(0), 0x45);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(canam, bytes) {
|
||||||
|
const char* realdata = TWO_BYTES_MSB R"(
|
||||||
|
|
||||||
|
function testFunc()
|
||||||
|
data = {0x00, 0x00, 0x00, 0x00, 0x01, 0xc7, 0x00, 0xc6}
|
||||||
|
return getTwoBytesMSB(data, 4, 1)
|
||||||
|
end
|
||||||
|
)";
|
||||||
|
|
||||||
|
EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(realdata).value_or(0), 455);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(canam, bytes2) {
|
||||||
|
const char* realdata = TWO_BYTES_MSB R"(
|
||||||
|
|
||||||
|
function testFunc()
|
||||||
|
data = {0x00, 0x00, 0x04, 0xa2, 0x02, 0x6c, 0x00, 0x00}
|
||||||
|
return getTwoBytesMSB(data, 2, 1)
|
||||||
|
end
|
||||||
|
)";
|
||||||
|
|
||||||
|
EXPECT_NEAR_M3(testLuaReturnsNumberOrNil(realdata).value_or(0), 1186);
|
||||||
|
}
|
||||||
|
|
||||||
TEST(canam, ecu102_4) {
|
TEST(canam, ecu102_4) {
|
||||||
const char* realdata = VAG_CHECKSUM R"(
|
const char* realdata = VAG_CHECKSUM R"(
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue