aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Tests
diff options
context:
space:
mode:
authorUbitUmarov2015-11-16 19:00:53 +0000
committerUbitUmarov2015-11-16 19:00:53 +0000
commit95a7a030527e758fafa655632083d7e805792962 (patch)
tree73e9501dd9c8d9cff26d95b870ac06ad62665578 /OpenSim/Framework/Tests
parent work around some 'tests' error: normalization of <0,0,0> no longer causes ar... (diff)
downloadopensim-SC_OLD-95a7a030527e758fafa655632083d7e805792962.zip
opensim-SC_OLD-95a7a030527e758fafa655632083d7e805792962.tar.gz
opensim-SC_OLD-95a7a030527e758fafa655632083d7e805792962.tar.bz2
opensim-SC_OLD-95a7a030527e758fafa655632083d7e805792962.tar.xz
work around some 'tests' error: normalization of <0,0,0> no longer causes argument exception, missed a few more
Diffstat (limited to 'OpenSim/Framework/Tests')
-rw-r--r--OpenSim/Framework/Tests/UtilTest.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs
index 2b08c29..14b9d2f 100644
--- a/OpenSim/Framework/Tests/UtilTest.cs
+++ b/OpenSim/Framework/Tests/UtilTest.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Framework.Tests
92 Assert.That(Util.GetMagnitude(v2), 92 Assert.That(Util.GetMagnitude(v2),
93 new DoubleToleranceConstraint(expectedMagnitude, lowPrecisionTolerance), 93 new DoubleToleranceConstraint(expectedMagnitude, lowPrecisionTolerance),
94 "Magnitude of vector was incorrect."); 94 "Magnitude of vector was incorrect.");
95 95/*
96 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); }; 96 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); };
97 bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d); 97 bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
98 Assert.That(causesArgumentException, Is.True, 98 Assert.That(causesArgumentException, Is.True,
@@ -102,6 +102,7 @@ namespace OpenSim.Framework.Tests
102 causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d); 102 causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
103 Assert.That(causesArgumentException, Is.True, 103 Assert.That(causesArgumentException, Is.True,
104 "Getting magnitude of null vector did not cause argument exception."); 104 "Getting magnitude of null vector did not cause argument exception.");
105*/
105 } 106 }
106 107
107 //Lets test a simple case of <0,0,0> and <-5,-5,-5> 108 //Lets test a simple case of <0,0,0> and <-5,-5,-5>
@@ -120,12 +121,12 @@ namespace OpenSim.Framework.Tests
120 Assert.That(Util.GetMagnitude(v2), 121 Assert.That(Util.GetMagnitude(v2),
121 new DoubleToleranceConstraint(expectedMagnitude, lowPrecisionTolerance), 122 new DoubleToleranceConstraint(expectedMagnitude, lowPrecisionTolerance),
122 "Magnitude of vector was incorrect."); 123 "Magnitude of vector was incorrect.");
123 124/*
124 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); }; 125 TestDelegate d = delegate() { Util.GetNormalizedVector(v1); };
125 bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d); 126 bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d);
126 Assert.That(causesArgumentException, Is.True, 127 Assert.That(causesArgumentException, Is.True,
127 "Getting magnitude of null vector did not cause argument exception."); 128 "Getting magnitude of null vector did not cause argument exception.");
128 129*/
129 Vector3 expectedNormalizedVector = new Vector3(-.577f, -.577f, -.577f); 130 Vector3 expectedNormalizedVector = new Vector3(-.577f, -.577f, -.577f);
130 double expectedNormalizedMagnitude = 1; 131 double expectedNormalizedMagnitude = 1;
131 Vector3 normalizedVector = Util.GetNormalizedVector(v2); 132 Vector3 normalizedVector = Util.GetNormalizedVector(v2);