Skip to content

Commit

Permalink
fixes for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
narmstro2020 committed Dec 21, 2024
1 parent 7333b13 commit 88e6c11
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions wpilibc/src/test/native/cpp/SolenoidTestCTRE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ TEST(SolenoidCTRETest, ValidInitialization) {
EXPECT_EQ(2, solenoid.GetChannel());

solenoid.Set(true);
EXPECT_TRUE(solenoid.Get());
EXPECT_TRUE(solenoid.IsOn());

solenoid.Set(false);
EXPECT_FALSE(solenoid.Get());
EXPECT_FALSE(solenoid.IsOn());
}

TEST(SolenoidCTRETest, DoubleInitialization) {
Expand All @@ -41,12 +41,12 @@ TEST(SolenoidCTRETest, InvalidChannel) {
TEST(SolenoidCTRETest, Toggle) {
Solenoid solenoid{3, frc::PneumaticsModuleType::CTREPCM, 2};
solenoid.Set(true);
EXPECT_TRUE(solenoid.Get());
EXPECT_TRUE(solenoid.IsOn());

solenoid.Toggle();
EXPECT_FALSE(solenoid.Get());
EXPECT_FALSE(solenoid.IsOn());

solenoid.Toggle();
EXPECT_TRUE(solenoid.Get());
EXPECT_TRUE(solenoid.IsOn());
}
} // namespace frc
10 changes: 5 additions & 5 deletions wpilibc/src/test/native/cpp/SolenoidTestREV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ TEST(SolenoidREVTest, ValidInitialization) {
EXPECT_EQ(2, solenoid.GetChannel());

solenoid.Set(true);
EXPECT_TRUE(solenoid.Get());
EXPECT_TRUE(solenoid.IsOn());

solenoid.Set(false);
EXPECT_FALSE(solenoid.Get());
EXPECT_FALSE(solenoid.IsOn());
}

TEST(SolenoidREVTest, DoubleInitialization) {
Expand All @@ -41,12 +41,12 @@ TEST(SolenoidREVTest, InvalidChannel) {
TEST(SolenoidREVTest, Toggle) {
Solenoid solenoid{3, frc::PneumaticsModuleType::REVPH, 2};
solenoid.Set(true);
EXPECT_TRUE(solenoid.Get());
EXPECT_TRUE(solenoid.IsOn());

solenoid.Toggle();
EXPECT_FALSE(solenoid.Get());
EXPECT_FALSE(solenoid.IsOn());

solenoid.Toggle();
EXPECT_TRUE(solenoid.Get());
EXPECT_TRUE(solenoid.IsOn());
}
} // namespace frc

0 comments on commit 88e6c11

Please sign in to comment.