From d9e85094404eb494783f9bcd122377e99f3db03b Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 22 Nov 2021 19:16:57 -0500 Subject: [PATCH] harley --- unit_tests/tests/lua/test_lua_hooks.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/unit_tests/tests/lua/test_lua_hooks.cpp b/unit_tests/tests/lua/test_lua_hooks.cpp index 2824edeab5..ed93358456 100644 --- a/unit_tests/tests/lua/test_lua_hooks.cpp +++ b/unit_tests/tests/lua/test_lua_hooks.cpp @@ -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)