diff options
Diffstat (limited to 'OpenSim/Tests')
-rw-r--r-- | OpenSim/Tests/Region/ScriptEngine/Shared/LSL_TypesTestList.cs | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/OpenSim/Tests/Region/ScriptEngine/Shared/LSL_TypesTestList.cs b/OpenSim/Tests/Region/ScriptEngine/Shared/LSL_TypesTestList.cs index 9e8d716..ca59c97 100644 --- a/OpenSim/Tests/Region/ScriptEngine/Shared/LSL_TypesTestList.cs +++ b/OpenSim/Tests/Region/ScriptEngine/Shared/LSL_TypesTestList.cs | |||
@@ -157,6 +157,105 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
157 | Assert.AreEqual(testValue, (LSL_Types.Quaternion)testList.Data[0]); | 157 | Assert.AreEqual(testValue, (LSL_Types.Quaternion)testList.Data[0]); |
158 | } | 158 | } |
159 | 159 | ||
160 | //==================================================================================== | ||
160 | 161 | ||
162 | /// <summary> | ||
163 | /// Tests GetLSLIntegerItem for LSLInteger item. | ||
164 | /// </summary> | ||
165 | [Test] | ||
166 | public void TestGetLSLIntegerItemForLSLIntegerItem() | ||
167 | { | ||
168 | LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(999911); | ||
169 | LSL_Types.list testList = new LSL_Types.list(testValue); | ||
170 | |||
171 | Assert.AreEqual(testValue, testList.GetLSLIntegerItem(0)); | ||
172 | } | ||
173 | |||
174 | /// <summary> | ||
175 | /// Tests GetLSLFloatItem for LSLFloat item. | ||
176 | /// </summary> | ||
177 | [Test] | ||
178 | public void TestGetLSLFloatItemForLSLFloatItem() | ||
179 | { | ||
180 | LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(321.45687876); | ||
181 | LSL_Types.list testList = new LSL_Types.list(testValue); | ||
182 | |||
183 | Assert.AreEqual(testValue, testList.GetLSLFloatItem(0)); | ||
184 | } | ||
185 | |||
186 | /// <summary> | ||
187 | /// Tests GetLSLFloatItem for LSLInteger item. | ||
188 | /// </summary> | ||
189 | [Test] | ||
190 | public void TestGetLSLFloatItemForLSLIntegerItem() | ||
191 | { | ||
192 | LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(3060987); | ||
193 | LSL_Types.LSLFloat testFloatValue = new LSL_Types.LSLFloat(testValue); | ||
194 | LSL_Types.list testList = new LSL_Types.list(testValue); | ||
195 | |||
196 | Assert.AreEqual(testFloatValue, testList.GetLSLFloatItem(0)); | ||
197 | } | ||
198 | |||
199 | /// <summary> | ||
200 | /// Tests GetLSLStringItem for LSLString item. | ||
201 | /// </summary> | ||
202 | [Test] | ||
203 | public void TestGetLSLStringItemForLSLStringItem() | ||
204 | { | ||
205 | LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello all"); | ||
206 | LSL_Types.list testList = new LSL_Types.list(testValue); | ||
207 | |||
208 | Assert.AreEqual(testValue, testList.GetLSLStringItem(0)); | ||
209 | } | ||
210 | |||
211 | /// <summary> | ||
212 | /// Tests GetLSLStringItem for key item. | ||
213 | /// </summary> | ||
214 | [Test] | ||
215 | public void TestGetLSLStringItemForKeyItem() | ||
216 | { | ||
217 | LSL_Types.key testValue | ||
218 | = new LSL_Types.key("98000000-0000-2222-3333-100000001000"); | ||
219 | LSL_Types.LSLString testStringValue = new LSL_Types.LSLString(testValue); | ||
220 | LSL_Types.list testList = new LSL_Types.list(testValue); | ||
221 | |||
222 | Assert.AreEqual(testStringValue, testList.GetLSLStringItem(0)); | ||
223 | } | ||
224 | |||
225 | /// <summary> | ||
226 | /// Tests GetVector3Item for Vector3 item. | ||
227 | /// </summary> | ||
228 | [Test] | ||
229 | public void TestGetVector3ItemForVector3Item() | ||
230 | { | ||
231 | LSL_Types.Vector3 testValue = new LSL_Types.Vector3(92.34, 58.98754, -0.10987); | ||
232 | LSL_Types.list testList = new LSL_Types.list(testValue); | ||
233 | |||
234 | Assert.AreEqual(testValue, testList.GetVector3Item(0)); | ||
235 | } | ||
236 | /// <summary> | ||
237 | /// Tests GetQuaternionItem for Quaternion item. | ||
238 | /// </summary> | ||
239 | [Test] | ||
240 | public void TestGetQuaternionItemForQuaternionItem() | ||
241 | { | ||
242 | LSL_Types.Quaternion testValue = new LSL_Types.Quaternion(12.64, 59.43723, 765.3421, 4.00987); | ||
243 | LSL_Types.list testList = new LSL_Types.list(testValue); | ||
244 | |||
245 | Assert.AreEqual(testValue, testList.GetQuaternionItem(0)); | ||
246 | } | ||
247 | |||
248 | /// <summary> | ||
249 | /// Tests GetKeyItem for key item. | ||
250 | /// </summary> | ||
251 | [Test] | ||
252 | public void TestGetKeyItemForKeyItem() | ||
253 | { | ||
254 | LSL_Types.key testValue | ||
255 | = new LSL_Types.key("00000000-0000-2222-3333-100000001012"); | ||
256 | LSL_Types.list testList = new LSL_Types.list(testValue); | ||
257 | |||
258 | Assert.AreEqual(testValue, testList.GetKeyItem(0)); | ||
259 | } | ||
161 | } | 260 | } |
162 | } | 261 | } |