mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
SCRIPT: Spotless Apply
This commit is contained in:
committed by
Peter Johnson
parent
c89910b7c6
commit
c48b722dac
@@ -8,11 +8,11 @@ import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
|
||||
import org.wpilib.util.Color;
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.wpilib.util.Color;
|
||||
|
||||
class ColorTest {
|
||||
private static final double kEpsilon = 1e-3;
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
package org.wpilib;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import org.junit.jupiter.api.extension.BeforeAllCallback;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext;
|
||||
import org.junit.jupiter.api.extension.ExtensionContext.Namespace;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
|
||||
public final class MockHardwareExtension implements BeforeAllCallback {
|
||||
private static ExtensionContext getRoot(ExtensionContext context) {
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.can;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.hal.can.CANJNI;
|
||||
import org.wpilib.hardware.hal.can.CANStatus;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class CANStatusTest {
|
||||
@Test
|
||||
|
||||
@@ -6,8 +6,8 @@ package org.wpilib.drive;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.hardware.motor.MockPWMMotorController;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.motor.MockPWMMotorController;
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
class DifferentialDriveTest {
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.drive;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.hardware.motor.MockPWMMotorController;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.motor.MockPWMMotorController;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
class MecanumDriveTest {
|
||||
|
||||
@@ -7,11 +7,11 @@ package org.wpilib.driverstation;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
|
||||
class DriverStationTest {
|
||||
@ParameterizedTest
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.driverstation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.driverstation.GenericHID.RumbleType;
|
||||
import org.wpilib.simulation.GenericHIDSim;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class GenericHIDTest {
|
||||
private static final double kEpsilon = 0.0001;
|
||||
|
||||
@@ -8,9 +8,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.JoystickSim;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class JoystickTest {
|
||||
@Test
|
||||
|
||||
@@ -8,12 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.PS4ControllerSim;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.PS4ControllerSim;
|
||||
|
||||
class PS4ControllerTest {
|
||||
@ParameterizedTest
|
||||
|
||||
@@ -8,12 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.PS5ControllerSim;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.PS5ControllerSim;
|
||||
|
||||
class PS5ControllerTest {
|
||||
@ParameterizedTest
|
||||
|
||||
@@ -8,12 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.XboxControllerSim;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.XboxControllerSim;
|
||||
|
||||
class XboxControllerTest {
|
||||
@ParameterizedTest
|
||||
|
||||
@@ -6,11 +6,11 @@ package org.wpilib.event;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
|
||||
class NetworkBooleanEventTest {
|
||||
NetworkTableInstance m_inst;
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
|
||||
package org.wpilib.hal;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.hal.HALUtil;
|
||||
import org.wpilib.networktables.NetworkTablesJNI;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class JNITest {
|
||||
@Test
|
||||
|
||||
@@ -7,12 +7,12 @@ package org.wpilib.hal;
|
||||
import static org.junit.jupiter.api.Assertions.assertAll;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.driverstation.DriverStation.MatchType;
|
||||
import org.wpilib.hardware.hal.DriverStationJNI;
|
||||
import org.wpilib.hardware.hal.MatchInfoData;
|
||||
import org.wpilib.hardware.hal.simulation.DriverStationDataJNI;
|
||||
import org.wpilib.driverstation.DriverStation.MatchType;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MatchInfoDataTest {
|
||||
@Test
|
||||
|
||||
@@ -8,9 +8,9 @@ import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.DIOSim;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DigitalOutputTest {
|
||||
@Test
|
||||
|
||||
@@ -9,13 +9,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.junit.jupiter.params.provider.Arguments.arguments;
|
||||
|
||||
import org.wpilib.util.Color;
|
||||
import org.wpilib.util.Color8Bit;
|
||||
import java.util.stream.Stream;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.wpilib.util.Color;
|
||||
import org.wpilib.util.Color8Bit;
|
||||
|
||||
class AddressableLEDBufferTest {
|
||||
@ParameterizedTest
|
||||
|
||||
@@ -6,8 +6,8 @@ package org.wpilib.hardware.led;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.util.Color;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.util.Color;
|
||||
|
||||
class AddressableLEDBufferViewTest {
|
||||
@Test
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
package org.wpilib.hardware.led;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.wpilib.hardware.led.LEDPattern.GradientType.kContinuous;
|
||||
import static org.wpilib.hardware.led.LEDPattern.GradientType.kDiscontinuous;
|
||||
import static org.wpilib.units.Units.Centimeters;
|
||||
import static org.wpilib.units.Units.Meters;
|
||||
import static org.wpilib.units.Units.MetersPerSecond;
|
||||
@@ -12,8 +16,6 @@ import static org.wpilib.units.Units.Microseconds;
|
||||
import static org.wpilib.units.Units.Percent;
|
||||
import static org.wpilib.units.Units.Seconds;
|
||||
import static org.wpilib.units.Units.Value;
|
||||
import static org.wpilib.hardware.led.LEDPattern.GradientType.kContinuous;
|
||||
import static org.wpilib.hardware.led.LEDPattern.GradientType.kDiscontinuous;
|
||||
import static org.wpilib.util.Color.kBlack;
|
||||
import static org.wpilib.util.Color.kBlue;
|
||||
import static org.wpilib.util.Color.kGreen;
|
||||
@@ -24,18 +26,16 @@ import static org.wpilib.util.Color.kPurple;
|
||||
import static org.wpilib.util.Color.kRed;
|
||||
import static org.wpilib.util.Color.kWhite;
|
||||
import static org.wpilib.util.Color.kYellow;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.util.Color;
|
||||
import org.wpilib.util.Color8Bit;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.util.Color;
|
||||
import org.wpilib.util.Color8Bit;
|
||||
|
||||
class LEDPatternTest {
|
||||
long m_mockTime;
|
||||
|
||||
@@ -7,8 +7,8 @@ package org.wpilib.hardware.pneumatic;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.wpilib.hardware.hal.util.AllocationException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.util.AllocationException;
|
||||
|
||||
class DoubleSolenoidTestCTRE {
|
||||
@Test
|
||||
|
||||
@@ -7,8 +7,8 @@ package org.wpilib.hardware.pneumatic;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.wpilib.hardware.hal.util.AllocationException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.util.AllocationException;
|
||||
|
||||
class DoubleSolenoidTestREV {
|
||||
@Test
|
||||
|
||||
@@ -9,8 +9,8 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.util.AllocationException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.util.AllocationException;
|
||||
|
||||
class SolenoidTestCTRE {
|
||||
@Test
|
||||
|
||||
@@ -9,8 +9,8 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.util.AllocationException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.util.AllocationException;
|
||||
|
||||
class SolenoidTestREV {
|
||||
@Test
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.hardware.power;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.power.PowerDistribution.ModuleType;
|
||||
import org.wpilib.simulation.PDPSim;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class PowerDistributionTest {
|
||||
@Test
|
||||
|
||||
@@ -6,8 +6,8 @@ package org.wpilib.hardware.range;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.simulation.SharpIRSim;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.simulation.SharpIRSim;
|
||||
|
||||
class SharpIRTest {
|
||||
@Test
|
||||
|
||||
@@ -6,11 +6,11 @@ package org.wpilib.hardware.rotation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.discrete.AnalogInput;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.AnalogInputSim;
|
||||
import org.wpilib.simulation.RoboRioSim;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class AnalogPotentiometerTest {
|
||||
@Test
|
||||
|
||||
@@ -6,13 +6,13 @@ package org.wpilib.opmode;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
class TimedRobotTest {
|
||||
static final double kPeriod = 0.02;
|
||||
|
||||
@@ -7,13 +7,13 @@ package org.wpilib.opmode;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import org.wpilib.simulation.DriverStationSim;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
class TimesliceRobotTest {
|
||||
static class MockRobot extends TimesliceRobot {
|
||||
|
||||
@@ -6,11 +6,11 @@ package org.wpilib.simulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.accelerometer.ADXL345_I2C;
|
||||
import org.wpilib.hardware.bus.I2C;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
import org.wpilib.hardware.accelerometer.ADXL345_I2C;
|
||||
import org.wpilib.hardware.bus.I2C;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
|
||||
class ADXL345SimTest {
|
||||
@ParameterizedTest
|
||||
|
||||
@@ -8,14 +8,14 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.led.AddressableLED;
|
||||
import org.wpilib.hardware.led.AddressableLEDBuffer;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.BufferCallback;
|
||||
import org.wpilib.simulation.testutils.IntCallback;
|
||||
import java.util.Arrays;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class AddressableLEDSimTest {
|
||||
@Test
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.simulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.hardware.rotation.AnalogEncoder;
|
||||
import org.wpilib.hardware.discrete.AnalogInput;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.discrete.AnalogInput;
|
||||
import org.wpilib.hardware.rotation.AnalogEncoder;
|
||||
|
||||
class AnalogEncoderSimTest {
|
||||
@Test
|
||||
|
||||
@@ -7,11 +7,11 @@ package org.wpilib.simulation;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.discrete.AnalogInput;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.DoubleCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class AnalogInputSimTest {
|
||||
@Test
|
||||
|
||||
@@ -9,6 +9,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.pneumatic.CompressorConfigType;
|
||||
import org.wpilib.hardware.pneumatic.DoubleSolenoid;
|
||||
@@ -16,7 +17,6 @@ import org.wpilib.hardware.pneumatic.PneumaticsControlModule;
|
||||
import org.wpilib.hardware.pneumatic.PneumaticsModuleType;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.DoubleCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class CTREPCMSimTest {
|
||||
@Test
|
||||
|
||||
@@ -6,16 +6,16 @@ package org.wpilib.simulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.motor.PWMVictorSPX;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.math.controller.PIDController;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N2;
|
||||
import org.wpilib.math.system.LinearSystem;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.hardware.motor.PWMVictorSPX;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DCMotorSimTest {
|
||||
@Test
|
||||
|
||||
@@ -7,11 +7,11 @@ package org.wpilib.simulation;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.discrete.DigitalInput;
|
||||
import org.wpilib.hardware.discrete.DigitalOutput;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DIOSimTest {
|
||||
@Test
|
||||
|
||||
@@ -7,15 +7,16 @@ package org.wpilib.simulation;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.linalg.Vector;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.controller.LTVUnicycleController;
|
||||
import org.wpilib.math.controller.LinearPlantInversionFeedforward;
|
||||
import org.wpilib.math.geometry.Pose2d;
|
||||
import org.wpilib.math.geometry.Rotation2d;
|
||||
import org.wpilib.math.kinematics.DifferentialDriveKinematics;
|
||||
import org.wpilib.math.linalg.Matrix;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.linalg.Vector;
|
||||
import org.wpilib.math.numbers.N1;
|
||||
import org.wpilib.math.numbers.N7;
|
||||
import org.wpilib.math.system.NumericalIntegration;
|
||||
@@ -24,9 +25,8 @@ import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.trajectory.TrajectoryConfig;
|
||||
import org.wpilib.math.trajectory.TrajectoryGenerator;
|
||||
import org.wpilib.math.trajectory.constraint.DifferentialDriveKinematicsConstraint;
|
||||
import org.wpilib.math.util.Nat;
|
||||
import org.wpilib.math.util.Units;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DifferentialDrivetrainSimTest {
|
||||
@Test
|
||||
|
||||
@@ -8,12 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.discrete.DigitalOutput;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.DoubleCallback;
|
||||
import org.wpilib.simulation.testutils.IntCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DigitalPWMSimTest {
|
||||
@Test
|
||||
|
||||
@@ -8,15 +8,15 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.AllianceStationID;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.DoubleCallback;
|
||||
import org.wpilib.simulation.testutils.EnumCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
import org.wpilib.driverstation.DriverStation;
|
||||
import org.wpilib.hardware.hal.AllianceStationID;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.DoubleCallback;
|
||||
import org.wpilib.simulation.testutils.EnumCallback;
|
||||
|
||||
class DriverStationSimTest {
|
||||
@Test
|
||||
|
||||
@@ -8,9 +8,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.rotation.DutyCycleEncoder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DutyCycleEncoderSimTest {
|
||||
@Test
|
||||
|
||||
@@ -8,11 +8,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.rotation.DutyCycle;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.DoubleCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DutyCycleSimTest {
|
||||
@Test
|
||||
|
||||
@@ -7,15 +7,15 @@ package org.wpilib.simulation;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.motor.PWMVictorSPX;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.math.controller.PIDController;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.system.plant.LinearSystemId;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.wpilib.hardware.motor.PWMVictorSPX;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class ElevatorSimTest {
|
||||
@Test
|
||||
|
||||
@@ -7,11 +7,11 @@ package org.wpilib.simulation;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.rotation.Encoder;
|
||||
import org.wpilib.simulation.testutils.DoubleCallback;
|
||||
import org.wpilib.simulation.testutils.IntCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class EncoderSimTest {
|
||||
private static final double DEFAULT_DISTANCE_PER_PULSE = 0.0005;
|
||||
|
||||
@@ -6,9 +6,9 @@ package org.wpilib.simulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.motor.Spark;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class PWMMotorControllerSimTest {
|
||||
@Test
|
||||
|
||||
@@ -8,11 +8,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.discrete.PWM;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.IntCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class PWMSimTest {
|
||||
@Test
|
||||
|
||||
@@ -9,6 +9,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.hardware.pneumatic.CompressorConfigType;
|
||||
import org.wpilib.hardware.pneumatic.DoubleSolenoid;
|
||||
@@ -17,7 +18,6 @@ import org.wpilib.hardware.pneumatic.PneumaticsModuleType;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.DoubleCallback;
|
||||
import org.wpilib.simulation.testutils.EnumCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class REVPHSimTest {
|
||||
@Test
|
||||
|
||||
@@ -8,11 +8,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.system.RobotController;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.simulation.testutils.BooleanCallback;
|
||||
import org.wpilib.simulation.testutils.DoubleCallback;
|
||||
import org.wpilib.simulation.testutils.IntCallback;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.system.RobotController;
|
||||
|
||||
class RoboRioSimTest {
|
||||
@Test
|
||||
|
||||
@@ -8,12 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.hardware.hal.SimBoolean;
|
||||
import org.wpilib.hardware.hal.SimDevice;
|
||||
import org.wpilib.hardware.hal.SimDevice.Direction;
|
||||
import org.wpilib.hardware.hal.SimValue;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SimDeviceSimTest {
|
||||
@Test
|
||||
|
||||
@@ -6,10 +6,10 @@ package org.wpilib.simulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.math.linalg.VecBuilder;
|
||||
import org.wpilib.math.system.plant.DCMotor;
|
||||
import org.wpilib.math.util.Units;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class SingleJointedArmSimTest {
|
||||
@Test
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
package org.wpilib.simulation.testutils;
|
||||
|
||||
import org.wpilib.hardware.hal.simulation.ConstBufferCallback;
|
||||
import java.util.Arrays;
|
||||
import org.wpilib.hardware.hal.simulation.ConstBufferCallback;
|
||||
|
||||
public class BufferCallback implements ConstBufferCallback {
|
||||
private boolean m_wasTriggered;
|
||||
|
||||
@@ -7,11 +7,11 @@ package org.wpilib.smartdashboard;
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.util.Color8Bit;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.util.Color8Bit;
|
||||
|
||||
class Mechanism2dTest {
|
||||
private NetworkTableInstance m_inst;
|
||||
|
||||
@@ -7,14 +7,14 @@ package org.wpilib.smartdashboard;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.simulation.SendableChooserSim;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.ValueSource;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.simulation.SendableChooserSim;
|
||||
|
||||
class SendableChooserTest {
|
||||
private NetworkTableInstance m_inst;
|
||||
|
||||
@@ -7,12 +7,12 @@ package org.wpilib.smartdashboard;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.wpilib.networktables.NetworkTable;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.UtilityClassTest;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.wpilib.UtilityClassTest;
|
||||
import org.wpilib.networktables.NetworkTable;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
|
||||
class SmartDashboardTest extends UtilityClassTest<SmartDashboard> {
|
||||
private NetworkTableInstance m_inst;
|
||||
|
||||
@@ -6,13 +6,13 @@ package org.wpilib.system;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
/** Tests to see if the Notifier is working properly. */
|
||||
class NotifierTest {
|
||||
|
||||
@@ -8,12 +8,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
class TimerTest {
|
||||
@BeforeEach
|
||||
|
||||
@@ -8,13 +8,13 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import org.wpilib.hardware.hal.HAL;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
|
||||
class WatchdogTest {
|
||||
@BeforeEach
|
||||
|
||||
@@ -8,11 +8,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.networktables.StringArraySubscriber;
|
||||
import org.wpilib.util.Alert.AlertType;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -21,6 +16,11 @@ import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.TestInfo;
|
||||
import org.junit.jupiter.api.parallel.ResourceLock;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.networktables.StringArraySubscriber;
|
||||
import org.wpilib.simulation.SimHooks;
|
||||
import org.wpilib.smartdashboard.SmartDashboard;
|
||||
import org.wpilib.util.Alert.AlertType;
|
||||
|
||||
class AlertTest {
|
||||
private NetworkTableInstance m_inst;
|
||||
|
||||
@@ -11,9 +11,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
import static org.junit.jupiter.api.parallel.ExecutionMode.SAME_THREAD;
|
||||
|
||||
import org.wpilib.networktables.NetworkTable;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.networktables.Topic;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
@@ -31,6 +28,9 @@ import org.junit.jupiter.api.io.TempDir;
|
||||
import org.junit.jupiter.api.parallel.Execution;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
import org.wpilib.networktables.NetworkTable;
|
||||
import org.wpilib.networktables.NetworkTableInstance;
|
||||
import org.wpilib.networktables.Topic;
|
||||
|
||||
@Execution(SAME_THREAD)
|
||||
class PreferencesTest {
|
||||
|
||||
Reference in New Issue
Block a user