| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 1 | #include "pch.h" | |||
| 2 | ||||
| 3 | #include "logicdata_csv_reader.h" | |||
| 4 | ||||
| 5 | 2 | static void doTest(const char* testFile, int expectedRpm) { | ||
| 6 |
1/1✓ Branch 2 taken 2 times.
|
2 | CsvReader reader(/* triggerCount */ 1, /* vvtCount */ 0); | |
| 7 | ||||
| 8 |
1/1✓ Branch 1 taken 2 times.
|
2 | reader.open(testFile); | |
| 9 |
1/1✓ Branch 2 taken 2 times.
|
2 | EngineTestHelper eth(engine_type_e::TEST_ENGINE); | |
| 10 | 2 | engineConfiguration->isFasterEngineSpinUpEnabled = true; | ||
| 11 | 2 | engineConfiguration->alwaysInstantRpm = true; | ||
| 12 | ||||
| 13 |
1/1✓ Branch 1 taken 2 times.
|
2 | eth.setTriggerType(trigger_type_e::TT_HONDA_K_CRANK_12_1); | |
| 14 | ||||
| 15 |
3/3✓ Branch 1 taken 501 times.
✓ Branch 3 taken 499 times.
✓ Branch 4 taken 2 times.
|
0/1? Decision couldn't be analyzed.
|
501 | while (reader.haveMore()) { |
| 16 |
1/1✓ Branch 1 taken 499 times.
|
499 | reader.processLine(ð); | |
| 17 | } | |||
| 18 | ||||
| 19 |
4/10✓ Branch 3 taken 2 times.
✓ Branch 8 taken 2 times.
✗ Branch 13 not taken.
✓ Branch 14 taken 2 times.
✗ Branch 17 not taken.
✗ Branch 20 not taken.
✗ Branch 25 not taken.
✗ Branch 28 not taken.
✓ Branch 35 taken 2 times.
✗ Branch 36 not taken.
|
2 | ASSERT_EQ(0u, eth.recentWarnings()->getCount())<< "warningCounter#vwRealCranking"; | |
| 20 |
4/10✓ Branch 3 taken 2 times.
✓ Branch 6 taken 2 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 2 times.
✗ Branch 14 not taken.
✗ Branch 19 not taken.
✗ Branch 24 not taken.
✗ Branch 27 not taken.
✓ Branch 35 taken 2 times.
✗ Branch 36 not taken.
|
2 | ASSERT_EQ(expectedRpm, round(Sensor::getOrZero(SensorType::Rpm)))<< reader.lineIndex(); | |
| 21 | 2 | } | ||
| 22 | ||||
| 23 | 4 | TEST(realk24, crankingNoPlugs1) { | ||
| 24 | 1 | doTest("tests/trigger/resources/cranking_honda_k24a2_no_plugs.csv", 188); | ||
| 25 | 1 | } | ||
| 26 | ||||
| 27 | 4 | TEST(realk24, crankingNoPlugs2) { | ||
| 28 | 1 | doTest("tests/trigger/resources/cranking_honda_k24a2_no_plugs_2.csv", 186); | ||
| 29 | 1 | } | ||
| 30 |