GCC Code Coverage Report


Directory: ./
File: unit_tests/tests/lua/test_lua_vin.cpp
Date: 2025-10-03 00:57:22
Coverage Exec Excl Total
Lines: 100.0% 8 0 8
Functions: 100.0% 3 0 3
Branches: 50.0% 4 0 8
Decisions: -% 0 - 0

Line Branch Decision Exec Source
1 /*
2 * test_lua_vin.cpp
3 *
4 */
5
6 #include "pch.h"
7 #include "rusefi_lua.h"
8 #include "lua_lib.h"
9
10
11 4 TEST(LuaVin, Test) {
12
1/1
✓ Branch 2 taken 1 time.
1 EngineTestHelper eth(engine_type_e::TEST_CRANK_ENGINE);
13
14 1 strcpy(engineConfiguration->vinNumber, "GM123");
15
16 1 const char* realdata = R"(
17
18 function testFunc()
19 return vin(0)
20 end)";
21
22
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), 0x47);
23 2 }
24