aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs90
1 files changed, 45 insertions, 45 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs
index 7da28dd..843da8e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs
@@ -85,17 +85,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
85 public void TestConcatenateDouble() 85 public void TestConcatenateDouble()
86 { 86 {
87 LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test")); 87 LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test"));
88 testList += new LSL_Types.LSLFloat(2.0f); 88 testList += new LSL_Types.LSLFloat(2.0f);
89 89
90 Assert.AreEqual(4, testList.Length); 90 Assert.AreEqual(4, testList.Length);
91 Assert.AreEqual(new LSL_Types.LSLFloat(2.0f), testList.Data[3]); 91 Assert.AreEqual(new LSL_Types.LSLFloat(2.0f), testList.Data[3]);
92 Assert.AreEqual(typeof(LSL_Types.LSLFloat), testList.Data[3].GetType()); 92 Assert.AreEqual(typeof(LSL_Types.LSLFloat), testList.Data[3].GetType());
93 93
94 LSL_Types.list secondTestList = testList + new LSL_Types.LSLFloat(0.04f); 94 LSL_Types.list secondTestList = testList + new LSL_Types.LSLFloat(0.04f);
95 95
96 Assert.AreEqual(5, secondTestList.Length); 96 Assert.AreEqual(5, secondTestList.Length);
97 Assert.AreEqual(new LSL_Types.LSLFloat(0.04f), secondTestList.Data[4]); 97 Assert.AreEqual(new LSL_Types.LSLFloat(0.04f), secondTestList.Data[4]);
98 Assert.AreEqual(typeof(LSL_Types.LSLFloat), secondTestList.Data[4].GetType()); 98 Assert.AreEqual(typeof(LSL_Types.LSLFloat), secondTestList.Data[4].GetType());
99 } 99 }
100 100
101 /// <summary> 101 /// <summary>
@@ -104,10 +104,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
104 [Test] 104 [Test]
105 public void TestCastLSLIntegerItemToLSLInteger() 105 public void TestCastLSLIntegerItemToLSLInteger()
106 { 106 {
107 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(123); 107 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(123);
108 LSL_Types.list testList = new LSL_Types.list(testValue); 108 LSL_Types.list testList = new LSL_Types.list(testValue);
109 109
110 Assert.AreEqual(testValue, (LSL_Types.LSLInteger)testList.Data[0]); 110 Assert.AreEqual(testValue, (LSL_Types.LSLInteger)testList.Data[0]);
111 } 111 }
112 112
113 /// <summary> 113 /// <summary>
@@ -116,10 +116,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
116 [Test] 116 [Test]
117 public void TestCastLSLFloatItemToLSLFloat() 117 public void TestCastLSLFloatItemToLSLFloat()
118 { 118 {
119 LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(123.45678987); 119 LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(123.45678987);
120 LSL_Types.list testList = new LSL_Types.list(testValue); 120 LSL_Types.list testList = new LSL_Types.list(testValue);
121 121
122 Assert.AreEqual(testValue, (LSL_Types.LSLFloat)testList.Data[0]); 122 Assert.AreEqual(testValue, (LSL_Types.LSLFloat)testList.Data[0]);
123 } 123 }
124 124
125 /// <summary> 125 /// <summary>
@@ -128,10 +128,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
128 [Test] 128 [Test]
129 public void TestCastLSLStringItemToLSLString() 129 public void TestCastLSLStringItemToLSLString()
130 { 130 {
131 LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello there"); 131 LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello there");
132 LSL_Types.list testList = new LSL_Types.list(testValue); 132 LSL_Types.list testList = new LSL_Types.list(testValue);
133 133
134 Assert.AreEqual(testValue, (LSL_Types.LSLString)testList.Data[0]); 134 Assert.AreEqual(testValue, (LSL_Types.LSLString)testList.Data[0]);
135 } 135 }
136 136
137 /// <summary> 137 /// <summary>
@@ -140,10 +140,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
140 [Test] 140 [Test]
141 public void TestCastVector3ItemToVector3() 141 public void TestCastVector3ItemToVector3()
142 { 142 {
143 LSL_Types.Vector3 testValue = new LSL_Types.Vector3(12.34, 56.987654, 0.00987); 143 LSL_Types.Vector3 testValue = new LSL_Types.Vector3(12.34, 56.987654, 0.00987);
144 LSL_Types.list testList = new LSL_Types.list(testValue); 144 LSL_Types.list testList = new LSL_Types.list(testValue);
145 145
146 Assert.AreEqual(testValue, (LSL_Types.Vector3)testList.Data[0]); 146 Assert.AreEqual(testValue, (LSL_Types.Vector3)testList.Data[0]);
147 } 147 }
148 /// <summary> 148 /// <summary>
149 /// Tests casting Quaternion item to Quaternion. 149 /// Tests casting Quaternion item to Quaternion.
@@ -151,10 +151,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
151 [Test] 151 [Test]
152 public void TestCastQuaternionItemToQuaternion() 152 public void TestCastQuaternionItemToQuaternion()
153 { 153 {
154 LSL_Types.Quaternion testValue = new LSL_Types.Quaternion(12.34, 56.44323, 765.983421, 0.00987); 154 LSL_Types.Quaternion testValue = new LSL_Types.Quaternion(12.34, 56.44323, 765.983421, 0.00987);
155 LSL_Types.list testList = new LSL_Types.list(testValue); 155 LSL_Types.list testList = new LSL_Types.list(testValue);
156 156
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//====================================================================================
@@ -165,10 +165,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
165 [Test] 165 [Test]
166 public void TestGetLSLIntegerItemForLSLIntegerItem() 166 public void TestGetLSLIntegerItemForLSLIntegerItem()
167 { 167 {
168 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(999911); 168 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(999911);
169 LSL_Types.list testList = new LSL_Types.list(testValue); 169 LSL_Types.list testList = new LSL_Types.list(testValue);
170 170
171 Assert.AreEqual(testValue, testList.GetLSLIntegerItem(0)); 171 Assert.AreEqual(testValue, testList.GetLSLIntegerItem(0));
172 } 172 }
173 173
174 /// <summary> 174 /// <summary>
@@ -177,10 +177,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
177 [Test] 177 [Test]
178 public void TestGetLSLFloatItemForLSLFloatItem() 178 public void TestGetLSLFloatItemForLSLFloatItem()
179 { 179 {
180 LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(321.45687876); 180 LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(321.45687876);
181 LSL_Types.list testList = new LSL_Types.list(testValue); 181 LSL_Types.list testList = new LSL_Types.list(testValue);
182 182
183 Assert.AreEqual(testValue, testList.GetLSLFloatItem(0)); 183 Assert.AreEqual(testValue, testList.GetLSLFloatItem(0));
184 } 184 }
185 185
186 /// <summary> 186 /// <summary>
@@ -202,10 +202,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
202 [Test] 202 [Test]
203 public void TestGetLSLStringItemForLSLStringItem() 203 public void TestGetLSLStringItemForLSLStringItem()
204 { 204 {
205 LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello all"); 205 LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello all");
206 LSL_Types.list testList = new LSL_Types.list(testValue); 206 LSL_Types.list testList = new LSL_Types.list(testValue);
207 207
208 Assert.AreEqual(testValue, testList.GetLSLStringItem(0)); 208 Assert.AreEqual(testValue, testList.GetLSLStringItem(0));
209 } 209 }
210 210
211 /// <summary> 211 /// <summary>
@@ -214,12 +214,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
214 [Test] 214 [Test]
215 public void TestGetLSLStringItemForKeyItem() 215 public void TestGetLSLStringItemForKeyItem()
216 { 216 {
217 LSL_Types.key testValue 217 LSL_Types.key testValue
218 = new LSL_Types.key("98000000-0000-2222-3333-100000001000"); 218 = new LSL_Types.key("98000000-0000-2222-3333-100000001000");
219 LSL_Types.LSLString testStringValue = new LSL_Types.LSLString(testValue); 219 LSL_Types.LSLString testStringValue = new LSL_Types.LSLString(testValue);
220 LSL_Types.list testList = new LSL_Types.list(testValue); 220 LSL_Types.list testList = new LSL_Types.list(testValue);
221 221
222 Assert.AreEqual(testStringValue, testList.GetLSLStringItem(0)); 222 Assert.AreEqual(testStringValue, testList.GetLSLStringItem(0));
223 } 223 }
224 224
225 /// <summary> 225 /// <summary>
@@ -228,10 +228,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
228 [Test] 228 [Test]
229 public void TestGetVector3ItemForVector3Item() 229 public void TestGetVector3ItemForVector3Item()
230 { 230 {
231 LSL_Types.Vector3 testValue = new LSL_Types.Vector3(92.34, 58.98754, -0.10987); 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); 232 LSL_Types.list testList = new LSL_Types.list(testValue);
233 233
234 Assert.AreEqual(testValue, testList.GetVector3Item(0)); 234 Assert.AreEqual(testValue, testList.GetVector3Item(0));
235 } 235 }
236 /// <summary> 236 /// <summary>
237 /// Tests GetQuaternionItem for Quaternion item. 237 /// Tests GetQuaternionItem for Quaternion item.
@@ -239,10 +239,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
239 [Test] 239 [Test]
240 public void TestGetQuaternionItemForQuaternionItem() 240 public void TestGetQuaternionItemForQuaternionItem()
241 { 241 {
242 LSL_Types.Quaternion testValue = new LSL_Types.Quaternion(12.64, 59.43723, 765.3421, 4.00987); 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); 243 LSL_Types.list testList = new LSL_Types.list(testValue);
244 244
245 Assert.AreEqual(testValue, testList.GetQuaternionItem(0)); 245 Assert.AreEqual(testValue, testList.GetQuaternionItem(0));
246 } 246 }
247 247
248 /// <summary> 248 /// <summary>
@@ -251,11 +251,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
251 [Test] 251 [Test]
252 public void TestGetKeyItemForKeyItem() 252 public void TestGetKeyItemForKeyItem()
253 { 253 {
254 LSL_Types.key testValue 254 LSL_Types.key testValue
255 = new LSL_Types.key("00000000-0000-2222-3333-100000001012"); 255 = new LSL_Types.key("00000000-0000-2222-3333-100000001012");
256 LSL_Types.list testList = new LSL_Types.list(testValue); 256 LSL_Types.list testList = new LSL_Types.list(testValue);
257 257
258 Assert.AreEqual(testValue, testList.GetKeyItem(0)); 258 Assert.AreEqual(testValue, testList.GetKeyItem(0));
259 } 259 }
260 } 260 }
261} 261}