diff options
author | Dave SIMmONs <simon@lindenlab.com> | 2011-05-02 09:05:56 -0700 |
---|---|---|
committer | Dave SIMmONs <simon@lindenlab.com> | 2011-05-02 09:05:56 -0700 |
commit | f393774caf49313f24d33cb2b33b6ad92c70977f (patch) | |
tree | ebdaf44b4c3152362f3e9b18c227bd09d39031d5 /indra/llmath/tests | |
parent | 31e16be0daa10e6d66b133c308130524a7a0d881 (diff) | |
parent | b9bb792c478d703c6442351ecb563c0a67f77111 (diff) |
Merge from lindenlab/viewer-development
Diffstat (limited to 'indra/llmath/tests')
-rw-r--r-- | indra/llmath/tests/llbbox_test.cpp | 2 | ||||
-rw-r--r-- | indra/llmath/tests/m3math_test.cpp | 26 |
2 files changed, 20 insertions, 8 deletions
diff --git a/indra/llmath/tests/llbbox_test.cpp b/indra/llmath/tests/llbbox_test.cpp index 8064ab217d..fd0dbb58fc 100644 --- a/indra/llmath/tests/llbbox_test.cpp +++ b/indra/llmath/tests/llbbox_test.cpp @@ -34,7 +34,7 @@ #define ANGLE (3.14159265f / 2.0f) -#define APPROX_EQUAL(a, b) dist_vec((a),(b)) < 1e-5 +#define APPROX_EQUAL(a, b) (dist_vec_squared((a),(b)) < 1e-10) namespace tut { diff --git a/indra/llmath/tests/m3math_test.cpp b/indra/llmath/tests/m3math_test.cpp index e4d31996a3..1ca2b005d9 100644 --- a/indra/llmath/tests/m3math_test.cpp +++ b/indra/llmath/tests/m3math_test.cpp @@ -37,6 +37,16 @@ #include "../test/lltut.h" +#if LL_WINDOWS +// disable unreachable code warnings caused by usage of skip. +#pragma warning(disable: 4702) +#endif + +#if LL_WINDOWS +// disable unreachable code warnings caused by usage of skip. +#pragma warning(disable: 4702) +#endif + namespace tut { struct m3math_test @@ -277,19 +287,21 @@ namespace tut LLVector3 llvec2(1, 2, 0); LLVector3 llvec3(2, 4, 2); + skip("This test fails depending on architecture. Need to fix comparison operation, is_approx_equal, to work on more than one platform."); + llmat_obj.setRows(llvec1, llvec2, llvec3); llmat_obj.orthogonalize(); ensure("LLMatrix3::orthogonalize failed ", - is_approx_equal(0.19611613f, llmat_obj.mMatrix[0][0]) && + is_approx_equal(0.19611614f, llmat_obj.mMatrix[0][0]) && is_approx_equal(0.78446454f, llmat_obj.mMatrix[0][1]) && - is_approx_equal(0.58834839f, llmat_obj.mMatrix[0][2]) && - is_approx_equal(0.47628206f, llmat_obj.mMatrix[1][0]) && - is_approx_equal(0.44826555f, llmat_obj.mMatrix[1][1]) && - is_approx_equal(-0.75644791f, llmat_obj.mMatrix[1][2]) && - is_approx_equal(-0.85714287f, llmat_obj.mMatrix[2][0]) && + is_approx_equal(0.58834841f, llmat_obj.mMatrix[0][2]) && + is_approx_equal(0.47628204f, llmat_obj.mMatrix[1][0]) && + is_approx_equal(0.44826545f, llmat_obj.mMatrix[1][1]) && + is_approx_equal(-0.75644795f, llmat_obj.mMatrix[1][2]) && + is_approx_equal(-0.85714286f, llmat_obj.mMatrix[2][0]) && is_approx_equal(0.42857143f, llmat_obj.mMatrix[2][1]) && - is_approx_equal(-0.28571427f, llmat_obj.mMatrix[2][2])); + is_approx_equal(-0.28571429f, llmat_obj.mMatrix[2][2])); } //test case for adjointTranspose() fn. |