summaryrefslogtreecommitdiff
path: root/indra/llmath/tests
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/tests')
-rw-r--r--indra/llmath/tests/llbbox_test.cpp20
-rw-r--r--indra/llmath/tests/llrect_test.cpp28
-rw-r--r--indra/llmath/tests/mathmisc_test.cpp2
-rw-r--r--indra/llmath/tests/v2math_test.cpp14
-rw-r--r--indra/llmath/tests/v3color_test.cpp2
-rw-r--r--indra/llmath/tests/v3dmath_test.cpp20
-rw-r--r--indra/llmath/tests/v3math_test.cpp24
-rw-r--r--indra/llmath/tests/v4color_test.cpp60
-rw-r--r--indra/llmath/tests/v4coloru_test.cpp74
-rw-r--r--indra/llmath/tests/v4math_test.cpp8
-rw-r--r--indra/llmath/tests/xform_test.cpp6
11 files changed, 129 insertions, 129 deletions
diff --git a/indra/llmath/tests/llbbox_test.cpp b/indra/llmath/tests/llbbox_test.cpp
index 1f2cd96ab2..bd6bd9e4b0 100644
--- a/indra/llmath/tests/llbbox_test.cpp
+++ b/indra/llmath/tests/llbbox_test.cpp
@@ -340,11 +340,11 @@ namespace tut
LLBBox bbox1(LLVector3(1.0f, 1.0f, 1.0f), LLQuaternion(),
LLVector3(1.0f, 2.0f, 3.0f), LLVector3(3.0f, 4.0f, 5.0f));
- ensure("containsPointLocal(0,0,0)", bbox1.containsPointLocal(LLVector3(0.0f, 0.0f, 0.0f)) == FALSE);
- ensure("containsPointLocal(1,2,3)", bbox1.containsPointLocal(LLVector3(1.0f, 2.0f, 3.0f)) == TRUE);
- ensure("containsPointLocal(0.999,2,3)", bbox1.containsPointLocal(LLVector3(0.999f, 2.0f, 3.0f)) == FALSE);
- ensure("containsPointLocal(3,4,5)", bbox1.containsPointLocal(LLVector3(3.0f, 4.0f, 5.0f)) == TRUE);
- ensure("containsPointLocal(3,4,5.001)", bbox1.containsPointLocal(LLVector3(3.0f, 4.0f, 5.001f)) == FALSE);
+ ensure("containsPointLocal(0,0,0)", bbox1.containsPointLocal(LLVector3(0.0f, 0.0f, 0.0f)) == false);
+ ensure("containsPointLocal(1,2,3)", bbox1.containsPointLocal(LLVector3(1.0f, 2.0f, 3.0f)) == true);
+ ensure("containsPointLocal(0.999,2,3)", bbox1.containsPointLocal(LLVector3(0.999f, 2.0f, 3.0f)) == false);
+ ensure("containsPointLocal(3,4,5)", bbox1.containsPointLocal(LLVector3(3.0f, 4.0f, 5.0f)) == true);
+ ensure("containsPointLocal(3,4,5.001)", bbox1.containsPointLocal(LLVector3(3.0f, 4.0f, 5.001f)) == false);
}
template<> template<>
@@ -357,11 +357,11 @@ namespace tut
LLBBox bbox1(LLVector3(1.0f, 1.0f, 1.0f), LLQuaternion(),
LLVector3(1.0f, 2.0f, 3.0f), LLVector3(3.0f, 4.0f, 5.0f));
- ensure("containsPointAgent(0,0,0)", bbox1.containsPointAgent(LLVector3(0.0f, 0.0f, 0.0f)) == FALSE);
- ensure("containsPointAgent(2,3,4)", bbox1.containsPointAgent(LLVector3(2.0f, 3.0f, 4.0f)) == TRUE);
- ensure("containsPointAgent(2,2.999,4)", bbox1.containsPointAgent(LLVector3(2.0f, 2.999f, 4.0f)) == FALSE);
- ensure("containsPointAgent(4,5,6)", bbox1.containsPointAgent(LLVector3(4.0f, 5.0f, 6.0f)) == TRUE);
- ensure("containsPointAgent(4,5.001,6)", bbox1.containsPointAgent(LLVector3(4.0f, 5.001f, 6.0f)) == FALSE);
+ ensure("containsPointAgent(0,0,0)", bbox1.containsPointAgent(LLVector3(0.0f, 0.0f, 0.0f)) == false);
+ ensure("containsPointAgent(2,3,4)", bbox1.containsPointAgent(LLVector3(2.0f, 3.0f, 4.0f)) == true);
+ ensure("containsPointAgent(2,2.999,4)", bbox1.containsPointAgent(LLVector3(2.0f, 2.999f, 4.0f)) == false);
+ ensure("containsPointAgent(4,5,6)", bbox1.containsPointAgent(LLVector3(4.0f, 5.0f, 6.0f)) == true);
+ ensure("containsPointAgent(4,5.001,6)", bbox1.containsPointAgent(LLVector3(4.0f, 5.001f, 6.0f)) == false);
}
}
diff --git a/indra/llmath/tests/llrect_test.cpp b/indra/llmath/tests/llrect_test.cpp
index ca042a60d7..0fd5602d4a 100644
--- a/indra/llmath/tests/llrect_test.cpp
+++ b/indra/llmath/tests/llrect_test.cpp
@@ -471,13 +471,13 @@ namespace tut
LLRectf rect(1.0f, 3.0f, 3.0f, 1.0f);
- ensure("(0,0) not in rect", rect.pointInRect(0.0f, 0.0f) == FALSE);
- ensure("(2,2) in rect", rect.pointInRect(2.0f, 2.0f) == TRUE);
- ensure("(1,1) in rect", rect.pointInRect(1.0f, 1.0f) == TRUE);
- ensure("(3,3) not in rect", rect.pointInRect(3.0f, 3.0f) == FALSE);
- ensure("(2.999,2.999) in rect", rect.pointInRect(2.999f, 2.999f) == TRUE);
- ensure("(2.999,3.0) not in rect", rect.pointInRect(2.999f, 3.0f) == FALSE);
- ensure("(3.0,2.999) not in rect", rect.pointInRect(3.0f, 2.999f) == FALSE);
+ ensure("(0,0) not in rect", rect.pointInRect(0.0f, 0.0f) == false);
+ ensure("(2,2) in rect", rect.pointInRect(2.0f, 2.0f) == true);
+ ensure("(1,1) in rect", rect.pointInRect(1.0f, 1.0f) == true);
+ ensure("(3,3) not in rect", rect.pointInRect(3.0f, 3.0f) == false);
+ ensure("(2.999,2.999) in rect", rect.pointInRect(2.999f, 2.999f) == true);
+ ensure("(2.999,3.0) not in rect", rect.pointInRect(2.999f, 3.0f) == false);
+ ensure("(3.0,2.999) not in rect", rect.pointInRect(3.0f, 2.999f) == false);
}
template<> template<>
@@ -489,13 +489,13 @@ namespace tut
LLRectf rect(1.0f, 3.0f, 3.0f, 1.0f);
- ensure("(0,0) in local rect", rect.localPointInRect(0.0f, 0.0f) == TRUE);
- ensure("(-0.0001,-0.0001) not in local rect", rect.localPointInRect(-0.0001f, -0.001f) == FALSE);
- ensure("(1,1) in local rect", rect.localPointInRect(1.0f, 1.0f) == TRUE);
- ensure("(2,2) not in local rect", rect.localPointInRect(2.0f, 2.0f) == FALSE);
- ensure("(1.999,1.999) in local rect", rect.localPointInRect(1.999f, 1.999f) == TRUE);
- ensure("(1.999,2.0) not in local rect", rect.localPointInRect(1.999f, 2.0f) == FALSE);
- ensure("(2.0,1.999) not in local rect", rect.localPointInRect(2.0f, 1.999f) == FALSE);
+ ensure("(0,0) in local rect", rect.localPointInRect(0.0f, 0.0f) == true);
+ ensure("(-0.0001,-0.0001) not in local rect", rect.localPointInRect(-0.0001f, -0.001f) == false);
+ ensure("(1,1) in local rect", rect.localPointInRect(1.0f, 1.0f) == true);
+ ensure("(2,2) not in local rect", rect.localPointInRect(2.0f, 2.0f) == false);
+ ensure("(1.999,1.999) in local rect", rect.localPointInRect(1.999f, 1.999f) == true);
+ ensure("(1.999,2.0) not in local rect", rect.localPointInRect(1.999f, 2.0f) == false);
+ ensure("(2.0,1.999) not in local rect", rect.localPointInRect(2.0f, 1.999f) == false);
}
template<> template<>
diff --git a/indra/llmath/tests/mathmisc_test.cpp b/indra/llmath/tests/mathmisc_test.cpp
index 5ffe1d6e4f..2b23987616 100644
--- a/indra/llmath/tests/mathmisc_test.cpp
+++ b/indra/llmath/tests/mathmisc_test.cpp
@@ -454,7 +454,7 @@ namespace tut
template<> template<>
void line_object::test<1>()
{
- // this is a test for LLLine::intersects(point) which returns TRUE
+ // this is a test for LLLine::intersects(point) which returns true
// if the line passes within some tolerance of point
// these tests will have some floating point error,
diff --git a/indra/llmath/tests/v2math_test.cpp b/indra/llmath/tests/v2math_test.cpp
index f66142c6a7..860e3ef672 100644
--- a/indra/llmath/tests/v2math_test.cpp
+++ b/indra/llmath/tests/v2math_test.cpp
@@ -93,15 +93,15 @@ namespace tut
{
F32 x =-2.0f, y = -3.0f ;
LLVector2 vec2(x,y);
- ensure_equals("abs():Fail", vec2.abs(), TRUE);
+ ensure_equals("abs():Fail", vec2.abs(), true);
ensure("abs() x", is_approx_equal(vec2.mV[VX], 2.f));
ensure("abs() y", is_approx_equal(vec2.mV[VY], 3.f));
- ensure("isNull():Fail ", FALSE == vec2.isNull()); //Returns TRUE if vector has a _very_small_ length
+ ensure("isNull():Fail ", false == vec2.isNull()); //Returns true if vector has a _very_small_ length
x =.00000001f, y = .000001001f;
vec2.setVec(x, y);
- ensure("isNull(): Fail ", TRUE == vec2.isNull());
+ ensure("isNull(): Fail ", true == vec2.isNull());
}
template<> template<>
@@ -111,12 +111,12 @@ namespace tut
LLVector2 vec2(x, y), vec3;
vec3 = vec3.scaleVec(vec2);
ensure("scaleVec: Fail ", vec3.mV[VX] == 0. && vec3.mV[VY] == 0.);
- ensure("isExactlyZero(): Fail", TRUE == vec3.isExactlyZero());
+ ensure("isExactlyZero(): Fail", true == vec3.isExactlyZero());
vec3.setVec(2.f, 1.f);
vec3 = vec3.scaleVec(vec2);
ensure("scaleVec: Fail ", (2.f == vec3.mV[VX]) && (2.f == vec3.mV[VY]));
- ensure("isExactlyZero():Fail", FALSE == vec3.isExactlyZero());
+ ensure("isExactlyZero():Fail", false == vec3.isExactlyZero());
}
template<> template<>
@@ -254,7 +254,7 @@ namespace tut
vec3.clearVec();
vec2.setVec(x1, y1);
vec3.setVec(vec2);
- ensure("2:operator!= failed", (FALSE == (vec2 != vec3)));
+ ensure("2:operator!= failed", (false == (vec2 != vec3)));
}
template<> template<>
void v2math_object::test<13>()
@@ -373,7 +373,7 @@ namespace tut
x1 = 1.0f, y1 = 2.0f, x2 = 1.0f, y2 = 3.2234f;
vec2.setVec(x1, y1);
vec3.setVec(x2, y2);
- ensure("2:operator < failed", (FALSE == (vec3 < vec2)));
+ ensure("2:operator < failed", (false == (vec3 < vec2)));
}
template<> template<>
diff --git a/indra/llmath/tests/v3color_test.cpp b/indra/llmath/tests/v3color_test.cpp
index d1baa53a9b..8897d48365 100644
--- a/indra/llmath/tests/v3color_test.cpp
+++ b/indra/llmath/tests/v3color_test.cpp
@@ -209,7 +209,7 @@ namespace tut
ensure("1:operator!= failed",(llcolor3 != llcolor3a));
llcolor3.setToBlack();
llcolor3a.setVec(llcolor3);
- ensure("2:operator!= failed", ( FALSE == (llcolor3a != llcolor3)));
+ ensure("2:operator!= failed", ( false == (llcolor3a != llcolor3)));
}
template<> template<>
diff --git a/indra/llmath/tests/v3dmath_test.cpp b/indra/llmath/tests/v3dmath_test.cpp
index 6b58cbd007..db08419012 100644
--- a/indra/llmath/tests/v3dmath_test.cpp
+++ b/indra/llmath/tests/v3dmath_test.cpp
@@ -128,15 +128,15 @@ namespace tut
LLVector3d vec3D(x,y,z);
vec3D.abs();
ensure("1:abs:Fail ", ((-x == vec3D.mdV[VX]) && (y == vec3D.mdV[VY]) && (-z == vec3D.mdV[VZ])));
- ensure("2:isNull():Fail ", (FALSE == vec3D.isNull()));
+ ensure("2:isNull():Fail ", (false == vec3D.isNull()));
vec3D.clearVec();
x =.00000001, y = .000001001, z = .000001001;
vec3D.setVec(x,y,z);
- ensure("3:isNull():Fail ", (TRUE == vec3D.isNull()));
- ensure("4:isExactlyZero():Fail ", (FALSE == vec3D.isExactlyZero()));
+ ensure("3:isNull():Fail ", (true == vec3D.isNull()));
+ ensure("4:isExactlyZero():Fail ", (false == vec3D.isExactlyZero()));
x =.0000000, y = .00000000, z = .00000000;
vec3D.setVec(x,y,z);
- ensure("5:isExactlyZero():Fail ", (TRUE == vec3D.isExactlyZero()));
+ ensure("5:isExactlyZero():Fail ", (true == vec3D.isExactlyZero()));
}
template<> template<>
@@ -353,7 +353,7 @@ namespace tut
{
F64 x1 = 1., y1 = 2., z1 = -1.1;
LLVector3d vec3D(x1,y1,z1), vec3Da;
- ensure("1:operator!= failed",(TRUE == (vec3D !=vec3Da)));
+ ensure("1:operator!= failed",(true == (vec3D !=vec3Da)));
vec3Da = vec3D;
ensure("2:operator== failed",(vec3D ==vec3Da));
vec3D.clearVec();
@@ -362,7 +362,7 @@ namespace tut
vec3D.setVec(x1,y1,z1);
vec3Da.setVec(x1,y1,z1);
ensure("3:operator== failed",(vec3D ==vec3Da));
- ensure("4:operator!= failed",(FALSE == (vec3D !=vec3Da)));
+ ensure("4:operator!= failed",(false == (vec3D !=vec3Da)));
}
template<> template<>
@@ -482,10 +482,10 @@ namespace tut
F64 x = 2.32, y = 1.212, z = -.12;
F64 min = 0.0001, max = 3.0;
LLVector3d vec3d(x,y,z);
- ensure("1:clamp:Fail ", (TRUE == (vec3d.clamp(min, max))));
+ ensure("1:clamp:Fail ", (true == (vec3d.clamp(min, max))));
x = 0.000001f, z = 5.3f;
vec3d.setVec(x,y,z);
- ensure("2:clamp:Fail ", (TRUE == (vec3d.clamp(min, max))));
+ ensure("2:clamp:Fail ", (true == (vec3d.clamp(min, max))));
}
template<> template<>
@@ -494,11 +494,11 @@ namespace tut
F64 x = 10., y = 20., z = -15.;
F64 epsilon = .23425;
LLVector3d vec3Da(x,y,z), vec3Db(x,y,z);
- ensure("1:are_parallel: Fail ", (TRUE == are_parallel(vec3Da,vec3Db,epsilon)));
+ ensure("1:are_parallel: Fail ", (true == are_parallel(vec3Da,vec3Db,epsilon)));
F64 x1 = -12., y1 = -20., z1 = -100.;
vec3Db.clearVec();
vec3Db.setVec(x1,y1,z1);
- ensure("2:are_parallel: Fail ", (FALSE == are_parallel(vec3Da,vec3Db,epsilon)));
+ ensure("2:are_parallel: Fail ", (false == are_parallel(vec3Da,vec3Db,epsilon)));
}
template<> template<>
diff --git a/indra/llmath/tests/v3math_test.cpp b/indra/llmath/tests/v3math_test.cpp
index 7f93aba354..6d95a9e5b7 100644
--- a/indra/llmath/tests/v3math_test.cpp
+++ b/indra/llmath/tests/v3math_test.cpp
@@ -99,7 +99,7 @@ namespace tut
{
F32 x = 2.32f, y = 1.212f, z = -.12f;
LLVector3 vec3(x,y,z);
- ensure("1:isFinite= Fail to initialize ", (TRUE == vec3.isFinite()));//need more test cases:
+ ensure("1:isFinite= Fail to initialize ", (true == vec3.isFinite()));//need more test cases:
vec3.clearVec();
ensure("2:clearVec:Fail to set values ", ((0.f == vec3.mV[VX]) && (0.f == vec3.mV[VY]) && (0.f == vec3.mV[VZ])));
vec3.setVec(x,y,z);
@@ -137,10 +137,10 @@ namespace tut
F32 x = 2.32f, y = 3.212f, z = -.12f;
F32 min = 0.0001f, max = 3.0f;
LLVector3 vec3(x,y,z);
- ensure("1:clamp:Fail ", TRUE == vec3.clamp(min, max) && x == vec3.mV[VX] && max == vec3.mV[VY] && min == vec3.mV[VZ]);
+ ensure("1:clamp:Fail ", true == vec3.clamp(min, max) && x == vec3.mV[VX] && max == vec3.mV[VY] && min == vec3.mV[VZ]);
x = 1.f, y = 2.2f, z = 2.8f;
vec3.setVec(x,y,z);
- ensure("2:clamp:Fail ", FALSE == vec3.clamp(min, max));
+ ensure("2:clamp:Fail ", false == vec3.clamp(min, max));
}
template<> template<>
@@ -157,11 +157,11 @@ namespace tut
{
F32 x =-2.0f, y = -3.0f, z = 1.23f ;
LLVector3 vec3(x,y,z);
- ensure("1:abs():Fail ", (TRUE == vec3.abs()));
- ensure("2:isNull():Fail", (FALSE == vec3.isNull())); //Returns TRUE if vector has a _very_small_ length
+ ensure("1:abs():Fail ", (true == vec3.abs()));
+ ensure("2:isNull():Fail", (false == vec3.isNull())); //Returns true if vector has a _very_small_ length
x =.00000001f, y = .000001001f, z = .000001001f;
vec3.setVec(x,y,z);
- ensure("3:isNull(): Fail ", (TRUE == vec3.isNull()));
+ ensure("3:isNull(): Fail ", (true == vec3.isNull()));
}
template<> template<>
@@ -169,13 +169,13 @@ namespace tut
{
F32 x =-2.0f, y = -3.0f, z = 1.f ;
LLVector3 vec3(x,y,z),vec3a;
- ensure("1:isExactlyZero():Fail ", (TRUE == vec3a.isExactlyZero()));
+ ensure("1:isExactlyZero():Fail ", (true == vec3a.isExactlyZero()));
vec3a = vec3a.scaleVec(vec3);
ensure("2:scaleVec: Fail ", vec3a.mV[VX] == 0.f && vec3a.mV[VY] == 0.f && vec3a.mV[VZ] == 0.f);
vec3a.setVec(x,y,z);
vec3a = vec3a.scaleVec(vec3);
ensure("3:scaleVec: Fail ", ((4 == vec3a.mV[VX]) && (9 == vec3a.mV[VY]) &&(1 == vec3a.mV[VZ])));
- ensure("4:isExactlyZero():Fail ", (FALSE == vec3.isExactlyZero()));
+ ensure("4:isExactlyZero():Fail ", (false == vec3.isExactlyZero()));
}
template<> template<>
@@ -356,7 +356,7 @@ namespace tut
vec3.clearVec();
vec3.clearVec();
vec3a.setVec(vec3);
- ensure("2:operator!= failed", ( FALSE == (vec3a != vec3)));
+ ensure("2:operator!= failed", ( false == (vec3a != vec3)));
}
template<> template<>
@@ -454,15 +454,15 @@ namespace tut
{
F32 x1 =-2.3f, y1 = 2.f,z1 = 1.2f, x2 = 1.3f, y2 = 1.11f, z2 = 1234.234f;
LLVector3 vec3(x1,y1,z1), vec3a(x2,y2,z2);
- ensure("1:operator< failed", (TRUE == (vec3 < vec3a)));
+ ensure("1:operator< failed", (true == (vec3 < vec3a)));
x1 =-2.3f, y1 = 2.f,z1 = 1.2f, x2 = 1.3f, y2 = 2.f, z2 = 1234.234f;
vec3.setVec(x1,y1,z1);
vec3a.setVec(x2,y2,z2);
- ensure("2:operator< failed ", (TRUE == (vec3 < vec3a)));
+ ensure("2:operator< failed ", (true == (vec3 < vec3a)));
x1 =2.3f, y1 = 2.f,z1 = 1.2f, x2 = 1.3f,
vec3.setVec(x1,y1,z1);
vec3a.setVec(x2,y2,z2);
- ensure("3:operator< failed ", (FALSE == (vec3 < vec3a)));
+ ensure("3:operator< failed ", (false == (vec3 < vec3a)));
}
template<> template<>
diff --git a/indra/llmath/tests/v4color_test.cpp b/indra/llmath/tests/v4color_test.cpp
index 3b3adbda0d..e5d914a065 100644
--- a/indra/llmath/tests/v4color_test.cpp
+++ b/indra/llmath/tests/v4color_test.cpp
@@ -49,23 +49,23 @@ namespace tut
void v4color_object::test<1>()
{
LLColor4 llcolor4;
- ensure("1:LLColor4:Fail to initialize ", ((0 == llcolor4.mV[VX]) && (0 == llcolor4.mV[VY]) && (0 == llcolor4.mV[VZ])&& (1.0f == llcolor4.mV[VW])));
+ ensure("1:LLColor4:Fail to initialize ", ((0 == llcolor4.mV[VRED]) && (0 == llcolor4.mV[VGREEN]) && (0 == llcolor4.mV[VBLUE])&& (1.0f == llcolor4.mV[VALPHA])));
F32 r = 0x20, g = 0xFFFF, b = 0xFF, a = 0xAF;
LLColor4 llcolor4a(r,g,b);
- ensure("2:LLColor4:Fail to initialize ", ((r == llcolor4a.mV[VX]) && (g == llcolor4a.mV[VY]) && (b == llcolor4a.mV[VZ])&& (1.0f == llcolor4a.mV[VW])));
+ ensure("2:LLColor4:Fail to initialize ", ((r == llcolor4a.mV[VRED]) && (g == llcolor4a.mV[VGREEN]) && (b == llcolor4a.mV[VBLUE])&& (1.0f == llcolor4a.mV[VALPHA])));
LLColor4 llcolor4b(r,g,b,a);
- ensure("3:LLColor4:Fail to initialize ", ((r == llcolor4b.mV[VX]) && (g == llcolor4b.mV[VY]) && (b == llcolor4b.mV[VZ])&& (a == llcolor4b.mV[VW])));
+ ensure("3:LLColor4:Fail to initialize ", ((r == llcolor4b.mV[VRED]) && (g == llcolor4b.mV[VGREEN]) && (b == llcolor4b.mV[VBLUE])&& (a == llcolor4b.mV[VALPHA])));
const F32 vec[4] = {.112f ,23.2f, -4.2f, -.0001f};
LLColor4 llcolor4c(vec);
- ensure("4:LLColor4:Fail to initialize ", ((vec[0] == llcolor4c.mV[VX]) && (vec[1] == llcolor4c.mV[VY]) && (vec[2] == llcolor4c.mV[VZ])&& (vec[3] == llcolor4c.mV[VW])));
+ ensure("4:LLColor4:Fail to initialize ", ((vec[0] == llcolor4c.mV[VRED]) && (vec[1] == llcolor4c.mV[VGREEN]) && (vec[2] == llcolor4c.mV[VBLUE])&& (vec[3] == llcolor4c.mV[VALPHA])));
LLColor3 llcolor3(-2.23f,1.01f,42.3f);
F32 val = -.1f;
LLColor4 llcolor4d(llcolor3,val);
- ensure("5:LLColor4:Fail to initialize ", ((llcolor3.mV[VX] == llcolor4d.mV[VX]) && (llcolor3.mV[VY] == llcolor4d.mV[VY]) && (llcolor3.mV[VZ] == llcolor4d.mV[VZ])&& (val == llcolor4d.mV[VW])));
+ ensure("5:LLColor4:Fail to initialize ", ((llcolor3.mV[VRED] == llcolor4d.mV[VRED]) && (llcolor3.mV[VGREEN] == llcolor4d.mV[VGREEN]) && (llcolor3.mV[VBLUE] == llcolor4d.mV[VBLUE])&& (val == llcolor4d.mV[VALPHA])));
LLSD sd = llcolor4d.getValue();
LLColor4 llcolor4e(sd);
@@ -76,7 +76,7 @@ namespace tut
LLColor4 llcolor4g(color4u);
const F32 SCALE = 1.f/255.f;
F32 r2 = r1*SCALE, g2 = g1* SCALE, b2 = b1* SCALE;
- ensure("7:LLColor4:Fail to initialize ", ((r2 == llcolor4g.mV[VX]) && (g2 == llcolor4g.mV[VY]) && (b2 == llcolor4g.mV[VZ])));
+ ensure("7:LLColor4:Fail to initialize ", ((r2 == llcolor4g.mV[VRED]) && (g2 == llcolor4g.mV[VGREEN]) && (b2 == llcolor4g.mV[VBLUE])));
}
template<> template<>
@@ -98,10 +98,10 @@ namespace tut
F32 r = 0x20, g = 0xFFFF, b = 0xFF,a = 0xAF;
LLColor4 llcolor4(r,g,b,a);
llcolor4.setToBlack();
- ensure("setToBlack:Fail to set the black ", ((0 == llcolor4.mV[VX]) && (0 == llcolor4.mV[VY]) && (0 == llcolor4.mV[VZ])&& (1.0f == llcolor4.mV[VW])));
+ ensure("setToBlack:Fail to set the black ", ((0 == llcolor4.mV[VRED]) && (0 == llcolor4.mV[VGREEN]) && (0 == llcolor4.mV[VBLUE])&& (1.0f == llcolor4.mV[VALPHA])));
llcolor4.setToWhite();
- ensure("setToWhite:Fail to set the white ", ((1.f == llcolor4.mV[VX]) && (1.f == llcolor4.mV[VY]) && (1.f == llcolor4.mV[VZ])&& (1.0f == llcolor4.mV[VW])));
+ ensure("setToWhite:Fail to set the white ", ((1.f == llcolor4.mV[VRED]) && (1.f == llcolor4.mV[VGREEN]) && (1.f == llcolor4.mV[VBLUE])&& (1.0f == llcolor4.mV[VALPHA])));
}
template<> template<>
@@ -110,10 +110,10 @@ namespace tut
F32 r = 0x20, g = 0xFFFF, b = 0xFF, a = 0xAF;
LLColor4 llcolor4;
llcolor4.setVec(r,g,b);
- ensure("1:setVec:Fail to set the values ", ((r == llcolor4.mV[VX]) && (g == llcolor4.mV[VY]) && (b == llcolor4.mV[VZ])&& (1.f == llcolor4.mV[VW])));
+ ensure("1:setVec:Fail to set the values ", ((r == llcolor4.mV[VRED]) && (g == llcolor4.mV[VGREEN]) && (b == llcolor4.mV[VBLUE])&& (1.f == llcolor4.mV[VALPHA])));
llcolor4.setVec(r,g,b,a);
- ensure("2:setVec:Fail to set the values ", ((r == llcolor4.mV[VX]) && (g == llcolor4.mV[VY]) && (b == llcolor4.mV[VZ])&& (a == llcolor4.mV[VW])));
+ ensure("2:setVec:Fail to set the values ", ((r == llcolor4.mV[VRED]) && (g == llcolor4.mV[VGREEN]) && (b == llcolor4.mV[VBLUE])&& (a == llcolor4.mV[VALPHA])));
LLColor4 llcolor4a;
llcolor4a.setVec(llcolor4);
@@ -121,23 +121,23 @@ namespace tut
LLColor3 llcolor3(-2.23f,1.01f,42.3f);
llcolor4a.setVec(llcolor3);
- ensure("4:setVec:Fail to set the values ", ((llcolor3.mV[VX] == llcolor4a.mV[VX]) && (llcolor3.mV[VY] == llcolor4a.mV[VY]) && (llcolor3.mV[VZ] == llcolor4a.mV[VZ])));
+ ensure("4:setVec:Fail to set the values ", ((llcolor3.mV[VRED] == llcolor4a.mV[VRED]) && (llcolor3.mV[VGREEN] == llcolor4a.mV[VGREEN]) && (llcolor3.mV[VBLUE] == llcolor4a.mV[VBLUE])));
F32 val = -.33f;
llcolor4a.setVec(llcolor3,val);
- ensure("4:setVec:Fail to set the values ", ((llcolor3.mV[VX] == llcolor4a.mV[VX]) && (llcolor3.mV[VY] == llcolor4a.mV[VY]) && (llcolor3.mV[VZ] == llcolor4a.mV[VZ]) && (val == llcolor4a.mV[VW])));
+ ensure("4:setVec:Fail to set the values ", ((llcolor3.mV[VRED] == llcolor4a.mV[VRED]) && (llcolor3.mV[VGREEN] == llcolor4a.mV[VGREEN]) && (llcolor3.mV[VBLUE] == llcolor4a.mV[VBLUE]) && (val == llcolor4a.mV[VALPHA])));
const F32 vec[4] = {.112f ,23.2f, -4.2f, -.0001f};
LLColor4 llcolor4c;
llcolor4c.setVec(vec);
- ensure("5:setVec:Fail to initialize ", ((vec[0] == llcolor4c.mV[VX]) && (vec[1] == llcolor4c.mV[VY]) && (vec[2] == llcolor4c.mV[VZ])&& (vec[3] == llcolor4c.mV[VW])));
+ ensure("5:setVec:Fail to initialize ", ((vec[0] == llcolor4c.mV[VRED]) && (vec[1] == llcolor4c.mV[VGREEN]) && (vec[2] == llcolor4c.mV[VBLUE])&& (vec[3] == llcolor4c.mV[VALPHA])));
U8 r1 = 0xF2, g1 = 0xFA, b1= 0xBF;
LLColor4U color4u(r1,g1,b1);
llcolor4.setVec(color4u);
const F32 SCALE = 1.f/255.f;
F32 r2 = r1*SCALE, g2 = g1* SCALE, b2 = b1* SCALE;
- ensure("6:setVec:Fail to initialize ", ((r2 == llcolor4.mV[VX]) && (g2 == llcolor4.mV[VY]) && (b2 == llcolor4.mV[VZ])));
+ ensure("6:setVec:Fail to initialize ", ((r2 == llcolor4.mV[VRED]) && (g2 == llcolor4.mV[VGREEN]) && (b2 == llcolor4.mV[VBLUE])));
}
template<> template<>
@@ -146,7 +146,7 @@ namespace tut
F32 alpha = 0xAF;
LLColor4 llcolor4;
llcolor4.setAlpha(alpha);
- ensure("setAlpha:Fail to initialize ", (alpha == llcolor4.mV[VW]));
+ ensure("setAlpha:Fail to initialize ", (alpha == llcolor4.mV[VALPHA]));
}
template<> template<>
@@ -209,7 +209,7 @@ namespace tut
LLColor3 llcolor3(r,g,b);
LLColor4 llcolor4a,llcolor4b;
llcolor4a = llcolor3;
- ensure("Operator=:Fail to initialize ", ((llcolor3.mV[0] == llcolor4a.mV[VX]) && (llcolor3.mV[1] == llcolor4a.mV[VY]) && (llcolor3.mV[2] == llcolor4a.mV[VZ])));
+ ensure("Operator=:Fail to initialize ", ((llcolor3.mV[0] == llcolor4a.mV[VRED]) && (llcolor3.mV[1] == llcolor4a.mV[VGREEN]) && (llcolor3.mV[2] == llcolor4a.mV[VBLUE])));
LLSD sd = llcolor4a.getValue();
llcolor4b = LLColor4(sd);
ensure_equals("Operator= LLSD:Fail ", llcolor4a, llcolor4b);
@@ -234,10 +234,10 @@ namespace tut
F32 r2 = 0xABF, g2 = 0xFB, b2 = 0xFFF;
LLColor4 llcolor4a(r1,g1,b1),llcolor4b(r2,g2,b2),llcolor4c;
llcolor4c = llcolor4b + llcolor4a;
- ensure("operator+:Fail to Add the values ", (is_approx_equal(r1+r2,llcolor4c.mV[VX]) && is_approx_equal(g1+g2,llcolor4c.mV[VY]) && is_approx_equal(b1+b2,llcolor4c.mV[VZ])));
+ ensure("operator+:Fail to Add the values ", (is_approx_equal(r1+r2,llcolor4c.mV[VRED]) && is_approx_equal(g1+g2,llcolor4c.mV[VGREEN]) && is_approx_equal(b1+b2,llcolor4c.mV[VBLUE])));
llcolor4b += llcolor4a;
- ensure("operator+=:Fail to Add the values ", (is_approx_equal(r1+r2,llcolor4b.mV[VX]) && is_approx_equal(g1+g2,llcolor4b.mV[VY]) && is_approx_equal(b1+b2,llcolor4b.mV[VZ])));
+ ensure("operator+=:Fail to Add the values ", (is_approx_equal(r1+r2,llcolor4b.mV[VRED]) && is_approx_equal(g1+g2,llcolor4b.mV[VGREEN]) && is_approx_equal(b1+b2,llcolor4b.mV[VBLUE])));
}
template<> template<>
@@ -247,10 +247,10 @@ namespace tut
F32 r2 = 0xABF, g2 = 0xFB, b2 = 0xFFF;
LLColor4 llcolor4a(r1,g1,b1),llcolor4b(r2,g2,b2),llcolor4c;
llcolor4c = llcolor4a - llcolor4b;
- ensure("operator-:Fail to subtract the values ", (is_approx_equal(r1-r2,llcolor4c.mV[VX]) && is_approx_equal(g1-g2,llcolor4c.mV[VY]) && is_approx_equal(b1-b2,llcolor4c.mV[VZ])));
+ ensure("operator-:Fail to subtract the values ", (is_approx_equal(r1-r2,llcolor4c.mV[VRED]) && is_approx_equal(g1-g2,llcolor4c.mV[VGREEN]) && is_approx_equal(b1-b2,llcolor4c.mV[VBLUE])));
llcolor4a -= llcolor4b;
- ensure("operator-=:Fail to subtract the values ", (is_approx_equal(r1-r2,llcolor4a.mV[VX]) && is_approx_equal(g1-g2,llcolor4a.mV[VY]) && is_approx_equal(b1-b2,llcolor4a.mV[VZ])));
+ ensure("operator-=:Fail to subtract the values ", (is_approx_equal(r1-r2,llcolor4a.mV[VRED]) && is_approx_equal(g1-g2,llcolor4a.mV[VGREEN]) && is_approx_equal(b1-b2,llcolor4a.mV[VBLUE])));
}
template<> template<>
@@ -260,20 +260,20 @@ namespace tut
F32 r2 = 0xABF, g2 = 0xFB, b2 = 0xFFF;
LLColor4 llcolor4a(r1,g1,b1),llcolor4b(r2,g2,b2),llcolor4c;
llcolor4c = llcolor4a * llcolor4b;
- ensure("1:operator*:Fail to multiply the values", (is_approx_equal(r1*r2,llcolor4c.mV[VX]) && is_approx_equal(g1*g2,llcolor4c.mV[VY]) && is_approx_equal(b1*b2,llcolor4c.mV[VZ])));
+ ensure("1:operator*:Fail to multiply the values", (is_approx_equal(r1*r2,llcolor4c.mV[VRED]) && is_approx_equal(g1*g2,llcolor4c.mV[VGREEN]) && is_approx_equal(b1*b2,llcolor4c.mV[VBLUE])));
F32 mulVal = 3.33f;
llcolor4c = llcolor4a * mulVal;
- ensure("2:operator*:Fail ", (is_approx_equal(r1*mulVal,llcolor4c.mV[VX]) && is_approx_equal(g1*mulVal,llcolor4c.mV[VY]) && is_approx_equal(b1*mulVal,llcolor4c.mV[VZ])));
+ ensure("2:operator*:Fail ", (is_approx_equal(r1*mulVal,llcolor4c.mV[VRED]) && is_approx_equal(g1*mulVal,llcolor4c.mV[VGREEN]) && is_approx_equal(b1*mulVal,llcolor4c.mV[VBLUE])));
llcolor4c = mulVal * llcolor4a;
- ensure("3:operator*:Fail to multiply the values", (is_approx_equal(r1*mulVal,llcolor4c.mV[VX]) && is_approx_equal(g1*mulVal,llcolor4c.mV[VY]) && is_approx_equal(b1*mulVal,llcolor4c.mV[VZ])));
+ ensure("3:operator*:Fail to multiply the values", (is_approx_equal(r1*mulVal,llcolor4c.mV[VRED]) && is_approx_equal(g1*mulVal,llcolor4c.mV[VGREEN]) && is_approx_equal(b1*mulVal,llcolor4c.mV[VBLUE])));
llcolor4a *= mulVal;
- ensure("4:operator*=:Fail to multiply the values ", (is_approx_equal(r1*mulVal,llcolor4a.mV[VX]) && is_approx_equal(g1*mulVal,llcolor4a.mV[VY]) && is_approx_equal(b1*mulVal,llcolor4a.mV[VZ])));
+ ensure("4:operator*=:Fail to multiply the values ", (is_approx_equal(r1*mulVal,llcolor4a.mV[VRED]) && is_approx_equal(g1*mulVal,llcolor4a.mV[VGREEN]) && is_approx_equal(b1*mulVal,llcolor4a.mV[VBLUE])));
LLColor4 llcolor4d(r1,g1,b1),llcolor4e(r2,g2,b2);
llcolor4e *= llcolor4d;
- ensure("5:operator*=:Fail to multiply the values ", (is_approx_equal(r1*r2,llcolor4e.mV[VX]) && is_approx_equal(g1*g2,llcolor4e.mV[VY]) && is_approx_equal(b1*b2,llcolor4e.mV[VZ])));
+ ensure("5:operator*=:Fail to multiply the values ", (is_approx_equal(r1*r2,llcolor4e.mV[VRED]) && is_approx_equal(g1*g2,llcolor4e.mV[VGREEN]) && is_approx_equal(b1*b2,llcolor4e.mV[VBLUE])));
}
template<> template<>
@@ -283,13 +283,13 @@ namespace tut
F32 div = 12.345f;
LLColor4 llcolor4a(r,g,b,a),llcolor4b;
llcolor4b = llcolor4a % div;//chnage only alpha value nor r,g,b;
- ensure("1operator%:Fail ", (is_approx_equal(r,llcolor4b.mV[VX]) && is_approx_equal(g,llcolor4b.mV[VY]) && is_approx_equal(b,llcolor4b.mV[VZ])&& is_approx_equal(div*a,llcolor4b.mV[VW])));
+ ensure("1operator%:Fail ", (is_approx_equal(r,llcolor4b.mV[VRED]) && is_approx_equal(g,llcolor4b.mV[VGREEN]) && is_approx_equal(b,llcolor4b.mV[VBLUE])&& is_approx_equal(div*a,llcolor4b.mV[VALPHA])));
llcolor4b = div % llcolor4a;
- ensure("2operator%:Fail ", (is_approx_equal(r,llcolor4b.mV[VX]) && is_approx_equal(g,llcolor4b.mV[VY]) && is_approx_equal(b,llcolor4b.mV[VZ])&& is_approx_equal(div*a,llcolor4b.mV[VW])));
+ ensure("2operator%:Fail ", (is_approx_equal(r,llcolor4b.mV[VRED]) && is_approx_equal(g,llcolor4b.mV[VGREEN]) && is_approx_equal(b,llcolor4b.mV[VBLUE])&& is_approx_equal(div*a,llcolor4b.mV[VALPHA])));
llcolor4a %= div;
- ensure("operator%=:Fail ", (is_approx_equal(a*div,llcolor4a.mV[VW])));
+ ensure("operator%=:Fail ", (is_approx_equal(a*div,llcolor4a.mV[VALPHA])));
}
template<> template<>
@@ -312,7 +312,7 @@ namespace tut
F32 r = 0x20, g = 0xFFFF, b = 0xFF;
LLColor4 llcolor4a(r,g,b),llcolor4b;
LLColor3 llcolor3 = vec4to3(llcolor4a);
- ensure("vec4to3:Fail to convert vec4 to vec3 ", (is_approx_equal(llcolor3.mV[VX],llcolor4a.mV[VX]) && is_approx_equal(llcolor3.mV[VY],llcolor4a.mV[VY]) && is_approx_equal(llcolor3.mV[VZ],llcolor4a.mV[VZ])));
+ ensure("vec4to3:Fail to convert vec4 to vec3 ", (is_approx_equal(llcolor3.mV[VRED],llcolor4a.mV[VRED]) && is_approx_equal(llcolor3.mV[VGREEN],llcolor4a.mV[VGREEN]) && is_approx_equal(llcolor3.mV[VBLUE],llcolor4a.mV[VBLUE])));
llcolor4b = vec3to4(llcolor3);
ensure_equals("vec3to4:Fail to convert vec3 to vec4 ", llcolor4b, llcolor4a);
}
@@ -324,7 +324,7 @@ namespace tut
F32 r2 = 0xABF, g2 = 0xFB, b2 = 0xFFF;
LLColor4 llcolor4a(r1,g1,b1),llcolor4b(r2,g2,b2),llcolor4c;
llcolor4c = lerp(llcolor4a,llcolor4b,val);
- ensure("lerp:Fail ", (is_approx_equal(r1 + (r2 - r1)* val,llcolor4c.mV[VX]) && is_approx_equal(g1 + (g2 - g1)* val,llcolor4c.mV[VY]) && is_approx_equal(b1 + (b2 - b1)* val,llcolor4c.mV[VZ])));
+ ensure("lerp:Fail ", (is_approx_equal(r1 + (r2 - r1)* val,llcolor4c.mV[VRED]) && is_approx_equal(g1 + (g2 - g1)* val,llcolor4c.mV[VGREEN]) && is_approx_equal(b1 + (b2 - b1)* val,llcolor4c.mV[VBLUE])));
}
template<> template<>
diff --git a/indra/llmath/tests/v4coloru_test.cpp b/indra/llmath/tests/v4coloru_test.cpp
index 2b6ee952a3..9d707d18c5 100644
--- a/indra/llmath/tests/v4coloru_test.cpp
+++ b/indra/llmath/tests/v4coloru_test.cpp
@@ -48,18 +48,18 @@ namespace tut
void v4coloru_object::test<1>()
{
LLColor4U llcolor4u;
- ensure("1:LLColor4u:Fail to initialize ", ((0 == llcolor4u.mV[VX]) && (0 == llcolor4u.mV[VY]) && (0 == llcolor4u.mV[VZ])&& (255 == llcolor4u.mV[VW])));
+ ensure("1:LLColor4u:Fail to initialize ", ((0 == llcolor4u.mV[VRED]) && (0 == llcolor4u.mV[VGREEN]) && (0 == llcolor4u.mV[VBLUE])&& (255 == llcolor4u.mV[VALPHA])));
U8 r = 0x12, g = 0xFF, b = 0xAF, a = 0x23;
LLColor4U llcolor4u1(r,g,b);
- ensure("2:LLColor4u:Fail to initialize ", ((r == llcolor4u1.mV[VX]) && (g == llcolor4u1.mV[VY]) && (b == llcolor4u1.mV[VZ])&& (255 == llcolor4u1.mV[VW])));
+ ensure("2:LLColor4u:Fail to initialize ", ((r == llcolor4u1.mV[VRED]) && (g == llcolor4u1.mV[VGREEN]) && (b == llcolor4u1.mV[VBLUE])&& (255 == llcolor4u1.mV[VALPHA])));
LLColor4U llcolor4u2(r,g,b,a);
- ensure("3:LLColor4u:Fail to initialize ", ((r == llcolor4u2.mV[VX]) && (g == llcolor4u2.mV[VY]) && (b == llcolor4u2.mV[VZ])&& (a == llcolor4u2.mV[VW])));
+ ensure("3:LLColor4u:Fail to initialize ", ((r == llcolor4u2.mV[VRED]) && (g == llcolor4u2.mV[VGREEN]) && (b == llcolor4u2.mV[VBLUE])&& (a == llcolor4u2.mV[VALPHA])));
const U8 vec[4] = {0x12,0xFF,0xAF,0x23};
LLColor4U llcolor4u3(vec);
- ensure("4:LLColor4u:Fail to initialize ", ((vec[0] == llcolor4u3.mV[VX]) && (vec[1] == llcolor4u3.mV[VY]) && (vec[2] == llcolor4u3.mV[VZ])&& (vec[3] == llcolor4u3.mV[VW])));
+ ensure("4:LLColor4u:Fail to initialize ", ((vec[0] == llcolor4u3.mV[VRED]) && (vec[1] == llcolor4u3.mV[VGREEN]) && (vec[2] == llcolor4u3.mV[VBLUE])&& (vec[3] == llcolor4u3.mV[VALPHA])));
LLSD sd = llcolor4u3.getValue();
LLColor4U llcolor4u4(sd);
@@ -82,10 +82,10 @@ namespace tut
U8 r = 0x12, g = 0xFF, b = 0xAF, a = 0x23;
LLColor4U llcolor4u(r,g,b,a);
llcolor4u.setToBlack();
- ensure("setToBlack:Fail to set black ", ((0 == llcolor4u.mV[VX]) && (0 == llcolor4u.mV[VY]) && (0 == llcolor4u.mV[VZ])&& (255 == llcolor4u.mV[VW])));
+ ensure("setToBlack:Fail to set black ", ((0 == llcolor4u.mV[VRED]) && (0 == llcolor4u.mV[VGREEN]) && (0 == llcolor4u.mV[VBLUE])&& (255 == llcolor4u.mV[VALPHA])));
llcolor4u.setToWhite();
- ensure("setToWhite:Fail to white ", ((255 == llcolor4u.mV[VX]) && (255 == llcolor4u.mV[VY]) && (255 == llcolor4u.mV[VZ])&& (255 == llcolor4u.mV[VW])));
+ ensure("setToWhite:Fail to white ", ((255 == llcolor4u.mV[VRED]) && (255 == llcolor4u.mV[VGREEN]) && (255 == llcolor4u.mV[VBLUE])&& (255 == llcolor4u.mV[VALPHA])));
}
template<> template<>
@@ -104,11 +104,11 @@ namespace tut
U8 r = 0x12, g = 0xFF, b = 0xAF, a = 0x23;
LLColor4U llcolor4u;
llcolor4u.setVec(r,g,b,a);
- ensure("1:setVec:Fail to set the values ", ((r == llcolor4u.mV[VX]) && (g == llcolor4u.mV[VY]) && (b == llcolor4u.mV[VZ])&& (a == llcolor4u.mV[VW])));
+ ensure("1:setVec:Fail to set the values ", ((r == llcolor4u.mV[VRED]) && (g == llcolor4u.mV[VGREEN]) && (b == llcolor4u.mV[VBLUE])&& (a == llcolor4u.mV[VALPHA])));
llcolor4u.setToBlack();
llcolor4u.setVec(r,g,b);
- ensure("2:setVec:Fail to set the values ", ((r == llcolor4u.mV[VX]) && (g == llcolor4u.mV[VY]) && (b == llcolor4u.mV[VZ])&& (255 == llcolor4u.mV[VW])));
+ ensure("2:setVec:Fail to set the values ", ((r == llcolor4u.mV[VRED]) && (g == llcolor4u.mV[VGREEN]) && (b == llcolor4u.mV[VBLUE])&& (255 == llcolor4u.mV[VALPHA])));
LLColor4U llcolor4u1;
llcolor4u1.setVec(llcolor4u);
@@ -117,7 +117,7 @@ namespace tut
const U8 vec[4] = {0x12,0xFF,0xAF,0x23};
LLColor4U llcolor4u2;
llcolor4u2.setVec(vec);
- ensure("4:setVec:Fail to set the values ", ((vec[0] == llcolor4u2.mV[VX]) && (vec[1] == llcolor4u2.mV[VY]) && (vec[2] == llcolor4u2.mV[VZ])&& (vec[3] == llcolor4u2.mV[VW])));
+ ensure("4:setVec:Fail to set the values ", ((vec[0] == llcolor4u2.mV[VRED]) && (vec[1] == llcolor4u2.mV[VGREEN]) && (vec[2] == llcolor4u2.mV[VBLUE])&& (vec[3] == llcolor4u2.mV[VALPHA])));
}
template<> template<>
@@ -126,7 +126,7 @@ namespace tut
U8 alpha = 0x12;
LLColor4U llcolor4u;
llcolor4u.setAlpha(alpha);
- ensure("setAlpha:Fail to set alpha value ", (alpha == llcolor4u.mV[VW]));
+ ensure("setAlpha:Fail to set alpha value ", (alpha == llcolor4u.mV[VALPHA]));
}
template<> template<>
@@ -159,29 +159,29 @@ namespace tut
llcolor4u3 = llcolor4u1 + llcolor4u2;
ensure_equals(
"1a.operator+:Fail to Add the values ",
- llcolor4u3.mV[VX],
+ llcolor4u3.mV[VRED],
(U8)(r1+r2));
ensure_equals(
"1b.operator+:Fail to Add the values ",
- llcolor4u3.mV[VY],
+ llcolor4u3.mV[VGREEN],
(U8)(g1+g2));
ensure_equals(
"1c.operator+:Fail to Add the values ",
- llcolor4u3.mV[VZ],
+ llcolor4u3.mV[VBLUE],
(U8)(b1+b2));
llcolor4u2 += llcolor4u1;
ensure_equals(
"2a.operator+=:Fail to Add the values ",
- llcolor4u2.mV[VX],
+ llcolor4u2.mV[VRED],
(U8)(r1+r2));
ensure_equals(
"2b.operator+=:Fail to Add the values ",
- llcolor4u2.mV[VY],
+ llcolor4u2.mV[VGREEN],
(U8)(g1+g2));
ensure_equals(
"2c.operator+=:Fail to Add the values ",
- llcolor4u2.mV[VZ],
+ llcolor4u2.mV[VBLUE],
(U8)(b1+b2));
}
@@ -194,29 +194,29 @@ namespace tut
llcolor4u3 = llcolor4u1 - llcolor4u2;
ensure_equals(
"1a. operator-:Fail to Add the values ",
- llcolor4u3.mV[VX],
+ llcolor4u3.mV[VRED],
(U8)(r1-r2));
ensure_equals(
"1b. operator-:Fail to Add the values ",
- llcolor4u3.mV[VY],
+ llcolor4u3.mV[VGREEN],
(U8)(g1-g2));
ensure_equals(
"1c. operator-:Fail to Add the values ",
- llcolor4u3.mV[VZ],
+ llcolor4u3.mV[VBLUE],
(U8)(b1-b2));
llcolor4u1 -= llcolor4u2;
ensure_equals(
"2a. operator-=:Fail to Add the values ",
- llcolor4u1.mV[VX],
+ llcolor4u1.mV[VRED],
(U8)(r1-r2));
ensure_equals(
"2b. operator-=:Fail to Add the values ",
- llcolor4u1.mV[VY],
+ llcolor4u1.mV[VGREEN],
(U8)(g1-g2));
ensure_equals(
"2c. operator-=:Fail to Add the values ",
- llcolor4u1.mV[VZ],
+ llcolor4u1.mV[VBLUE],
(U8)(b1-b2));
}
@@ -229,30 +229,30 @@ namespace tut
llcolor4u3 = llcolor4u1 * llcolor4u2;
ensure_equals(
"1a. operator*:Fail to multiply the values",
- llcolor4u3.mV[VX],
+ llcolor4u3.mV[VRED],
(U8)(r1*r2));
ensure_equals(
"1b. operator*:Fail to multiply the values",
- llcolor4u3.mV[VY],
+ llcolor4u3.mV[VGREEN],
(U8)(g1*g2));
ensure_equals(
"1c. operator*:Fail to multiply the values",
- llcolor4u3.mV[VZ],
+ llcolor4u3.mV[VBLUE],
(U8)(b1*b2));
U8 mulVal = 123;
llcolor4u1 *= mulVal;
ensure_equals(
"2a. operator*=:Fail to multiply the values",
- llcolor4u1.mV[VX],
+ llcolor4u1.mV[VRED],
(U8)(r1*mulVal));
ensure_equals(
"2b. operator*=:Fail to multiply the values",
- llcolor4u1.mV[VY],
+ llcolor4u1.mV[VGREEN],
(U8)(g1*mulVal));
ensure_equals(
"2c. operator*=:Fail to multiply the values",
- llcolor4u1.mV[VZ],
+ llcolor4u1.mV[VBLUE],
(U8)(b1*mulVal));
}
@@ -274,7 +274,7 @@ namespace tut
LLColor4U llcolor4u(r,g,b,a);
U8 modVal = 45;
llcolor4u %= modVal;
- ensure_equals("operator%=:Fail ", llcolor4u.mV[VW], (U8)(a * modVal));
+ ensure_equals("operator%=:Fail ", llcolor4u.mV[VALPHA], (U8)(a * modVal));
}
template<> template<>
@@ -284,13 +284,13 @@ namespace tut
LLColor4U llcolor4u1(r,g,b,a);
std::string color("12, 23, 132, 50");
LLColor4U::parseColor4U(color, &llcolor4u1);
- ensure("parseColor4U() failed to parse the color value ", ((12 == llcolor4u1.mV[VX]) && (23 == llcolor4u1.mV[VY]) && (132 == llcolor4u1.mV[VZ])&& (50 == llcolor4u1.mV[VW])));
+ ensure("parseColor4U() failed to parse the color value ", ((12 == llcolor4u1.mV[VRED]) && (23 == llcolor4u1.mV[VGREEN]) && (132 == llcolor4u1.mV[VBLUE])&& (50 == llcolor4u1.mV[VALPHA])));
color = "12, 23, 132";
- ensure("2:parseColor4U() failed to parse the color value ", (FALSE == LLColor4U::parseColor4U(color, &llcolor4u1)));
+ ensure("2:parseColor4U() failed to parse the color value ", (false == LLColor4U::parseColor4U(color, &llcolor4u1)));
color = "12";
- ensure("2:parseColor4U() failed to parse the color value ", (FALSE == LLColor4U::parseColor4U(color, &llcolor4u1)));
+ ensure("2:parseColor4U() failed to parse the color value ", (false == LLColor4U::parseColor4U(color, &llcolor4u1)));
}
template<> template<>
@@ -300,8 +300,8 @@ namespace tut
LLColor4U llcolor4u(r,g,b,a),llcolor4u1;
const F32 fVal = 3.f;
llcolor4u1 = llcolor4u.multAll(fVal);
- ensure("multAll:Fail to multiply ", (((U8)ll_round(r * fVal) == llcolor4u1.mV[VX]) && (U8)ll_round(g * fVal) == llcolor4u1.mV[VY]
- && ((U8)ll_round(b * fVal) == llcolor4u1.mV[VZ])&& ((U8)ll_round(a * fVal) == llcolor4u1.mV[VW])));
+ ensure("multAll:Fail to multiply ", (((U8)ll_round(r * fVal) == llcolor4u1.mV[VRED]) && (U8)ll_round(g * fVal) == llcolor4u1.mV[VGREEN]
+ && ((U8)ll_round(b * fVal) == llcolor4u1.mV[VBLUE])&& ((U8)ll_round(a * fVal) == llcolor4u1.mV[VALPHA])));
}
template<> template<>
@@ -311,13 +311,13 @@ namespace tut
U8 r2 = 23, g2 = 230, b2 = 124, a2 = 255;
LLColor4U llcolor4u(r1,g1,b1,a1),llcolor4u1(r2,g2,b2,a2);
llcolor4u1 = llcolor4u1.addClampMax(llcolor4u);
- ensure("1:addClampMax():Fail to add the value ", ((r1+r2 == llcolor4u1.mV[VX]) && (255 == llcolor4u1.mV[VY]) && (b1+b2 == llcolor4u1.mV[VZ])&& (255 == llcolor4u1.mV[VW])));
+ ensure("1:addClampMax():Fail to add the value ", ((r1+r2 == llcolor4u1.mV[VRED]) && (255 == llcolor4u1.mV[VGREEN]) && (b1+b2 == llcolor4u1.mV[VBLUE])&& (255 == llcolor4u1.mV[VALPHA])));
r1 = 132, g1 = 3, b1 = 3, a1 = 2;
r2 = 123, g2 = 230, b2 = 154, a2 = 25;
LLColor4U llcolor4u2(r1,g1,b1,a1),llcolor4u3(r2,g2,b2,a2);
llcolor4u3 = llcolor4u3.addClampMax(llcolor4u2);
- ensure("2:addClampMax():Fail to add the value ", ((255 == llcolor4u3.mV[VX]) && (g1+g2 == llcolor4u3.mV[VY]) && (b1+b2 == llcolor4u3.mV[VZ])&& (a1+a2 == llcolor4u3.mV[VW])));
+ ensure("2:addClampMax():Fail to add the value ", ((255 == llcolor4u3.mV[VRED]) && (g1+g2 == llcolor4u3.mV[VGREEN]) && (b1+b2 == llcolor4u3.mV[VBLUE])&& (a1+a2 == llcolor4u3.mV[VALPHA])));
}
template<> template<>
@@ -331,6 +331,6 @@ namespace tut
F32 color_scale_factor = MAX_COLOR/r;
S32 r2 = ll_round(r * color_scale_factor);
S32 g2 = ll_round(g * color_scale_factor);
- ensure("setVecScaleClamp():Fail to add the value ", ((r2 == llcolor4u.mV[VX]) && (g2 == llcolor4u.mV[VY]) && (0 == llcolor4u.mV[VZ])&& (255 == llcolor4u.mV[VW])));
+ ensure("setVecScaleClamp():Fail to add the value ", ((r2 == llcolor4u.mV[VRED]) && (g2 == llcolor4u.mV[VGREEN]) && (0 == llcolor4u.mV[VBLUE])&& (255 == llcolor4u.mV[VALPHA])));
}
}
diff --git a/indra/llmath/tests/v4math_test.cpp b/indra/llmath/tests/v4math_test.cpp
index 07099cd417..236585f13b 100644
--- a/indra/llmath/tests/v4math_test.cpp
+++ b/indra/llmath/tests/v4math_test.cpp
@@ -123,9 +123,9 @@ namespace tut
vec4.abs();
ensure("abs:Fail " ,((x == vec4.mV[VX]) && (-y == vec4.mV[VY]) && (-z == vec4.mV[VZ])&& (-w == vec4.mV[VW])));
vec4.clearVec();
- ensure("isExactlyClear:Fail " ,(TRUE == vec4.isExactlyClear()));
+ ensure("isExactlyClear:Fail " ,(true == vec4.isExactlyClear()));
vec4.zeroVec();
- ensure("isExactlyZero:Fail " ,(TRUE == vec4.isExactlyZero()));
+ ensure("isExactlyZero:Fail " ,(true == vec4.isExactlyZero()));
}
template<> template<>
@@ -303,11 +303,11 @@ namespace tut
{
F32 x = 1.f, y = 2.f, z = -1.1f,epsilon = .23425f;
LLVector4 vec4(x,y,z), vec4a(x,y,z);
- ensure("1:are_parallel: Fail " ,(TRUE == are_parallel(vec4a,vec4,epsilon)));
+ ensure("1:are_parallel: Fail " ,(true == are_parallel(vec4a,vec4,epsilon)));
x = 21.f, y = 12.f, z = -123.1f;
vec4a.clearVec();
vec4a.setVec(x,y,z);
- ensure("2:are_parallel: Fail " ,(FALSE == are_parallel(vec4a,vec4,epsilon)));
+ ensure("2:are_parallel: Fail " ,(false == are_parallel(vec4a,vec4,epsilon)));
}
template<> template<>
diff --git a/indra/llmath/tests/xform_test.cpp b/indra/llmath/tests/xform_test.cpp
index ad56cdb15c..6d6a64ec4c 100644
--- a/indra/llmath/tests/xform_test.cpp
+++ b/indra/llmath/tests/xform_test.cpp
@@ -91,7 +91,7 @@ namespace tut
xform_obj.setPositionZ(z);
ensure("setPositionX/Y/Z failed: ", xform_obj.getPosition() == vec);
- xform_obj.setScaleChildOffset(TRUE);
+ xform_obj.setScaleChildOffset(true);
ensure("setScaleChildOffset failed: ", xform_obj.getScaleChildOffset());
vec.setVec(x, y, z);
@@ -121,7 +121,7 @@ namespace tut
// Is that the expected behavior?
}
- // test cases for inline BOOL setParent(LLXform *parent) and getParent() fn.
+ // test cases for inline bool setParent(LLXform *parent) and getParent() fn.
template<> template<>
void xform_test_object_t::test<3>()
{
@@ -216,7 +216,7 @@ namespace tut
parent.setPosition(llvecpospar);
LLVector3 llvecparentscale(1.0, 2.0, 0);
- parent.setScaleChildOffset(TRUE);
+ parent.setScaleChildOffset(true);
parent.setScale(llvecparentscale);
LLQuaternion quat(1, 2, 3, 4);