summaryrefslogtreecommitdiff
path: root/indra/llmath/tests
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2011-08-22 13:16:58 -0700
committerRichard Nelson <richard@lindenlab.com>2011-08-22 13:16:58 -0700
commit56453f2982464b6d5c86c23e0e75f5adcdd0edff (patch)
tree3d420b3b64ecf6deb4534cf24a0ed16649b7b557 /indra/llmath/tests
parentc8712fb180aedf84dc48ade636ec0aae8d905bf7 (diff)
EXP-1129 FIX SLURLs with only 2 coordinates are interpreted as center of sim
reviewed by Leslie
Diffstat (limited to 'indra/llmath/tests')
-rw-r--r--indra/llmath/tests/v3math_test.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llmath/tests/v3math_test.cpp b/indra/llmath/tests/v3math_test.cpp
index df7a77002f..e4ae1c10ef 100644
--- a/indra/llmath/tests/v3math_test.cpp
+++ b/indra/llmath/tests/v3math_test.cpp
@@ -564,4 +564,22 @@ namespace tut
z1 = U8_to_F32(F32_to_U8(z, lowerz, upperz), lowerz, upperz);
ensure("2:quantize8: Fail ", is_approx_equal(x1, vec3a.mV[VX]) && is_approx_equal(y1, vec3a.mV[VY]) && is_approx_equal(z1, vec3a.mV[VZ]));
}
+
+ template<> template<>
+ void v3math_object::test<35>()
+ {
+ LLSD sd = LLSD::emptyArray();
+ sd[0] = 1.f;
+
+ LLVector3 parsed_1(sd);
+ ensure("1:LLSD parse: Fail ", is_approx_equal(parsed_1.mV[VX], 1.f) && is_approx_equal(parsed_1.mV[VY], 0.f) && is_approx_equal(parsed_1.mV[VZ], 0.f));
+
+ sd[1] = 2.f;
+ LLVector3 parsed_2(sd);
+ ensure("2:LLSD parse: Fail ", is_approx_equal(parsed_2.mV[VX], 1.f) && is_approx_equal(parsed_2.mV[VY], 2.f) && is_approx_equal(parsed_2.mV[VZ], 0.f));
+
+ sd[2] = 3.f;
+ LLVector3 parsed_3(sd);
+ ensure("3:LLSD parse: Fail ", is_approx_equal(parsed_3.mV[VX], 1.f) && is_approx_equal(parsed_3.mV[VY], 2.f) && is_approx_equal(parsed_3.mV[VZ], 3.f));
+ }
}