mirror of https://github.com/rusefi/rusefi-1.git
unit test refactoring
This commit is contained in:
parent
c3895860f3
commit
4167cb5d12
|
@ -63,7 +63,7 @@ int main(void) {
|
||||||
|
|
||||||
testMisc();
|
testMisc();
|
||||||
testDifferentInjectionModes();
|
testDifferentInjectionModes();
|
||||||
testPidAutoZigZag();
|
testPidAuto();
|
||||||
testMissedSpark299();
|
testMissedSpark299();
|
||||||
testSparkReverseOrderBug319();
|
testSparkReverseOrderBug319();
|
||||||
testFuelSchedulerBug299smallAndLarge();
|
testFuelSchedulerBug299smallAndLarge();
|
||||||
|
|
|
@ -158,10 +158,9 @@ static void testPidAutoZigZagGrowingOsc() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void testPidAutoZigZagZero() {
|
static void testPidZeroLine() {
|
||||||
printf("*************************************************** testPidAutoZigZagGrowingOsc\r\n");
|
printf("*************************************************** testPidAutoZigZagGrowingOsc\r\n");
|
||||||
|
|
||||||
oscRange = 0;
|
|
||||||
mockTimeMs = 0;
|
mockTimeMs = 0;
|
||||||
|
|
||||||
PID_AutoTune at;
|
PID_AutoTune at;
|
||||||
|
@ -174,7 +173,7 @@ static void testPidAutoZigZagZero() {
|
||||||
startMockMs = mockTimeMs;
|
startMockMs = mockTimeMs;
|
||||||
printf("loop=%d %d\r\n", i, startMockMs);
|
printf("loop=%d %d\r\n", i, startMockMs);
|
||||||
for (; mockTimeMs < CYCLE + startMockMs; mockTimeMs++) {
|
for (; mockTimeMs < CYCLE + startMockMs; mockTimeMs++) {
|
||||||
at.input = zigZagValue(mockTimeMs);
|
at.input = 0;
|
||||||
bool result = at.Runtime(&logging);
|
bool result = at.Runtime(&logging);
|
||||||
assertFalseM("should be false#4", result);
|
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
|
// nothing happens in this test since we do not allow time play a role
|
||||||
}
|
}
|
||||||
|
|
||||||
void testPidAutoZigZag() {
|
void testPidAuto() {
|
||||||
printf("*************************************************** testPidAutoZigZag\r\n");
|
printf("*************************************************** testPidAuto\r\n");
|
||||||
|
|
||||||
|
|
||||||
testPidAutoZigZagZero();
|
testPidZeroLine();
|
||||||
testPidAutoZigZagStable();
|
testPidAutoZigZagStable();
|
||||||
|
|
||||||
testPidAutoZigZagGrowingOsc();
|
testPidAutoZigZagGrowingOsc();
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
#ifndef TEST_PID_AUTO_H_
|
#ifndef TEST_PID_AUTO_H_
|
||||||
#define TEST_PID_AUTO_H_
|
#define TEST_PID_AUTO_H_
|
||||||
|
|
||||||
void testPidAutoZigZag();
|
void testPidAuto();
|
||||||
|
|
||||||
#endif /* TEST_PID_AUTO_H_ */
|
#endif /* TEST_PID_AUTO_H_ */
|
||||||
|
|
Loading…
Reference in New Issue