diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Framework/Tests/UtilTest.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to 'OpenSim/Framework/Tests/UtilTest.cs')
-rw-r--r-- | OpenSim/Framework/Tests/UtilTest.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Framework/Tests/UtilTest.cs b/OpenSim/Framework/Tests/UtilTest.cs index cfe3139..b3d79ee 100644 --- a/OpenSim/Framework/Tests/UtilTest.cs +++ b/OpenSim/Framework/Tests/UtilTest.cs | |||
@@ -59,12 +59,12 @@ namespace OpenSim.Framework.Tests | |||
59 | Assert.That(Util.GetMagnitude(v2), | 59 | Assert.That(Util.GetMagnitude(v2), |
60 | new DoubleToleranceConstraint(expectedMagnitude, lowPrecisionTolerance), | 60 | new DoubleToleranceConstraint(expectedMagnitude, lowPrecisionTolerance), |
61 | "Magnitude of vector was incorrect."); | 61 | "Magnitude of vector was incorrect."); |
62 | 62 | /* | |
63 | TestDelegate d = delegate() { Util.GetNormalizedVector(v1); }; | 63 | TestDelegate d = delegate() { Util.GetNormalizedVector(v1); }; |
64 | bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d); | 64 | bool causesArgumentException = TestHelpers.AssertThisDelegateCausesArgumentException(d); |
65 | Assert.That(causesArgumentException, Is.True, | 65 | Assert.That(causesArgumentException, Is.True, |
66 | "Getting magnitude of null vector did not cause argument exception."); | 66 | "Getting magnitude of null vector did not cause argument exception."); |
67 | 67 | */ | |
68 | Vector3 expectedNormalizedVector = new Vector3(.577f, .577f, .577f); | 68 | Vector3 expectedNormalizedVector = new Vector3(.577f, .577f, .577f); |
69 | double expectedNormalizedMagnitude = 1; | 69 | double expectedNormalizedMagnitude = 1; |
70 | Vector3 normalizedVector = Util.GetNormalizedVector(v2); | 70 | Vector3 normalizedVector = Util.GetNormalizedVector(v2); |
@@ -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); |
@@ -232,7 +233,7 @@ namespace OpenSim.Framework.Tests | |||
232 | "application/vnd.ll.clothing", | 233 | "application/vnd.ll.clothing", |
233 | "application/vnd.ll.gesture" | 234 | "application/vnd.ll.gesture" |
234 | }; | 235 | }; |
235 | 236 | ||
236 | for (int i=0;i<inventorytypes.Length;i++) | 237 | for (int i=0;i<inventorytypes.Length;i++) |
237 | { | 238 | { |
238 | Assert.AreEqual(invcontenttypes[i], SLUtil.SLInvTypeToContentType(inventorytypes[i]), | 239 | Assert.AreEqual(invcontenttypes[i], SLUtil.SLInvTypeToContentType(inventorytypes[i]), |