diff options
author | Mike Mazur | 2008-07-28 02:36:26 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-28 02:36:26 +0000 |
commit | d959c65b91a9acc3b29478907a66afc16f01b047 (patch) | |
tree | 34e8caf993bf9ad13ec6f0c45ca1feab59aae163 /OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/LSL_TypesTestLSLString.cs | |
parent | Adding explicit cast from LSLFloat to LSLInteger. Work on issue 1822. (diff) | |
download | opensim-SC_OLD-d959c65b91a9acc3b29478907a66afc16f01b047.zip opensim-SC_OLD-d959c65b91a9acc3b29478907a66afc16f01b047.tar.gz opensim-SC_OLD-d959c65b91a9acc3b29478907a66afc16f01b047.tar.bz2 opensim-SC_OLD-d959c65b91a9acc3b29478907a66afc16f01b047.tar.xz |
-implement LSLString -> Quaternion explicit cast
-sync Shared/LSL_Types.cs with Common/LSL_Types.cs
-get the test script in issue 1822 to compile
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/LSL_TypesTestLSLString.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/LSL_TypesTestLSLString.cs b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/LSL_TypesTestLSLString.cs index ceab376..8fcb385 100644 --- a/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/LSL_TypesTestLSLString.cs +++ b/OpenSim/Tests/OpenSim/Region/ScriptEngine/Shared/LSL_TypesTestLSLString.cs | |||
@@ -94,5 +94,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
94 | Assert.AreEqual(number.Value, testString.m_string); | 94 | Assert.AreEqual(number.Value, testString.m_string); |
95 | } | 95 | } |
96 | } | 96 | } |
97 | |||
98 | /// <summary> | ||
99 | /// Test constructing a Quaternion from a string. | ||
100 | /// </summary> | ||
101 | [Test] | ||
102 | public void TestExplicitCastLSLStringToQuaternion() | ||
103 | { | ||
104 | string quaternionString = "<0.00000, 0.70711, 0.00000, 0.70711>"; | ||
105 | LSL_Types.LSLString quaternionLSLString = new LSL_Types.LSLString(quaternionString); | ||
106 | |||
107 | LSL_Types.Quaternion expectedQuaternion = new LSL_Types.Quaternion(0.0, 0.70711, 0.0, 0.70711); | ||
108 | LSL_Types.Quaternion stringQuaternion = (LSL_Types.Quaternion) quaternionString; | ||
109 | LSL_Types.Quaternion LSLStringQuaternion = (LSL_Types.Quaternion) quaternionLSLString; | ||
110 | |||
111 | Assert.AreEqual(expectedQuaternion, stringQuaternion); | ||
112 | Assert.AreEqual(expectedQuaternion, LSLStringQuaternion); | ||
113 | } | ||
97 | } | 114 | } |
98 | } | 115 | } |