aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/test/v2math_tut.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/test/v2math_tut.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/linden/indra/test/v2math_tut.cpp b/linden/indra/test/v2math_tut.cpp
index 0765989..cb9da6e 100644
--- a/linden/indra/test/v2math_tut.cpp
+++ b/linden/indra/test/v2math_tut.cpp
@@ -4,7 +4,9 @@
4 * @date 2007-02 4 * @date 2007-02
5 * @brief v2math test cases. 5 * @brief v2math test cases.
6 * 6 *
7 * Copyright (c) 2007-2007, Linden Research, Inc. 7 * $LicenseInfo:firstyear=2007&license=viewergpl$
8 *
9 * Copyright (c) 2007, Linden Research, Inc.
8 * 10 *
9 * Second Life Viewer Source Code 11 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 12 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -26,11 +28,13 @@
26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 28 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 29 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28 * COMPLETENESS OR PERFORMANCE. 30 * COMPLETENESS OR PERFORMANCE.
31 * $/LicenseInfo$
29 */ 32 */
30 33
31#include <tut/tut.h> 34#include <tut/tut.h>
32#include "lltut.h" 35
33#include "linden_common.h" 36#include "linden_common.h"
37#include "lltut.h"
34#include "v2math.h" 38#include "v2math.h"
35 39
36 40
@@ -261,9 +265,6 @@ namespace tut
261 template<> template<> 265 template<> template<>
262 void v2math_object::test<13>() 266 void v2math_object::test<13>()
263 { 267 {
264#if (LL_RELEASE && LL_LINUX)
265 skip_fail("Doesn't work under Linux -- FIX ME!");
266#endif
267 F32 x1 = 1.f, y1 = 2.f,x2 = 2.332f, y2 = -1.23f; 268 F32 x1 = 1.f, y1 = 2.f,x2 = 2.332f, y2 = -1.23f;
268 F32 val1, val2; 269 F32 val1, val2;
269 LLVector2 vec2(x1, y1), vec3(x2, y2); 270 LLVector2 vec2(x1, y1), vec3(x2, y2);
@@ -292,7 +293,7 @@ namespace tut
292 vec2 -=vec3; 293 vec2 -=vec3;
293 val1 = x1-x2; 294 val1 = x1-x2;
294 val2 = y1-y2; 295 val2 = y1-y2;
295 ensure("4:operator-= failed",(val1 == vec2.mV[VX]) && (val2 == vec2.mV[VY])); 296 ensure("4:operator-= failed", is_approx_equal(val1, vec2.mV[VX]) && is_approx_equal(val2, vec2.mV[VY]));
296 } 297 }
297 298
298 template<> template<> 299 template<> template<>
@@ -431,10 +432,6 @@ namespace tut
431 template<> template<> 432 template<> template<>
432 void v2math_object::test<23>() 433 void v2math_object::test<23>()
433 { 434 {
434#if (LL_RELEASE && LL_LINUX)
435 skip_fail("Doesn't work under Linux -- FIX ME!");
436#endif
437
438 F32 x1 =1.f, y1 = 2.f; 435 F32 x1 =1.f, y1 = 2.f;
439 F32 val1, val2; 436 F32 val1, val2;
440 LLVector2 vec2(x1, y1); 437 LLVector2 vec2(x1, y1);
@@ -446,7 +443,7 @@ namespace tut
446 val1 = x1 * oomag; 443 val1 = x1 * oomag;
447 val2 = y1 * oomag; 444 val2 = y1 * oomag;
448 445
449 ensure("normVec failed", val1 == vec2.mV[VX] && val2 == vec2.mV[VY] && vecMag == mag); 446 ensure("normVec failed", is_approx_equal(val1, vec2.mV[VX]) && is_approx_equal(val2, vec2.mV[VY]) && is_approx_equal(vecMag, mag));
450 447
451 x1 =.00000001f, y1 = 0.f; 448 x1 =.00000001f, y1 = 0.f;
452 449