Make C++ examples able to run GradleRIO unit tests (#1490)

Closes #1484
This commit is contained in:
Thad House
2018-12-17 09:26:21 -08:00
committed by Peter Johnson
parent d84240d8e9
commit 6e8f8be370
21 changed files with 42 additions and 0 deletions

View File

@@ -27,4 +27,6 @@ class Robot : public frc::TimedRobot {
}
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -60,4 +60,6 @@ class Robot : public frc::TimedRobot {
}
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -37,4 +37,6 @@ class Robot : public frc::TimedRobot {
frc::PowerDistributionPanel m_pdp;
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -80,4 +80,6 @@ class Robot : public frc::TimedRobot {
frc::Encoder m_encoder{1, 2, false, frc::Encoder::k4X};
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -42,4 +42,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 @@ class Robot : public frc::TimedRobot {
frc::Timer m_timer;
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -55,4 +55,6 @@ class Robot : public frc::TimedRobot {
frc::Joystick m_joystick{kJoystickPort};
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -58,4 +58,6 @@ class Robot : public frc::TimedRobot {
frc::Joystick m_joystick{kJoystickPort};
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -30,4 +30,6 @@ class Robot : public frc::TimedRobot {
frc::XboxController m_hid{0};
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -73,4 +73,6 @@ class Robot : public frc::TimedRobot {
}
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -48,4 +48,6 @@ class Robot : public frc::TimedRobot {
frc::Joystick m_stick{kJoystickChannel};
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -26,4 +26,6 @@ class Robot : public frc::TimedRobot {
frc::Spark m_motor{0};
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -48,4 +48,6 @@ class Robot : public frc::TimedRobot {
frc::Encoder m_encoder{0, 1};
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -80,4 +80,6 @@ void Robot::Log() {
drivetrain.GetRightEncoder().GetDistance());
}
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -73,4 +73,6 @@ class Robot : public frc::TimedRobot {
constexpr std::array<double, 3> Robot::kSetPoints;
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -27,4 +27,6 @@ class Robot : public frc::TimedRobot {
}
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -55,4 +55,6 @@ class Robot : public frc::TimedRobot {
static constexpr int kRelayReverseButton = 2;
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -79,4 +79,6 @@ class Robot : public frc::TimedRobot {
nt::NetworkTableEntry m_maxSpeed;
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -67,4 +67,6 @@ class Robot : public frc::TimedRobot {
static constexpr int kDoubleSolenoidReverse = 3;
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -50,4 +50,6 @@ class Robot : public frc::TimedRobot {
frc::DifferentialDrive m_robotDrive{m_left, m_right};
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@@ -80,4 +80,6 @@ class Robot : public frc::TimedRobot {
frc::PIDController m_pidController{kP, kI, kD, m_ultrasonic, m_pidOutput};
};
#ifndef RUNNING_FRC_TESTS
int main() { return frc::StartRobot<Robot>(); }
#endif