unit test refactoring

This commit is contained in:
rusefi 2018-12-01 11:36:05 -05:00
parent c3895860f3
commit 4167cb5d12
3 changed files with 7 additions and 8 deletions

View File

@ -63,7 +63,7 @@ int main(void) {
testMisc();
testDifferentInjectionModes();
testPidAutoZigZag();
testPidAuto();
testMissedSpark299();
testSparkReverseOrderBug319();
testFuelSchedulerBug299smallAndLarge();

View File

@ -158,10 +158,9 @@ static void testPidAutoZigZagGrowingOsc() {
}
static void testPidAutoZigZagZero() {
static void testPidZeroLine() {
printf("*************************************************** testPidAutoZigZagGrowingOsc\r\n");
oscRange = 0;
mockTimeMs = 0;
PID_AutoTune at;
@ -174,7 +173,7 @@ static void testPidAutoZigZagZero() {
startMockMs = mockTimeMs;
printf("loop=%d %d\r\n", i, startMockMs);
for (; mockTimeMs < CYCLE + startMockMs; mockTimeMs++) {
at.input = zigZagValue(mockTimeMs);
at.input = 0;
bool result = at.Runtime(&logging);
assertFalseM("should be false#4", result);
}
@ -182,11 +181,11 @@ static void testPidAutoZigZagZero() {
// nothing happens in this test since we do not allow time play a role
}
void testPidAutoZigZag() {
printf("*************************************************** testPidAutoZigZag\r\n");
void testPidAuto() {
printf("*************************************************** testPidAuto\r\n");
testPidAutoZigZagZero();
testPidZeroLine();
testPidAutoZigZagStable();
testPidAutoZigZagGrowingOsc();

View File

@ -8,6 +8,6 @@
#ifndef TEST_PID_AUTO_H_
#define TEST_PID_AUTO_H_
void testPidAutoZigZag();
void testPidAuto();
#endif /* TEST_PID_AUTO_H_ */