mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
[wpilibc] Clean up integration tests (#3400)
The command and shuffleboard integration tests were removed because their unit tests counterparts already provide adequate coverage. Java already removed these.
This commit is contained in:
@@ -14,20 +14,18 @@
|
||||
#define EXPECT_NEAR_UNITS(val1, val2, eps) \
|
||||
EXPECT_LE(units::math::abs(val1 - val2), eps)
|
||||
|
||||
using namespace frc;
|
||||
|
||||
/**
|
||||
* Test if the WaitForData function works
|
||||
*/
|
||||
TEST(DriverStationTest, WaitForData) {
|
||||
units::microsecond_t initialTime(RobotController::GetFPGATime());
|
||||
units::microsecond_t initialTime(frc::RobotController::GetFPGATime());
|
||||
|
||||
// 20ms waiting intervals * 50 = 1s
|
||||
for (int i = 0; i < 50; i++) {
|
||||
DriverStation::GetInstance().WaitForData();
|
||||
frc::DriverStation::GetInstance().WaitForData();
|
||||
}
|
||||
|
||||
units::microsecond_t finalTime(RobotController::GetFPGATime());
|
||||
units::microsecond_t finalTime(frc::RobotController::GetFPGATime());
|
||||
|
||||
EXPECT_NEAR_UNITS(1_s, finalTime - initialTime, 200_ms);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user