Checkstyle 8.1 (#584)

Added a few checks too:
- SimplifyBooleanExpression
- SimplifyBooleanReturn
- StringLiteralEquality
- UnnecessaryParentheses
This commit is contained in:
Austin Shalit
2017-07-28 22:24:05 -07:00
committed by Peter Johnson
parent 3cfcbe9a95
commit ddd5aeba19
27 changed files with 68 additions and 37 deletions

View File

@@ -96,12 +96,12 @@ public class PIDToleranceTest {
assertFalse("Error was in tolerance when it should not have been. Error was "
+ m_pid.getAvgError(), m_pid.onTarget());
//half of percent tolerance away from setPoint
m_inp.m_val = m_setPoint + (m_tolerance) / 200 * m_range;
m_inp.m_val = m_setPoint + m_tolerance / 200 * m_range;
Timer.delay(1.0);
assertTrue("Error was not in tolerance when it should have been. Error was "
+ m_pid.getAvgError(), m_pid.onTarget());
//double percent tolerance away from setPoint
m_inp.m_val = m_setPoint + (m_tolerance) / 50 * m_range;
m_inp.m_val = m_setPoint + m_tolerance / 50 * m_range;
Timer.delay(1.0);
assertFalse("Error was in tolerance when it should not have been. Error was "
+ m_pid.getAvgError(), m_pid.onTarget());

View File

@@ -70,6 +70,8 @@ public class MockCommand extends Command {
}
/**
* Get what value the isFinished method will return.
*
* @return what value the isFinished method will return.
*/
public boolean isHasFinished() {
@@ -77,6 +79,8 @@ public class MockCommand extends Command {
}
/**
* Set what value the isFinished method will return.
*
* @param hasFinished set what value the isFinished method will return.
*/
public void setHasFinished(boolean hasFinished) {