This repository has been archived by the owner on Sep 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
How To: Unit Testing
gokuldharan edited this page Oct 6, 2018
·
5 revisions
The following steps will ensure that code can be thoroughly tested independent of the hardware it will be running on.
- Add source file (e.g. newInterface.cpp) under Common/ that does not depend on any board-specific drivers.
- Write a test source file using the GoogleTest/GoogleMock framework add it under Common/test.
- Navigate to the new source and test files within the linked resources to Common/ in RobotTest and uncheck "Exclude resource from build" under Properties->C/C++ Build->Settings for all relevant configurations.
- Run Unit Tests under all configurations (eg. Test_F4 and Test_F7) to ensure the new code is portable to all required hardware options.