This commit is contained in:
rusefillc 2021-11-22 19:16:57 -05:00
parent 191b76f4dd
commit d9e8509440
1 changed files with 10 additions and 2 deletions

View File

@ -4,8 +4,16 @@
TEST(LuaHooks, TestCrc8) {
// Test failed sensor, returns nil
char* crc8scripts = R"(
const char* realHDdata = R"(
function testFunc()
return crc8_j1850({0x13, 0x57, 0x13, 0x45, 0x00, 0xe8, 0x5c }, 7)
end
)";
EXPECT_EQ(testLuaReturnsNumberOrNil(realHDdata).value_or(0), 0x86);
const char* crc8scripts = R"(
function testFunc()
return crc8_j1850({0x31,0x32,0x32 }, 2)