summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorAdam Moss <moss@lindenlab.com>2009-10-08 16:44:44 +0000
committerAdam Moss <moss@lindenlab.com>2009-10-08 16:44:44 +0000
commit6af02192731b80c558a89a25f3cbf6916c2cbb72 (patch)
tree83b730aa3e0522c9331835b5e2603554d03e3069 /indra/llmath
parent50e3b3373bb12e4a19b4d85e148c514a8584e25d (diff)
DEV-41080 fix and upgrade v4color_test.cpp to a real unit test.
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/CMakeLists.txt2
-rw-r--r--indra/llmath/tests/v4color_test.cpp2
-rw-r--r--indra/llmath/v3color.cpp4
3 files changed, 3 insertions, 5 deletions
diff --git a/indra/llmath/CMakeLists.txt b/indra/llmath/CMakeLists.txt
index dd13d8acd3..e8b84eeabd 100644
--- a/indra/llmath/CMakeLists.txt
+++ b/indra/llmath/CMakeLists.txt
@@ -90,6 +90,7 @@ SET(llmath_TEST_SOURCE_FILES
llrect.cpp
v2math.cpp
v3color.cpp
+ v4color.cpp
v4coloru.cpp
)
LL_ADD_PROJECT_UNIT_TESTS(llmath "${llmath_TEST_SOURCE_FILES}")
@@ -102,6 +103,5 @@ LL_ADD_INTEGRATION_TEST(mathmisc "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(llquaternion llquaternion.cpp "${test_libs}")
LL_ADD_INTEGRATION_TEST(v3dmath v3dmath.cpp "${test_libs}")
LL_ADD_INTEGRATION_TEST(v3math v3math.cpp "${test_libs}")
-LL_ADD_INTEGRATION_TEST(v4color v4color.cpp "${test_libs}")
LL_ADD_INTEGRATION_TEST(v4math v4math.cpp "${test_libs}")
LL_ADD_INTEGRATION_TEST(xform xform.cpp "${test_libs}")
diff --git a/indra/llmath/tests/v4color_test.cpp b/indra/llmath/tests/v4color_test.cpp
index 166c9b9ff2..cebb026ce6 100644
--- a/indra/llmath/tests/v4color_test.cpp
+++ b/indra/llmath/tests/v4color_test.cpp
@@ -217,7 +217,7 @@ namespace tut
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])));
LLSD sd = llcolor4a.getValue();
- llcolor4b = sd;
+ llcolor4b = LLColor4(sd);
ensure_equals("Operator= LLSD:Fail ", llcolor4a, llcolor4b);
}
diff --git a/indra/llmath/v3color.cpp b/indra/llmath/v3color.cpp
index e76607a91f..b4cd410076 100644
--- a/indra/llmath/v3color.cpp
+++ b/indra/llmath/v3color.cpp
@@ -56,9 +56,7 @@ LLColor3::LLColor3(const LLVector4 &a)
LLColor3::LLColor3(const LLSD &sd)
{
- mV[0] = (F32) sd[0].asReal();
- mV[1] = (F32) sd[1].asReal();
- mV[2] = (F32) sd[2].asReal();
+ setValue(sd);
}
const LLColor3& LLColor3::operator=(const LLColor4 &a)