mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Checkstyle 8.1 (#584)
Added a few checks too: - SimplifyBooleanExpression - SimplifyBooleanReturn - StringLiteralEquality - UnnecessaryParentheses
This commit is contained in:
committed by
Peter Johnson
parent
3cfcbe9a95
commit
ddd5aeba19
@@ -44,7 +44,7 @@ public class MotorEncoderTest extends AbstractComsSetup {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs the test
|
||||
* Constructs the test.
|
||||
*
|
||||
* @param mef The fixture under test.
|
||||
*/
|
||||
|
||||
@@ -161,21 +161,21 @@ public class PCMTest extends AbstractComsSetup {
|
||||
Timer.delay(kSolenoidDelayTime);
|
||||
assertTrue("Solenoid #1 did not turn off", fakeSolenoid1.get());
|
||||
assertTrue("Solenoid #2 did not turn off", fakeSolenoid2.get());
|
||||
assertTrue("DoubleSolenoid did not report off", (solenoid.get() == DoubleSolenoid.Value.kOff));
|
||||
assertTrue("DoubleSolenoid did not report off", solenoid.get() == DoubleSolenoid.Value.kOff);
|
||||
|
||||
solenoid.set(DoubleSolenoid.Value.kForward);
|
||||
Timer.delay(kSolenoidDelayTime);
|
||||
assertFalse("Solenoid #1 did not turn on", fakeSolenoid1.get());
|
||||
assertTrue("Solenoid #2 did not turn off", fakeSolenoid2.get());
|
||||
assertTrue("DoubleSolenoid did not report Forward", (solenoid.get() == DoubleSolenoid.Value
|
||||
.kForward));
|
||||
assertTrue("DoubleSolenoid did not report Forward", solenoid.get() == DoubleSolenoid.Value
|
||||
.kForward);
|
||||
|
||||
solenoid.set(DoubleSolenoid.Value.kReverse);
|
||||
Timer.delay(kSolenoidDelayTime);
|
||||
assertTrue("Solenoid #1 did not turn off", fakeSolenoid1.get());
|
||||
assertFalse("Solenoid #2 did not turn on", fakeSolenoid2.get());
|
||||
assertTrue("DoubleSolenoid did not report Reverse", (solenoid.get() == DoubleSolenoid.Value
|
||||
.kReverse));
|
||||
assertTrue("DoubleSolenoid did not report Reverse", solenoid.get() == DoubleSolenoid.Value
|
||||
.kReverse);
|
||||
|
||||
solenoid.free();
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public abstract class MotorEncoderFixture<T extends SpeedController> implements
|
||||
*/
|
||||
public boolean isMotorSpeedWithinRange(double value, double accuracy) {
|
||||
initialize();
|
||||
return Math.abs((Math.abs(m_motor.get()) - Math.abs(value))) < Math.abs(accuracy);
|
||||
return Math.abs(Math.abs(m_motor.get()) - Math.abs(value)) < Math.abs(accuracy);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.io.File;
|
||||
public class AntJunitLanucher {
|
||||
|
||||
/**
|
||||
* Main entry point for jenkins
|
||||
* Main entry point for jenkins.
|
||||
*
|
||||
* @param args Arguments passed to java.
|
||||
*/
|
||||
|
||||
@@ -343,7 +343,7 @@ public final class TestBench {
|
||||
false));
|
||||
encoderPortPairs.addAll(getPairArray(getDIOCrossConnect().get(1), getDIOCrossConnect().get(0),
|
||||
false));
|
||||
assert (encoderPortPairs.size() == 8);
|
||||
assert encoderPortPairs.size() == 8;
|
||||
return encoderPortPairs;
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ public class TestSuite extends AbstractTestSuite {
|
||||
|
||||
/**
|
||||
* Parses the arguments passed at runtime and runs the appropriate tests based upon these
|
||||
* arguments
|
||||
* arguments.
|
||||
*
|
||||
* @param args the args passed into the program at runtime
|
||||
* @return the restults of the tests that have run. If no tests were run then null is returned.
|
||||
|
||||
Reference in New Issue
Block a user