Commit 944b00d0 authored by hybrid's avatar hybrid

Add some more tests docs, and revert some value changes which need different treatment.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2851 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9af18d89
......@@ -41,7 +41,7 @@ static bool doTests()
COMPARE_VECTORS(vec, vector2d<T>(0, (T)7.0710678118654755));
vec.normalize();
COMPARE_VECTORS(vec, vector2d<T>(0, (T)1.0));
COMPARE_VECTORS(vec, vector2d<T>(0, (T)1.0000000461060017));
vec.set(10, 10);
vector2d<T> center(5, 5);
......@@ -52,12 +52,12 @@ static bool doTests()
vec.set(5, 5);
vec.normalize();
COMPARE_VECTORS(vec, vector2d<T>((T)0.7071067811865476, (T)0.7071067811865476));
COMPARE_VECTORS(vec, vector2d<T>((T)0.7071068137884140, (T)0.7071068137884140));
vec.set(5, 5);
otherVec.set(10, 20);
logTestString("vector2df interpolation\n");
logTestString("vector2d interpolation\n");
vector2d<T> interpolated;
(void)interpolated.interpolate(vec, otherVec, 0.f);
COMPARE_VECTORS(interpolated, otherVec); // 0.f means all the second vector
......@@ -85,7 +85,7 @@ static bool doTests()
COMPARE_VECTORS(interpolated, vec); // 1.f means all the first vector
logTestString("vector2df quadratic interpolation\n");
logTestString("vector2d quadratic interpolation\n");
vector2d<T> thirdVec(20, 10);
interpolated = vec.getInterpolated_quadratic(otherVec, thirdVec, 0.f);
COMPARE_VECTORS(interpolated, vec); // 0.f means all the 1st vector
......@@ -103,7 +103,7 @@ static bool doTests()
COMPARE_VECTORS(interpolated, thirdVec); // 1.f means all the 3rd vector
// check if getAngle returns values matching those of the double precision version
logTestString("vector2df getAngle\n");
logTestString("vector2d getAngle\n");
for (s32 i=0; i<200; ++i)
{
core::vector2d<T> tmp((T)-1, (T)(-100+i));
......
Test suite pass at GMT Thu Nov 12 17:56:52 2009
Test suite pass at GMT Thu Nov 12 19:48:37 2009
......@@ -56,7 +56,7 @@ linked to it.
Logging
=======
Please use logTestString() to log any intersting output or fails from your test. This is declared in
Please use logTestString() to log any interesting output or fails from your test. This is declared in
tests/testUtils.h. Its output goes to tests/tests.log
......@@ -73,8 +73,8 @@ introduce artifacts and false fails.
Optionally, you can specify the amount of match that is required between the produced screenshot and
the reference image. While the images should match exactly, we have found that OpenGL implementations
can vary significantly across test machines, so a default 99% match (of total colour values across all
pixels) is assumed. You may have to go as low as 98% for some images, but please try to err on the side
can vary significantly across test machines, often around 99% match (of total colour values across all
pixels). You may have to go as low as 98% for some images, but please try to err on the side
of strictness until we can determine that your test image needs to be fuzzier on other peoples' machines.
If takeScreenshotAndCompareAgainstReference() can't find an existing reference image, it will create
......@@ -117,4 +117,11 @@ Irrlicht need updated), then please do raise the issue in the bug forum:
http://irrlicht.sourceforge.net/phpBB2/viewforum.php?f=7
We do want to hear about fails, and will thank you for finding them.
\ No newline at end of file
We do want to hear about fails, and will thank you for finding them.
Running specific tests
======================
The app takes two parameters. First is the test to start with (starting at 0 anddefaulting to 0), the second is the number of tests to run (beginning with the one given as first parameter). If the second parameter is not given, all existing tests are run (again starting with the first parameter). So, starting the test suite without a parameter will really run all tests.
Another special parameter is '--list', which outputs a list of all existing tests and their respective number.
For debugging purposes it can make sense to run a test without spawning a separate process for each test case. This can be switched off by a boolean flag in main.cpp ('spawn=false').
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment