The TrigMath.h
file has been in production for a long time now, and proven to be a reliable library. We want to get it properly tested, as we want to make some changes in the future.
The goal here is to get 100% of the lines unit-tested in the code TrigMath.h
.
In Test.cpp
, we have written the first test for you. Warning: It does not pass.
Get it to pass. Then write some more tests. You should never be changing anything in TrigMath.h
.
It is highly suggested that you use some form of code coverage tool in the editor, so that you can see what your next step is.
TODO Add background on NaN
CHECK(std::isnan(NAN));
- TODO Add more info
- Install OpenCppCoverage from the Market Place
- TODO Add more info
These are the two commands I run to on my computer
/Applications/CLion.app/Contents/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/llewellyn/Github/TestingFunctionalCodeKata.cpp
./cmake-build-debug/tests/TestingFunctionalCodeKataTests