- Link to GTest Primer Click here!
- Find the directory for the component/subsystem you would like to test, if it does not exist, create one
- Create a file
Test_<Thing you would like to test>.cpp
- Add your file as a source in CMakeLists.txt
- Write your tests. Follow the test template if needed
/**
* Author:
*/
#include <gtest/gtest.h>
TEST(ExampleTest, VerifyWorkingGTest){
EXPECT_NE(1,0);
EXPECT_GE(1,1);
EXPECT_GE(1,0);
EXPECT_LE(1,1);
EXPECT_LE(0,1);
ASSERT_EQ(0,0);
}
Running ./deploy.sh
automatically runs a coverage report. Open pod-embedded/coverage/coverage-report.html
in a web browser to view a full report.