mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
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:
committed by
Peter Johnson
parent
fa85fbfc1c
commit
4ebae17123
@@ -23,10 +23,10 @@ class NotifierCommandTest extends CommandTestBase {
|
||||
|
||||
Counter counter = new Counter();
|
||||
|
||||
NotifierCommand command = new NotifierCommand(counter::increment, .01);
|
||||
NotifierCommand command = new NotifierCommand(counter::increment, 0.01);
|
||||
|
||||
scheduler.schedule(command);
|
||||
Timer.delay(.25);
|
||||
Timer.delay(0.25);
|
||||
scheduler.cancel(command);
|
||||
|
||||
assertTrue(counter.m_counter > 10, "Should have hit at least 10 triggers");
|
||||
|
||||
Reference in New Issue
Block a user