mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Remove wpilibj tests from wpilibjIntegrationTests (#1323)
Since the integration tests are still on junit 4, the wpilibj junit 5 tests fail.
This commit is contained in:
committed by
Peter Johnson
parent
12c92a822d
commit
0068b6aea3
@@ -0,0 +1,48 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package edu.wpi.first.wpilibj;
|
||||
|
||||
public class MockSpeedController implements SpeedController {
|
||||
private double m_speed;
|
||||
private boolean m_isInverted;
|
||||
|
||||
@Override
|
||||
public void set(double speed) {
|
||||
m_speed = m_isInverted ? -speed : speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double get() {
|
||||
return m_speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInverted(boolean isInverted) {
|
||||
m_isInverted = isInverted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getInverted() {
|
||||
return m_isInverted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable() {
|
||||
m_speed = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stopMotor() {
|
||||
disable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pidWrite(double output) {
|
||||
set(output);
|
||||
}
|
||||
}
|
||||
@@ -19,12 +19,11 @@ import edu.wpi.first.wpilibj.test.AbstractTestSuite;
|
||||
*/
|
||||
@RunWith(Suite.class)
|
||||
@SuiteClasses({AnalogCrossConnectTest.class, AnalogPotentiometerTest.class,
|
||||
BuiltInAccelerometerTest.class,
|
||||
CircularBufferTest.class, ConstantsPortsTest.class, CounterTest.class,
|
||||
BuiltInAccelerometerTest.class, ConstantsPortsTest.class, CounterTest.class,
|
||||
DigitalGlitchFilterTest.class, DIOCrossConnectTest.class, DriverStationTest.class,
|
||||
EncoderTest.class, FilterNoiseTest.class, FilterOutputTest.class, GyroTest.class,
|
||||
MotorEncoderTest.class, MotorInvertingTest.class, PCMTest.class, PDPTest.class,
|
||||
PIDTest.class, PIDToleranceTest.class, PreferencesTest.class, RelayCrossConnectTest.class,
|
||||
PIDTest.class, PreferencesTest.class, RelayCrossConnectTest.class,
|
||||
RobotDriveTest.class, SampleTest.class, TimerTest.class})
|
||||
public class WpiLibJTestSuite extends AbstractTestSuite {
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
package edu.wpi.first.wpilibj.command;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Suite;
|
||||
import org.junit.runners.Suite.SuiteClasses;
|
||||
|
||||
import edu.wpi.first.wpilibj.test.AbstractTestSuite;
|
||||
|
||||
/**
|
||||
* Contains a listing of all of the {@link Command} tests.
|
||||
*/
|
||||
@RunWith(Suite.class)
|
||||
@SuiteClasses({ButtonTest.class, CommandParallelGroupTest.class, CommandScheduleTest.class,
|
||||
CommandSequentialGroupTest.class, CommandSupersedeTest.class, CommandTimeoutTest.class,
|
||||
ConditionalCommandTest.class, DefaultCommandTest.class})
|
||||
public class CommandTestSuite extends AbstractTestSuite {
|
||||
}
|
||||
@@ -28,7 +28,6 @@ import junit.framework.JUnit4TestAdapter;
|
||||
import junit.runner.Version;
|
||||
|
||||
import edu.wpi.first.wpilibj.WpiLibJTestSuite;
|
||||
import edu.wpi.first.wpilibj.command.CommandTestSuite;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboardTestSuite;
|
||||
|
||||
/**
|
||||
@@ -38,7 +37,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboardTestSuite;
|
||||
*/
|
||||
@RunWith(Suite.class)
|
||||
// These are listed on separate lines to prevent merge conflicts
|
||||
@SuiteClasses({WpiLibJTestSuite.class, CommandTestSuite.class, SmartDashboardTestSuite.class})
|
||||
@SuiteClasses({WpiLibJTestSuite.class, SmartDashboardTestSuite.class})
|
||||
public class TestSuite extends AbstractTestSuite {
|
||||
static {
|
||||
// Sets up the logging output
|
||||
|
||||
Reference in New Issue
Block a user