| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 1 | #include "pch.h" | |||
| 2 | ||||
| 3 | #include "trigger_simulator.h" | |||
| 4 | #include "trigger_emulator_algo.h" | |||
| 5 | ||||
| 6 | 4 | TEST(miata, miata_na_tdc) { | ||
| 7 |
1/1✓ Branch 2 taken 1 time.
|
1 | EngineTestHelper eth(engine_type_e::FRANKENSO_MIATA_NA6_MAP); | |
| 8 | 1 | engineConfiguration->alwaysInstantRpm = true; | ||
| 9 | ||||
| 10 | #define TEST_REVOLUTIONS 6 | |||
| 11 | ||||
| 12 | 1 | TriggerWaveform & shape = engine->triggerCentral.triggerShape; | ||
| 13 | ||||
| 14 |
1/1✓ Branch 2 taken 1 time.
|
1 | TriggerEmulatorHelper emulatorHelper; | |
| 15 | ||||
| 16 | /** | |||
| 17 | * let's feed two more cycles to validate shape definition | |||
| 18 | */ | |||
| 19 |
3/3✓ Branch 1 taken 74 times.
✓ Branch 3 taken 73 times.
✓ Branch 4 taken 1 time.
|
0/1? Decision couldn't be analyzed.
|
74 | for (uint32_t i = 0; i <= TEST_REVOLUTIONS * shape.getSize(); i++) { |
| 20 | ||||
| 21 |
1/1✓ Branch 1 taken 73 times.
|
73 | int time = getSimulatedEventTime(shape, i); | |
| 22 |
1/1✓ Branch 1 taken 73 times.
|
73 | eth.setTimeAndInvokeEventsUs(time); | |
| 23 | ||||
| 24 | 73 | emulatorHelper.handleEmulatorCallback(0, | ||
| 25 | shape.wave, | |||
| 26 |
2/2✓ Branch 1 taken 73 times.
✓ Branch 4 taken 73 times.
|
73 | i % shape.getSize()); | |
| 27 | } | |||
| 28 | ||||
| 29 |
4/10✓ Branch 3 taken 1 time.
✓ Branch 7 taken 1 time.
✗ Branch 12 not taken.
✓ Branch 13 taken 1 time.
✗ Branch 16 not taken.
✗ Branch 19 not taken.
✗ Branch 24 not taken.
✗ Branch 27 not taken.
✓ Branch 34 taken 1 time.
✗ Branch 35 not taken.
|
1 | ASSERT_EQ(167, round(Sensor::getOrZero(SensorType::Rpm))) << "miata_na_tdc RPM"; | |
| 30 |
3/8✓ Branch 5 taken 1 time.
✗ Branch 10 not taken.
✓ Branch 11 taken 1 time.
✗ Branch 14 not taken.
✗ Branch 19 not taken.
✗ Branch 22 not taken.
✓ Branch 29 taken 1 time.
✗ Branch 30 not taken.
|
1 | ASSERT_EQ(293999, engine->tdcScheduler[0].getMomentUs() % SIMULATION_CYCLE_PERIOD); // let's assert TDC position and sync point | |
| 31 |
3/8✓ Branch 5 taken 1 time.
✗ Branch 10 not taken.
✓ Branch 11 taken 1 time.
✗ Branch 14 not taken.
✗ Branch 19 not taken.
✗ Branch 22 not taken.
✓ Branch 29 taken 1 time.
✗ Branch 30 not taken.
|
1 | ASSERT_EQ(293999, engine->tdcScheduler[1].getMomentUs() % SIMULATION_CYCLE_PERIOD); // let's assert TDC position and sync point | |
| 32 | 1 | } | ||
| 33 |