Collection of small Examples regarding GoogleTest
Build instruction:
mkdir build
cd build
cmake ..
make -j
GoogleTest-Playground gives a really quick (and not even close complete) introduction to googleTest. Covers the following topics with easy to understand examples:
- assertOnException: How to handle exceptions with googleTest
- assertOnString: How to properly use googleTest when evaluating strings
- assertOnVectors: How to properly evaluate vectors
- mockingExample: How to mock classes if it is needed to split up dependencies to other classes
- parametrizedTest: Create tests with multiply inputs
- testFixtures: Fixtures help us to set up test classes more quickly to prevent unnecessary bloat code.