mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Add delays to make C++ ITs more reliable
Also disable PCM tests until it's actually wired right Change-Id: I431031f66aaaa87fa201e577fedef5a1952c1bb4
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "TestBench.h"
|
||||
|
||||
static const double kCounterTime = 0.001;
|
||||
|
||||
static const double kDelayTime = 0.1;
|
||||
|
||||
static const double kSynchronousInterruptTime = 2.0;
|
||||
@@ -70,11 +72,11 @@ TEST_F(DIOLoopTest, FakeCounter) {
|
||||
/* Count 100 ticks. The counter value should be 100 after this loop. */
|
||||
for(int i = 0; i < 100; i++) {
|
||||
m_output->Set(true);
|
||||
Wait(kCounterTime);
|
||||
m_output->Set(false);
|
||||
Wait(kCounterTime);
|
||||
}
|
||||
|
||||
Wait(kDelayTime);
|
||||
|
||||
EXPECT_EQ(100, counter.Get()) << "Counter did not count up to 100.";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user