Graham Pentheny 512ec1fdfd Unit testing framework.
* Tests live in a "Tests" folder alongside the other components.  Inside the "Tests" folder, tests are split into folders by the component they test.  For example, the example unit test of "rcVdot" (which is implmemented in Recast/Recast.h) lives in "Tests/Recast/Tests_Recast.h".
* Uses the Catch testing framework
* One example test of "rcVdot"
* Tests are run on Travis and Appveyor after every build.  Failing unit tests will fail the build in both case.
* Added instructions on running unit tests to the readme
2016-01-06 18:22:39 -05:00

15 lines
213 B
C++

#include "catch.hpp"
#include "Recast.h"
TEST_CASE("rcVdot")
{
SECTION("Dot normalized vector with itself")
{
float v1[] = { 1, 0, 0 };
float result = rcVdot(v1, v1);
REQUIRE(result == Approx(1));
}
}