Skip to content

Commit

Permalink
fix dep warnings in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
narmstro2020 committed Dec 24, 2024
1 parent aeacdf6 commit a701a76
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ void testValidInitialization() {
assertEquals(2, solenoid.getChannel());

solenoid.set(true);
assertTrue(solenoid.get());
assertTrue(solenoid.isOn());

solenoid.set(false);
assertFalse(solenoid.get());
assertFalse(solenoid.isOn());
}
}

Expand Down Expand Up @@ -52,13 +52,13 @@ void testInvalidChannel() {
void testToggle() {
try (Solenoid solenoid = new Solenoid(3, PneumaticsModuleType.CTREPCM, 2)) {
solenoid.set(true);
assertTrue(solenoid.get());
assertTrue(solenoid.isOn());

solenoid.toggle();
assertFalse(solenoid.get());
assertFalse(solenoid.isOn());

solenoid.toggle();
assertTrue(solenoid.get());
assertTrue(solenoid.isOn());
}
}
}
10 changes: 5 additions & 5 deletions wpilibj/src/test/java/edu/wpi/first/wpilibj/SolenoidTestREV.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ void testValidInitialization() {
assertEquals(2, solenoid.getChannel());

solenoid.set(true);
assertTrue(solenoid.get());
assertTrue(solenoid.isOn());

solenoid.set(false);
assertFalse(solenoid.get());
assertFalse(solenoid.isOn());
}
}

Expand Down Expand Up @@ -50,13 +50,13 @@ void testInvalidChannel() {
void testToggle() {
try (Solenoid solenoid = new Solenoid(3, PneumaticsModuleType.REVPH, 2)) {
solenoid.set(true);
assertTrue(solenoid.get());
assertTrue(solenoid.isOn());

solenoid.toggle();
assertFalse(solenoid.get());
assertFalse(solenoid.isOn());

solenoid.toggle();
assertTrue(solenoid.get());
assertTrue(solenoid.isOn());
}
}
}

0 comments on commit a701a76

Please sign in to comment.