mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
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:
committed by
Peter Johnson
parent
938f835142
commit
8d218dbca4
@@ -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
|
||||
|
||||
@@ -55,4 +55,6 @@ void Robot::TeleopPeriodic() {}
|
||||
|
||||
void Robot::TestPeriodic() {}
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -87,4 +87,6 @@ void Robot::OperatorControl() {
|
||||
*/
|
||||
void Robot::Test() {}
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
@@ -55,4 +55,6 @@ void Robot::TeleopPeriodic() {}
|
||||
|
||||
void Robot::TestPeriodic() {}
|
||||
|
||||
#ifndef RUNNING_FRC_TESTS
|
||||
int main() { return frc::StartRobot<Robot>(); }
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user