Enforce leading/trailing zeros in Java numeric constants (#2105)

Enforce that integer literals must not have leading zeros and that floating point literals must have leading or trailing zeros in Java.
This commit is contained in:
Austin Shalit
2019-11-20 23:13:15 -05:00
committed by Peter Johnson
parent fa85fbfc1c
commit 4ebae17123
40 changed files with 92 additions and 72 deletions

View File

@@ -56,7 +56,7 @@ public class GyroTest extends AbstractComsSetup {
public void testInitial(AnalogGyro gyro) {
double angle = gyro.getAngle();
assertEquals(errorMessage(angle, 0), 0, angle, .5);
assertEquals(errorMessage(angle, 0), 0, angle, 0.5);
}
/**
@@ -68,7 +68,7 @@ public class GyroTest extends AbstractComsSetup {
// Set angle
for (int i = 0; i < 5; i++) {
m_tpcam.getPan().set(0);
Timer.delay(.1);
Timer.delay(0.1);
}
Timer.delay(0.5);
@@ -99,7 +99,7 @@ public class GyroTest extends AbstractComsSetup {
gyro.reset();
Timer.delay(0.25);
double angle = gyro.getAngle();
assertEquals(errorMessage(angle, 0), 0, angle, .5);
assertEquals(errorMessage(angle, 0), 0, angle, 0.5);
Timer.delay(5);
angle = gyro.getAngle();
assertEquals("After 5 seconds " + errorMessage(angle, 0), 0, angle, 2.0);