Skip to content

Commit

Permalink
formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
narmstro2020 committed Dec 21, 2024
1 parent 8245f7b commit d3d0f53
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions wpilibcIntegrationTests/src/main/native/cpp/PCMTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,35 +78,35 @@ TEST_F(PCMTest, Solenoid) {
frc::Wait(kSolenoidDelayTime);
EXPECT_TRUE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn off";
EXPECT_TRUE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn off";
EXPECT_FALSE(solenoid1.Get()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.Get()) << "Solenoid #2 did not read off";
EXPECT_FALSE(solenoid1.IsOn()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.IsOn()) << "Solenoid #2 did not read off";

// Turn one solenoid on and one off
solenoid1.Set(true);
solenoid2.Set(false);
frc::Wait(kSolenoidDelayTime);
EXPECT_FALSE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn on";
EXPECT_TRUE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn off";
EXPECT_TRUE(solenoid1.Get()) << "Solenoid #1 did not read on";
EXPECT_FALSE(solenoid2.Get()) << "Solenoid #2 did not read off";
EXPECT_TRUE(solenoid1.IsOn()) << "Solenoid #1 did not read on";
EXPECT_FALSE(solenoid2.IsOn()) << "Solenoid #2 did not read off";

// Turn one solenoid on and one off
solenoid1.Set(false);
solenoid2.Set(true);
frc::Wait(kSolenoidDelayTime);
EXPECT_TRUE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn off";
EXPECT_FALSE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn on";
EXPECT_FALSE(solenoid1.Get()) << "Solenoid #1 did not read off";
EXPECT_TRUE(solenoid2.Get()) << "Solenoid #2 did not read on";
EXPECT_FALSE(solenoid1.IsOn()) << "Solenoid #1 did not read off";
EXPECT_TRUE(solenoid2.IsOn()) << "Solenoid #2 did not read on";

// Turn both on
solenoid1.Set(true);
solenoid2.Set(true);
frc::Wait(kSolenoidDelayTime);
EXPECT_FALSE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn on";
EXPECT_FALSE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn on";
EXPECT_TRUE(solenoid1.Get()) << "Solenoid #1 did not read on";
EXPECT_TRUE(solenoid2.Get()) << "Solenoid #2 did not read on";
EXPECT_TRUE(solenoid1.IsOn()) << "Solenoid #1 did not read on";
EXPECT_TRUE(solenoid2.IsOn()) << "Solenoid #2 did not read on";
}

/**
Expand Down Expand Up @@ -153,8 +153,8 @@ TEST_F(PCMTest, OneShot) {
frc::Wait(kSolenoidDelayTime);
EXPECT_TRUE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn off";
EXPECT_TRUE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn off";
EXPECT_FALSE(solenoid1.Get()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.Get()) << "Solenoid #2 did not read off";
EXPECT_FALSE(solenoid1.IsOn()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.IsOn()) << "Solenoid #2 did not read off";

// Pulse Solenoid #1 on, and turn Solenoid #2 off
solenoid1.SetPulseDuration(2 * kSolenoidDelayTime);
Expand All @@ -163,13 +163,13 @@ TEST_F(PCMTest, OneShot) {
frc::Wait(kSolenoidDelayTime);
EXPECT_FALSE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn on";
EXPECT_TRUE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn off";
EXPECT_TRUE(solenoid1.Get()) << "Solenoid #1 did not read on";
EXPECT_FALSE(solenoid2.Get()) << "Solenoid #2 did not read off";
EXPECT_TRUE(solenoid1.IsOn()) << "Solenoid #1 did not read on";
EXPECT_FALSE(solenoid2.IsOn()) << "Solenoid #2 did not read off";
frc::Wait(2 * kSolenoidDelayTime);
EXPECT_TRUE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn off";
EXPECT_TRUE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn off";
EXPECT_FALSE(solenoid1.Get()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.Get()) << "Solenoid #2 did not read off";
EXPECT_FALSE(solenoid1.IsOn()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.IsOn()) << "Solenoid #2 did not read off";

// Turn Solenoid #1 off, and pulse Solenoid #2 on
solenoid1.Set(false);
Expand All @@ -178,13 +178,13 @@ TEST_F(PCMTest, OneShot) {
frc::Wait(kSolenoidDelayTime);
EXPECT_TRUE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn off";
EXPECT_FALSE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn on";
EXPECT_FALSE(solenoid1.Get()) << "Solenoid #1 did not read off";
EXPECT_TRUE(solenoid2.Get()) << "Solenoid #2 did not read on";
EXPECT_FALSE(solenoid1.IsOn()) << "Solenoid #1 did not read off";
EXPECT_TRUE(solenoid2.IsOn()) << "Solenoid #2 did not read on";
frc::Wait(2 * kSolenoidDelayTime);
EXPECT_TRUE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn off";
EXPECT_TRUE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn off";
EXPECT_FALSE(solenoid1.Get()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.Get()) << "Solenoid #2 did not read off";
EXPECT_FALSE(solenoid1.IsOn()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.IsOn()) << "Solenoid #2 did not read off";

// Pulse both Solenoids on
solenoid1.SetPulseDuration(2 * kSolenoidDelayTime);
Expand All @@ -194,13 +194,13 @@ TEST_F(PCMTest, OneShot) {
frc::Wait(kSolenoidDelayTime);
EXPECT_FALSE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn on";
EXPECT_FALSE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn on";
EXPECT_TRUE(solenoid1.Get()) << "Solenoid #1 did not read on";
EXPECT_TRUE(solenoid2.Get()) << "Solenoid #2 did not read on";
EXPECT_TRUE(solenoid1.IsOn()) << "Solenoid #1 did not read on";
EXPECT_TRUE(solenoid2.IsOn()) << "Solenoid #2 did not read on";
frc::Wait(2 * kSolenoidDelayTime);
EXPECT_TRUE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn off";
EXPECT_TRUE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn off";
EXPECT_FALSE(solenoid1.Get()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.Get()) << "Solenoid #2 did not read off";
EXPECT_FALSE(solenoid1.IsOn()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.IsOn()) << "Solenoid #2 did not read off";

// Pulse both Solenoids on with different durations
solenoid1.SetPulseDuration(1.5 * kSolenoidDelayTime);
Expand All @@ -210,16 +210,16 @@ TEST_F(PCMTest, OneShot) {
frc::Wait(kSolenoidDelayTime);
EXPECT_FALSE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn on";
EXPECT_FALSE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn on";
EXPECT_TRUE(solenoid1.Get()) << "Solenoid #1 did not read on";
EXPECT_TRUE(solenoid2.Get()) << "Solenoid #2 did not read on";
EXPECT_TRUE(solenoid1.IsOn()) << "Solenoid #1 did not read on";
EXPECT_TRUE(solenoid2.IsOn()) << "Solenoid #2 did not read on";
frc::Wait(kSolenoidDelayTime);
EXPECT_TRUE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn off";
EXPECT_FALSE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn on";
EXPECT_FALSE(solenoid1.Get()) << "Solenoid #1 did not read off";
EXPECT_TRUE(solenoid2.Get()) << "Solenoid #2 did not read on";
EXPECT_FALSE(solenoid1.IsOn()) << "Solenoid #1 did not read off";
EXPECT_TRUE(solenoid2.IsOn()) << "Solenoid #2 did not read on";
frc::Wait(2 * kSolenoidDelayTime);
EXPECT_TRUE(m_fakeSolenoid1.Get()) << "Solenoid #1 did not turn off";
EXPECT_TRUE(m_fakeSolenoid2.Get()) << "Solenoid #2 did not turn off";
EXPECT_FALSE(solenoid1.Get()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.Get()) << "Solenoid #2 did not read off";
EXPECT_FALSE(solenoid1.IsOn()) << "Solenoid #1 did not read off";
EXPECT_FALSE(solenoid2.IsOn()) << "Solenoid #2 did not read off";
}

0 comments on commit d3d0f53

Please sign in to comment.