Add support for unit testing from GradleRIO for C++ projects (#1094)

In order for this to properly work, we need to remove the main code.
Then the test component will actually have the main in it.  Example tests will be added later.
This commit is contained in:
Thad House
2018-05-27 23:07:03 -07:00
committed by Peter Johnson
parent 938f835142
commit 8d218dbca4
4 changed files with 8 additions and 0 deletions

View File

@@ -72,4 +72,6 @@ void Robot::TeleopPeriodic() { frc::Scheduler::GetInstance()->Run(); }
void Robot::TestPeriodic() {}
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -55,4 +55,6 @@ void Robot::TeleopPeriodic() {}
void Robot::TestPeriodic() {}
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -87,4 +87,6 @@ void Robot::OperatorControl() {
*/
void Robot::Test() {}
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -55,4 +55,6 @@ void Robot::TeleopPeriodic() {}
void Robot::TestPeriodic() {}
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif