Forums
matrix4_test fails [SOLVED] - Printable Version

+- Forums (https://www.vdrift.net/Forum)
+-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4)
+--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9)
+--- Thread: matrix4_test fails [SOLVED] (/showthread.php?tid=1405)



matrix4_test fails [SOLVED] - thelusiv - 12-17-2010

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 -------------]



- joevenzon - 12-17-2010

That was a bad unit test. I don't think it ever passed. :-( Fixed in R2989.