diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Tests/UtilTest.cs | 7 |
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); |