mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Major formatting changes (breaks diffs). No code changes.
The changes made in this commit do not affect any actual code,
they are purely aesthetic. I ran clang-format with google style
over all .h/.cpp files in wpilibc that weren't in wpilibC++Sim
or gtest, and the eclipse formatter over all of the Java files
using the Google eclipse formatting configuration.
Change-Id: I9627bca0bc103c398ecc1c5ba17467193291ae63
This commit is contained in:
@@ -9,31 +9,29 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "TestBench.h"
|
||||
|
||||
|
||||
unsigned notifierCounter;
|
||||
|
||||
void notifierHandler(void *)
|
||||
{
|
||||
notifierCounter++;
|
||||
}
|
||||
void notifierHandler(void *) { notifierCounter++; }
|
||||
|
||||
/**
|
||||
* Test if the Wait function works
|
||||
*/
|
||||
TEST(NotifierTest, DISABLED_TestTimerNotifications) {
|
||||
std::cout << "NotifierTest..." << std::endl;
|
||||
notifierCounter = 0;
|
||||
std::cout << "notifier(notifierHandler, NULL)..." << std::endl;
|
||||
Notifier notifier(notifierHandler, NULL);
|
||||
std::cout << "Start Periodic..." << std::endl;
|
||||
notifier.StartPeriodic(1.0);
|
||||
std::cout << "NotifierTest..." << std::endl;
|
||||
notifierCounter = 0;
|
||||
std::cout << "notifier(notifierHandler, NULL)..." << std::endl;
|
||||
Notifier notifier(notifierHandler, NULL);
|
||||
std::cout << "Start Periodic..." << std::endl;
|
||||
notifier.StartPeriodic(1.0);
|
||||
|
||||
std::cout << "Wait..." << std::endl;
|
||||
Wait(10.5);
|
||||
std::cout << "...Wait" << std::endl;
|
||||
std::cout << "Wait..." << std::endl;
|
||||
Wait(10.5);
|
||||
std::cout << "...Wait" << std::endl;
|
||||
|
||||
EXPECT_EQ(10u, notifierCounter) << "Received " << notifierCounter << " notifications in 10.5 seconds";
|
||||
std::cout << "Received " << notifierCounter << " notifications in 10.5 seconds";
|
||||
EXPECT_EQ(10u, notifierCounter) << "Received " << notifierCounter
|
||||
<< " notifications in 10.5 seconds";
|
||||
std::cout << "Received " << notifierCounter
|
||||
<< " notifications in 10.5 seconds";
|
||||
|
||||
std::cout << "...NotifierTest" << std::endl;
|
||||
std::cout << "...NotifierTest" << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user