Forums

Full Version: matrix4_test fails [SOLVED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to write some unit tests for my branch soon, so I started poking around at the unit testing setup. I wrote a build alias for SCons, so now you can just do
Code:
scons test
which will use the already built objects (minus main.cpp, plus unittest.cpp which just contains a main() to run the tests) to create an executable build/vdrift-test. Wiki page here:
http://wiki.vdrift.net/Testing

Then I ran the tests and what do you know, one of them failed:
Code:
[-------------- RUNNING UNIT TESTS --------------]
src/matrix4.cpp(26): 'matrix4_test' FAILED: value1 (1) should be close to value2 (0)
src/matrix4.cpp(27): 'matrix4_test' FAILED: value1 (10) should be close to value2 (20)
src/matrix4.cpp(28): 'matrix4_test' FAILED: value1 (-1.19209e-07) should be close to value2 (-1)
src/matrix4.cpp(33): 'matrix4_test' FAILED: value1 (1) should be close to value2 (0)
src/matrix4.cpp(34): 'matrix4_test' FAILED: value1 (10) should be close to value2 (0)
src/matrix4.cpp(35): 'matrix4_test' FAILED: value1 (-1.19209e-07) should be close to value2 (1)
Results: 29 succeeded, 1 failed
[-------------- UNIT TESTS FINISHED -------------]
That was a bad unit test. I don't think it ever passed. :-( Fixed in R2989.