aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorlbsa712009-04-09 20:06:27 +0000
committerlbsa712009-04-09 20:06:27 +0000
commit6af0751cc5d276370c7c4ce2a0ee064b1106a7bc (patch)
tree8fae62569ca8bfd02d55a783893b2f412dae89e5 /OpenSim/Region/ScriptEngine
parent* Remove Autooar module pending it's migration to the forge (diff)
downloadopensim-SC-6af0751cc5d276370c7c4ce2a0ee064b1106a7bc.zip
opensim-SC-6af0751cc5d276370c7c4ce2a0ee064b1106a7bc.tar.gz
opensim-SC-6af0751cc5d276370c7c4ce2a0ee064b1106a7bc.tar.bz2
opensim-SC-6af0751cc5d276370c7c4ce2a0ee064b1106a7bc.tar.xz
* Tagged long running tests with LongRunningAttribute.
* Now, the 144 unit tests takes roughly as long time to run (16s on my laptop) that the 10 long running takes. The database tests takes forever. * Feel free to run the unit tests as you code, and the rest before commit.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
index cde772b..cf98cf1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
@@ -41,12 +41,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
41 /// <summary> 41 /// <summary>
42 /// Tests for LSL_Api 42 /// Tests for LSL_Api
43 /// </summary> 43 /// </summary>
44 [TestFixture] 44 [TestFixture, LongRunning]
45 public class LSL_ApiTest 45 public class LSL_ApiTest
46 { 46 {
47 47
48 private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6; 48 private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6;
49 private LSL_Api lslApi; 49 private LSL_Api m_lslApi;
50 50
51 [SetUp] 51 [SetUp]
52 public void SetUp() 52 public void SetUp()
@@ -62,8 +62,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
62 XEngine.XEngine engine = new XEngine.XEngine(); 62 XEngine.XEngine engine = new XEngine.XEngine();
63 engine.Initialise(scene, initConfigSource); 63 engine.Initialise(scene, initConfigSource);
64 64
65 lslApi = new LSL_Api(); 65 m_lslApi = new LSL_Api();
66 lslApi.Initialize(engine, part, part.LocalId, part.UUID); 66 m_lslApi.Initialize(engine, part, part.LocalId, part.UUID);
67 67
68 } 68 }
69 69
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
92 Quaternion rotation1 = Quaternion.CreateFromAxisAngle(axis, 0); 92 Quaternion rotation1 = Quaternion.CreateFromAxisAngle(axis, 0);
93 Quaternion rotation2 = Quaternion.CreateFromAxisAngle(axis, ToRadians(originalAngle)); 93 Quaternion rotation2 = Quaternion.CreateFromAxisAngle(axis, ToRadians(originalAngle));
94 94
95 double deducedAngle = FromLslFloat(lslApi.llAngleBetween(ToLslQuaternion(rotation2), ToLslQuaternion(rotation1))); 95 double deducedAngle = FromLslFloat(m_lslApi.llAngleBetween(ToLslQuaternion(rotation2), ToLslQuaternion(rotation1)));
96 96
97 Assert.Greater(deducedAngle, ToRadians(originalAngle) - ANGLE_ACCURACY_IN_RADIANS); 97 Assert.Greater(deducedAngle, ToRadians(originalAngle) - ANGLE_ACCURACY_IN_RADIANS);
98 Assert.Less(deducedAngle, ToRadians(originalAngle) + ANGLE_ACCURACY_IN_RADIANS); 98 Assert.Less(deducedAngle, ToRadians(originalAngle) + ANGLE_ACCURACY_IN_RADIANS);