mirror of https://github.com/rusefi/rusefi-1.git
parent
a7846977ba
commit
52fef7aec3
|
@ -22,14 +22,7 @@ import static com.rusefi.config.generated.Fields.*;
|
|||
* @author Andrey Belomutskiy
|
||||
* 3/5/14
|
||||
*/
|
||||
public class FunctionalTest {
|
||||
private EcuTestHelper ecu;
|
||||
|
||||
@Before
|
||||
public void startUp() {
|
||||
ecu = EcuTestHelper.createInstance();
|
||||
}
|
||||
|
||||
public class FunctionalTest extends RusefiTestBase {
|
||||
@Test
|
||||
public void testChangingIgnitionMode() {
|
||||
String msg = "change ign mode";
|
||||
|
|
|
@ -7,11 +7,9 @@ import org.junit.Test;
|
|||
import static com.rusefi.functional_tests.EcuTestHelper.FAIL;
|
||||
import static com.rusefi.config.generated.Fields.*;
|
||||
|
||||
public class HighRevTest {
|
||||
public class HighRevTest extends RusefiTestBase {
|
||||
@Test
|
||||
public void testVW() {
|
||||
EcuTestHelper ecu = EcuTestHelper.createInstance();
|
||||
|
||||
ecu.setEngineType(ET_VW_ABA);
|
||||
// trying to disable engine sniffer to help https://github.com/rusefi/rusefi/issues/1849
|
||||
ecu.sendCommand("set " + CMD_ENGINESNIFFERRPMTHRESHOLD + " 100");
|
||||
|
@ -22,15 +20,12 @@ public class HighRevTest {
|
|||
|
||||
@Test
|
||||
public void testV12() {
|
||||
EcuTestHelper ecu = EcuTestHelper.createInstance();
|
||||
ecu.setEngineType(ET_BMW_M73_F);
|
||||
ecu.changeRpm(700);
|
||||
// first let's get to expected RPM
|
||||
EcuTestHelper.assertRpmDoesNotJump(6000, 5, 40, FAIL, ecu.commandQueue);
|
||||
testCaseBug1873(ecu);
|
||||
}
|
||||
|
||||
private void testCaseBug1873(EcuTestHelper ecu) {
|
||||
// tests bug 1873
|
||||
EcuTestHelper.assertRpmDoesNotJump(60, 5, 110, FAIL, ecu.commandQueue);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,11 +5,9 @@ import com.rusefi.functional_tests.EcuTestHelper;
|
|||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
public class MiscTest {
|
||||
public class MiscTest extends RusefiTestBase {
|
||||
@Test
|
||||
public void burn() {
|
||||
EcuTestHelper ecu = EcuTestHelper.createInstance();
|
||||
|
||||
BinaryProtocol bp = ecu.getLinkManager().getCurrentStreamState();
|
||||
// let's make sure 'burn' command works since sometimes it does not
|
||||
bp.burn();
|
||||
|
|
|
@ -18,13 +18,17 @@ import static com.rusefi.config.generated.Fields.*;
|
|||
* PD2<>PA5
|
||||
*/
|
||||
|
||||
public class PwmHardwareTest {
|
||||
public class PwmHardwareTest extends RusefiTestBase {
|
||||
@Override
|
||||
boolean needsHardwareTriggerInput() {
|
||||
// This test uses hardware trigger input!
|
||||
return true;
|
||||
}
|
||||
|
||||
private static final int FREQUENCY = 160;
|
||||
|
||||
@Test
|
||||
public void testIdlePin() {
|
||||
EcuTestHelper ecu = EcuTestHelper.createInstance(true);
|
||||
|
||||
ecu.setEngineType(ET_FRANKENSO_MIATA_NA6);
|
||||
ecu.sendCommand(getDisableCommand(Fields.CMD_SELF_STIMULATION));
|
||||
ecu.changeRpm(1000);
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package com.rusefi;
|
||||
|
||||
import com.rusefi.functional_tests.EcuTestHelper;
|
||||
import org.junit.Before;
|
||||
|
||||
public class RusefiTestBase {
|
||||
protected EcuTestHelper ecu;
|
||||
|
||||
boolean needsHardwareTriggerInput() {
|
||||
// Most tests do not, but some may need it
|
||||
return false;
|
||||
}
|
||||
|
||||
@Before
|
||||
public void startUp() {
|
||||
ecu = EcuTestHelper.createInstance(needsHardwareTriggerInput());
|
||||
}
|
||||
}
|
|
@ -16,11 +16,15 @@ import static com.rusefi.config.generated.Fields.*;
|
|||
* PD1<>PC6
|
||||
* PD2<>PA5
|
||||
*/
|
||||
public class VssHardwareLoopTest {
|
||||
public class VssHardwareLoopTest extends RusefiTestBase {
|
||||
@Override
|
||||
boolean needsHardwareTriggerInput() {
|
||||
// This test uses hardware trigger input!
|
||||
return true;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
EcuTestHelper ecu = EcuTestHelper.createInstance(true);
|
||||
|
||||
ecu.setEngineType(ET_FRANKENSO_MIATA_NA6);
|
||||
ecu.sendCommand(getDisableCommand(Fields.CMD_SELF_STIMULATION));
|
||||
ecu.changeRpm(1400);
|
||||
|
|
Loading…
Reference in New Issue