aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Tests
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-03-06 02:21:19 +0000
committerJustin Clark-Casey (justincc)2012-03-06 02:21:19 +0000
commita92153ed88859af9d68b206ec320fc993fe5cdc7 (patch)
tree928539c14c4c398c07be0d97b5ede75b3613e4db /OpenSim/Region/ScriptEngine/Shared/Tests
parentFix off by one error in script error reporting. (diff)
downloadopensim-SC-a92153ed88859af9d68b206ec320fc993fe5cdc7.zip
opensim-SC-a92153ed88859af9d68b206ec320fc993fe5cdc7.tar.gz
opensim-SC-a92153ed88859af9d68b206ec320fc993fe5cdc7.tar.bz2
opensim-SC-a92153ed88859af9d68b206ec320fc993fe5cdc7.tar.xz
Get all test methods in OpenSim.Region.ScriptEngine.Tests.dll to report that they're running
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Tests')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs11
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs74
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs42
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestVector3.cs9
6 files changed, 127 insertions, 25 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
index 3baa723..9cf9258 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs
@@ -46,7 +46,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
46 [TestFixture, LongRunning] 46 [TestFixture, LongRunning]
47 public class LSL_ApiTest 47 public class LSL_ApiTest
48 { 48 {
49
50 private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6; 49 private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6;
51 private const double VECTOR_COMPONENT_ACCURACY = 0.0000005d; 50 private const double VECTOR_COMPONENT_ACCURACY = 0.0000005d;
52 private const float FLOAT_ACCURACY = 0.00005f; 51 private const float FLOAT_ACCURACY = 0.00005f;
@@ -55,7 +54,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
55 [SetUp] 54 [SetUp]
56 public void SetUp() 55 public void SetUp()
57 { 56 {
58
59 IConfigSource initConfigSource = new IniConfigSource(); 57 IConfigSource initConfigSource = new IniConfigSource();
60 IConfig config = initConfigSource.AddConfig("XEngine"); 58 IConfig config = initConfigSource.AddConfig("XEngine");
61 config.Set("Enabled", "true"); 59 config.Set("Enabled", "true");
@@ -75,6 +73,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
75 [Test] 73 [Test]
76 public void TestllAngleBetween() 74 public void TestllAngleBetween()
77 { 75 {
76 TestHelpers.InMethod();
77
78 CheckllAngleBetween(new Vector3(1, 0, 0), 0, 1, 1); 78 CheckllAngleBetween(new Vector3(1, 0, 0), 0, 1, 1);
79 CheckllAngleBetween(new Vector3(1, 0, 0), 90, 1, 1); 79 CheckllAngleBetween(new Vector3(1, 0, 0), 90, 1, 1);
80 CheckllAngleBetween(new Vector3(1, 0, 0), 180, 1, 1); 80 CheckllAngleBetween(new Vector3(1, 0, 0), 180, 1, 1);
@@ -158,6 +158,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
158 // llRot2Euler test. 158 // llRot2Euler test.
159 public void TestllRot2Euler() 159 public void TestllRot2Euler()
160 { 160 {
161 TestHelpers.InMethod();
162
161 // 180, 90 and zero degree rotations. 163 // 180, 90 and zero degree rotations.
162 CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 0.0f, 1.0f)); 164 CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 0.0f, 1.0f));
163 CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 0.707107f, 0.707107f)); 165 CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 0.707107f, 0.707107f));
@@ -256,6 +258,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
256 // llSetPrimitiveParams and llGetPrimitiveParams test. 258 // llSetPrimitiveParams and llGetPrimitiveParams test.
257 public void TestllSetPrimitiveParams() 259 public void TestllSetPrimitiveParams()
258 { 260 {
261 TestHelpers.InMethod();
262
259 // Create Prim1. 263 // Create Prim1.
260 Scene scene = SceneHelpers.SetupScene(); 264 Scene scene = SceneHelpers.SetupScene();
261 string obj1Name = "Prim1"; 265 string obj1Name = "Prim1";
@@ -486,9 +490,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
486 } 490 }
487 491
488 [Test] 492 [Test]
489 // llVecNorm test.
490 public void TestllVecNorm() 493 public void TestllVecNorm()
491 { 494 {
495 TestHelpers.InMethod();
496
492 // Check special case for normalizing zero vector. 497 // Check special case for normalizing zero vector.
493 CheckllVecNorm(new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), new LSL_Types.Vector3(0.0d, 0.0d, 0.0d)); 498 CheckllVecNorm(new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), new LSL_Types.Vector3(0.0d, 0.0d, 0.0d));
494 // Check various vectors. 499 // Check various vectors.
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs
index 10b52cf..3ed2562 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLFloat.cs
@@ -213,6 +213,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
213 [Test] 213 [Test]
214 public void TestConstructFromInt() 214 public void TestConstructFromInt()
215 { 215 {
216 TestHelpers.InMethod();
217
216 LSL_Types.LSLFloat testFloat; 218 LSL_Types.LSLFloat testFloat;
217 219
218 foreach (KeyValuePair<int, double> number in m_intDoubleSet) 220 foreach (KeyValuePair<int, double> number in m_intDoubleSet)
@@ -228,6 +230,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
228 [Test] 230 [Test]
229 public void TestConstructFromDouble() 231 public void TestConstructFromDouble()
230 { 232 {
233 TestHelpers.InMethod();
234
231 LSL_Types.LSLFloat testFloat; 235 LSL_Types.LSLFloat testFloat;
232 236
233 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet) 237 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
@@ -243,6 +247,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
243 [Test] 247 [Test]
244 public void TestExplicitCastLSLFloatToInt() 248 public void TestExplicitCastLSLFloatToInt()
245 { 249 {
250 TestHelpers.InMethod();
251
246 int testNumber; 252 int testNumber;
247 253
248 foreach (KeyValuePair<double, int> number in m_doubleIntSet) 254 foreach (KeyValuePair<double, int> number in m_doubleIntSet)
@@ -258,6 +264,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
258 [Test] 264 [Test]
259 public void TestExplicitCastLSLFloatToUint() 265 public void TestExplicitCastLSLFloatToUint()
260 { 266 {
267 TestHelpers.InMethod();
268
261 uint testNumber; 269 uint testNumber;
262 270
263 foreach (KeyValuePair<double, int> number in m_doubleUintSet) 271 foreach (KeyValuePair<double, int> number in m_doubleUintSet)
@@ -273,6 +281,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
273 [Test] 281 [Test]
274 public void TestImplicitCastLSLFloatToBooleanTrue() 282 public void TestImplicitCastLSLFloatToBooleanTrue()
275 { 283 {
284 TestHelpers.InMethod();
285
276 LSL_Types.LSLFloat testFloat; 286 LSL_Types.LSLFloat testFloat;
277 bool testBool; 287 bool testBool;
278 288
@@ -291,6 +301,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
291 [Test] 301 [Test]
292 public void TestImplicitCastLSLFloatToBooleanFalse() 302 public void TestImplicitCastLSLFloatToBooleanFalse()
293 { 303 {
304 TestHelpers.InMethod();
305
294 LSL_Types.LSLFloat testFloat = new LSL_Types.LSLFloat(0.0); 306 LSL_Types.LSLFloat testFloat = new LSL_Types.LSLFloat(0.0);
295 bool testBool = testFloat; 307 bool testBool = testFloat;
296 308
@@ -303,6 +315,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
303 [Test] 315 [Test]
304 public void TestImplicitCastIntToLSLFloat() 316 public void TestImplicitCastIntToLSLFloat()
305 { 317 {
318 TestHelpers.InMethod();
319
306 LSL_Types.LSLFloat testFloat; 320 LSL_Types.LSLFloat testFloat;
307 321
308 foreach (int number in m_intList) 322 foreach (int number in m_intList)
@@ -318,6 +332,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
318 [Test] 332 [Test]
319 public void TestImplicitCastLSLIntegerToLSLFloat() 333 public void TestImplicitCastLSLIntegerToLSLFloat()
320 { 334 {
335 TestHelpers.InMethod();
336
321 LSL_Types.LSLFloat testFloat; 337 LSL_Types.LSLFloat testFloat;
322 338
323 foreach (int number in m_intList) 339 foreach (int number in m_intList)
@@ -333,6 +349,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
333 [Test] 349 [Test]
334 public void TestExplicitCastLSLIntegerToLSLFloat() 350 public void TestExplicitCastLSLIntegerToLSLFloat()
335 { 351 {
352 TestHelpers.InMethod();
353
336 LSL_Types.LSLFloat testFloat; 354 LSL_Types.LSLFloat testFloat;
337 355
338 foreach (int number in m_intList) 356 foreach (int number in m_intList)
@@ -348,6 +366,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
348 [Test] 366 [Test]
349 public void TestExplicitCastStringToLSLFloat() 367 public void TestExplicitCastStringToLSLFloat()
350 { 368 {
369 TestHelpers.InMethod();
370
351 LSL_Types.LSLFloat testFloat; 371 LSL_Types.LSLFloat testFloat;
352 372
353 foreach (KeyValuePair<string, double> number in m_stringDoubleSet) 373 foreach (KeyValuePair<string, double> number in m_stringDoubleSet)
@@ -363,6 +383,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
363 [Test] 383 [Test]
364 public void TestExplicitCastLSLStringToLSLFloat() 384 public void TestExplicitCastLSLStringToLSLFloat()
365 { 385 {
386 TestHelpers.InMethod();
387
366 LSL_Types.LSLFloat testFloat; 388 LSL_Types.LSLFloat testFloat;
367 389
368 foreach (KeyValuePair<string, double> number in m_stringDoubleSet) 390 foreach (KeyValuePair<string, double> number in m_stringDoubleSet)
@@ -378,6 +400,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
378 [Test] 400 [Test]
379 public void TestImplicitCastDoubleToLSLFloat() 401 public void TestImplicitCastDoubleToLSLFloat()
380 { 402 {
403 TestHelpers.InMethod();
404
381 LSL_Types.LSLFloat testFloat; 405 LSL_Types.LSLFloat testFloat;
382 406
383 foreach (double number in m_doubleList) 407 foreach (double number in m_doubleList)
@@ -393,6 +417,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
393 [Test] 417 [Test]
394 public void TestImplicitCastLSLFloatToDouble() 418 public void TestImplicitCastLSLFloatToDouble()
395 { 419 {
420 TestHelpers.InMethod();
421
396 double testNumber; 422 double testNumber;
397 LSL_Types.LSLFloat testFloat; 423 LSL_Types.LSLFloat testFloat;
398 424
@@ -411,19 +437,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
411 [Test] 437 [Test]
412 public void TestExplicitCastLSLFloatToFloat() 438 public void TestExplicitCastLSLFloatToFloat()
413 { 439 {
414 float testFloat; 440 TestHelpers.InMethod();
415 float numberAsFloat; 441
416 LSL_Types.LSLFloat testLSLFloat; 442 float testFloat;
417 foreach (double number in m_doubleList) 443 float numberAsFloat;
418 { 444 LSL_Types.LSLFloat testLSLFloat;
419 testLSLFloat = new LSL_Types.LSLFloat(number);
420 numberAsFloat = (float)number;
421 testFloat = (float)testLSLFloat;
422
423 Assert.That((double)testFloat, new DoubleToleranceConstraint((double)numberAsFloat, _lowPrecisionTolerance));
424 }
425 }
426 445
446 foreach (double number in m_doubleList)
447 {
448 testLSLFloat = new LSL_Types.LSLFloat(number);
449 numberAsFloat = (float)number;
450 testFloat = (float)testLSLFloat;
451
452 Assert.That((double)testFloat, new DoubleToleranceConstraint((double)numberAsFloat, _lowPrecisionTolerance));
453 }
454 }
427 455
428 /// <summary> 456 /// <summary>
429 /// Tests the equality (==) operator. 457 /// Tests the equality (==) operator.
@@ -431,6 +459,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
431 [Test] 459 [Test]
432 public void TestEqualsOperator() 460 public void TestEqualsOperator()
433 { 461 {
462 TestHelpers.InMethod();
463
434 LSL_Types.LSLFloat testFloatA, testFloatB; 464 LSL_Types.LSLFloat testFloatA, testFloatB;
435 465
436 foreach (double number in m_doubleList) 466 foreach (double number in m_doubleList)
@@ -450,6 +480,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
450 [Test] 480 [Test]
451 public void TestNotEqualOperator() 481 public void TestNotEqualOperator()
452 { 482 {
483 TestHelpers.InMethod();
484
453 LSL_Types.LSLFloat testFloatA, testFloatB; 485 LSL_Types.LSLFloat testFloatA, testFloatB;
454 486
455 foreach (double number in m_doubleList) 487 foreach (double number in m_doubleList)
@@ -469,6 +501,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
469 [Test] 501 [Test]
470 public void TestIncrementOperator() 502 public void TestIncrementOperator()
471 { 503 {
504 TestHelpers.InMethod();
505
472 LSL_Types.LSLFloat testFloat; 506 LSL_Types.LSLFloat testFloat;
473 double testNumber; 507 double testNumber;
474 508
@@ -493,6 +527,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
493 [Test] 527 [Test]
494 public void TestDecrementOperator() 528 public void TestDecrementOperator()
495 { 529 {
530 TestHelpers.InMethod();
531
496 LSL_Types.LSLFloat testFloat; 532 LSL_Types.LSLFloat testFloat;
497 double testNumber; 533 double testNumber;
498 534
@@ -517,6 +553,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
517 [Test] 553 [Test]
518 public void TestToString() 554 public void TestToString()
519 { 555 {
556 TestHelpers.InMethod();
557
520 LSL_Types.LSLFloat testFloat; 558 LSL_Types.LSLFloat testFloat;
521 559
522 foreach (KeyValuePair<double, string> number in m_doubleStringSet) 560 foreach (KeyValuePair<double, string> number in m_doubleStringSet)
@@ -532,6 +570,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
532 [Test] 570 [Test]
533 public void TestAddTwoLSLFloats() 571 public void TestAddTwoLSLFloats()
534 { 572 {
573 TestHelpers.InMethod();
574
535 LSL_Types.LSLFloat testResult; 575 LSL_Types.LSLFloat testResult;
536 576
537 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet) 577 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
@@ -547,6 +587,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
547 [Test] 587 [Test]
548 public void TestSubtractTwoLSLFloats() 588 public void TestSubtractTwoLSLFloats()
549 { 589 {
590 TestHelpers.InMethod();
591
550 LSL_Types.LSLFloat testResult; 592 LSL_Types.LSLFloat testResult;
551 593
552 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet) 594 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
@@ -562,6 +604,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
562 [Test] 604 [Test]
563 public void TestMultiplyTwoLSLFloats() 605 public void TestMultiplyTwoLSLFloats()
564 { 606 {
607 TestHelpers.InMethod();
608
565 LSL_Types.LSLFloat testResult; 609 LSL_Types.LSLFloat testResult;
566 610
567 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet) 611 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
@@ -577,6 +621,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
577 [Test] 621 [Test]
578 public void TestDivideTwoLSLFloats() 622 public void TestDivideTwoLSLFloats()
579 { 623 {
624 TestHelpers.InMethod();
625
580 LSL_Types.LSLFloat testResult; 626 LSL_Types.LSLFloat testResult;
581 627
582 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet) 628 foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
@@ -595,6 +641,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
595 [Test] 641 [Test]
596 public void TestImplicitCastBooleanToLSLFloat() 642 public void TestImplicitCastBooleanToLSLFloat()
597 { 643 {
644 TestHelpers.InMethod();
645
598 LSL_Types.LSLFloat testFloat; 646 LSL_Types.LSLFloat testFloat;
599 647
600 testFloat = (1 == 0); 648 testFloat = (1 == 0);
@@ -610,4 +658,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
610 Assert.That(testFloat.value, new DoubleToleranceConstraint(1.0, _lowPrecisionTolerance)); 658 Assert.That(testFloat.value, new DoubleToleranceConstraint(1.0, _lowPrecisionTolerance));
611 } 659 }
612 } 660 }
613} 661} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
index 3ad673b..8d1169a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLInteger.cs
@@ -79,6 +79,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
79 [Test] 79 [Test]
80 public void TestExplicitCastLSLFloatToLSLInteger() 80 public void TestExplicitCastLSLFloatToLSLInteger()
81 { 81 {
82 TestHelpers.InMethod();
83
82 LSL_Types.LSLInteger testInteger; 84 LSL_Types.LSLInteger testInteger;
83 85
84 foreach (KeyValuePair<double, int> number in m_doubleIntSet) 86 foreach (KeyValuePair<double, int> number in m_doubleIntSet)
@@ -94,6 +96,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
94 [Test] 96 [Test]
95 public void TestExplicitCastStringToLSLInteger() 97 public void TestExplicitCastStringToLSLInteger()
96 { 98 {
99 TestHelpers.InMethod();
100
97 LSL_Types.LSLInteger testInteger; 101 LSL_Types.LSLInteger testInteger;
98 102
99 foreach (KeyValuePair<string, int> number in m_stringIntSet) 103 foreach (KeyValuePair<string, int> number in m_stringIntSet)
@@ -109,6 +113,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
109 [Test] 113 [Test]
110 public void TestExplicitCastLSLStringToLSLInteger() 114 public void TestExplicitCastLSLStringToLSLInteger()
111 { 115 {
116 TestHelpers.InMethod();
117
112 LSL_Types.LSLInteger testInteger; 118 LSL_Types.LSLInteger testInteger;
113 119
114 foreach (KeyValuePair<string, int> number in m_stringIntSet) 120 foreach (KeyValuePair<string, int> number in m_stringIntSet)
@@ -124,6 +130,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
124 [Test] 130 [Test]
125 public void TestImplicitCastBooleanToLSLInteger() 131 public void TestImplicitCastBooleanToLSLInteger()
126 { 132 {
133 TestHelpers.InMethod();
134
127 LSL_Types.LSLInteger testInteger; 135 LSL_Types.LSLInteger testInteger;
128 136
129 testInteger = (1 == 0); 137 testInteger = (1 == 0);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs
index fa976ed..c4ca1a8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestLSLString.cs
@@ -71,6 +71,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
71 [Test] 71 [Test]
72 public void TestConstructFromLSLFloat() 72 public void TestConstructFromLSLFloat()
73 { 73 {
74 TestHelpers.InMethod();
75
74 LSL_Types.LSLString testString; 76 LSL_Types.LSLString testString;
75 77
76 foreach (KeyValuePair<double, string> number in m_doubleStringSet) 78 foreach (KeyValuePair<double, string> number in m_doubleStringSet)
@@ -86,6 +88,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
86 [Test] 88 [Test]
87 public void TestExplicitCastLSLFloatToLSLString() 89 public void TestExplicitCastLSLFloatToLSLString()
88 { 90 {
91 TestHelpers.InMethod();
92
89 LSL_Types.LSLString testString; 93 LSL_Types.LSLString testString;
90 94
91 foreach (KeyValuePair<double, string> number in m_doubleStringSet) 95 foreach (KeyValuePair<double, string> number in m_doubleStringSet)
@@ -101,6 +105,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
101 [Test] 105 [Test]
102 public void TestExplicitCastLSLStringToQuaternion() 106 public void TestExplicitCastLSLStringToQuaternion()
103 { 107 {
108 TestHelpers.InMethod();
109
104 string quaternionString = "<0.00000, 0.70711, 0.00000, 0.70711>"; 110 string quaternionString = "<0.00000, 0.70711, 0.00000, 0.70711>";
105 LSL_Types.LSLString quaternionLSLString = new LSL_Types.LSLString(quaternionString); 111 LSL_Types.LSLString quaternionLSLString = new LSL_Types.LSLString(quaternionString);
106 112
@@ -118,6 +124,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
118 [Test] 124 [Test]
119 public void TestImplicitCastBooleanToLSLFloat() 125 public void TestImplicitCastBooleanToLSLFloat()
120 { 126 {
127 TestHelpers.InMethod();
128
121 LSL_Types.LSLString testString; 129 LSL_Types.LSLString testString;
122 130
123 testString = (LSL_Types.LSLString) (1 == 0); 131 testString = (LSL_Types.LSLString) (1 == 0);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs
index 66a7329..b81225f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestList.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
44 [Test] 44 [Test]
45 public void TestConcatenateString() 45 public void TestConcatenateString()
46 { 46 {
47 TestHelpers.InMethod();
48
47 LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test")); 49 LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test"));
48 testList += new LSL_Types.LSLString("addition"); 50 testList += new LSL_Types.LSLString("addition");
49 51
@@ -64,6 +66,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
64 [Test] 66 [Test]
65 public void TestConcatenateInteger() 67 public void TestConcatenateInteger()
66 { 68 {
69 TestHelpers.InMethod();
70
67 LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test")); 71 LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test"));
68 testList += new LSL_Types.LSLInteger(20); 72 testList += new LSL_Types.LSLInteger(20);
69 73
@@ -84,6 +88,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
84 [Test] 88 [Test]
85 public void TestConcatenateDouble() 89 public void TestConcatenateDouble()
86 { 90 {
91 TestHelpers.InMethod();
92
87 LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test")); 93 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); 94 testList += new LSL_Types.LSLFloat(2.0f);
89 95
@@ -104,6 +110,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
104 [Test] 110 [Test]
105 public void TestCastLSLIntegerItemToLSLInteger() 111 public void TestCastLSLIntegerItemToLSLInteger()
106 { 112 {
113 TestHelpers.InMethod();
114
107 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(123); 115 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(123);
108 LSL_Types.list testList = new LSL_Types.list(testValue); 116 LSL_Types.list testList = new LSL_Types.list(testValue);
109 117
@@ -116,6 +124,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
116 [Test] 124 [Test]
117 public void TestCastLSLFloatItemToLSLFloat() 125 public void TestCastLSLFloatItemToLSLFloat()
118 { 126 {
127 TestHelpers.InMethod();
128
119 LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(123.45678987); 129 LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(123.45678987);
120 LSL_Types.list testList = new LSL_Types.list(testValue); 130 LSL_Types.list testList = new LSL_Types.list(testValue);
121 131
@@ -128,6 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
128 [Test] 138 [Test]
129 public void TestCastLSLStringItemToLSLString() 139 public void TestCastLSLStringItemToLSLString()
130 { 140 {
141 TestHelpers.InMethod();
142
131 LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello there"); 143 LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello there");
132 LSL_Types.list testList = new LSL_Types.list(testValue); 144 LSL_Types.list testList = new LSL_Types.list(testValue);
133 145
@@ -140,6 +152,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
140 [Test] 152 [Test]
141 public void TestCastVector3ItemToVector3() 153 public void TestCastVector3ItemToVector3()
142 { 154 {
155 TestHelpers.InMethod();
156
143 LSL_Types.Vector3 testValue = new LSL_Types.Vector3(12.34, 56.987654, 0.00987); 157 LSL_Types.Vector3 testValue = new LSL_Types.Vector3(12.34, 56.987654, 0.00987);
144 LSL_Types.list testList = new LSL_Types.list(testValue); 158 LSL_Types.list testList = new LSL_Types.list(testValue);
145 159
@@ -151,6 +165,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
151 [Test] 165 [Test]
152 public void TestCastQuaternionItemToQuaternion() 166 public void TestCastQuaternionItemToQuaternion()
153 { 167 {
168 TestHelpers.InMethod();
169
154 LSL_Types.Quaternion testValue = new LSL_Types.Quaternion(12.34, 56.44323, 765.983421, 0.00987); 170 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); 171 LSL_Types.list testList = new LSL_Types.list(testValue);
156 172
@@ -165,6 +181,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
165 [Test] 181 [Test]
166 public void TestGetLSLIntegerItemForLSLIntegerItem() 182 public void TestGetLSLIntegerItemForLSLIntegerItem()
167 { 183 {
184 TestHelpers.InMethod();
185
168 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(999911); 186 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(999911);
169 LSL_Types.list testList = new LSL_Types.list(testValue); 187 LSL_Types.list testList = new LSL_Types.list(testValue);
170 188
@@ -177,6 +195,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
177 [Test] 195 [Test]
178 public void TestGetLSLFloatItemForLSLFloatItem() 196 public void TestGetLSLFloatItemForLSLFloatItem()
179 { 197 {
198 TestHelpers.InMethod();
199
180 LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(321.45687876); 200 LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(321.45687876);
181 LSL_Types.list testList = new LSL_Types.list(testValue); 201 LSL_Types.list testList = new LSL_Types.list(testValue);
182 202
@@ -189,11 +209,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
189 [Test] 209 [Test]
190 public void TestGetLSLFloatItemForLSLIntegerItem() 210 public void TestGetLSLFloatItemForLSLIntegerItem()
191 { 211 {
192 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(3060987); 212 TestHelpers.InMethod();
193 LSL_Types.LSLFloat testFloatValue = new LSL_Types.LSLFloat(testValue); 213
194 LSL_Types.list testList = new LSL_Types.list(testValue); 214 LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(3060987);
215 LSL_Types.LSLFloat testFloatValue = new LSL_Types.LSLFloat(testValue);
216 LSL_Types.list testList = new LSL_Types.list(testValue);
195 217
196 Assert.AreEqual(testFloatValue, testList.GetLSLFloatItem(0)); 218 Assert.AreEqual(testFloatValue, testList.GetLSLFloatItem(0));
197 } 219 }
198 220
199 /// <summary> 221 /// <summary>
@@ -202,6 +224,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
202 [Test] 224 [Test]
203 public void TestGetLSLStringItemForLSLStringItem() 225 public void TestGetLSLStringItemForLSLStringItem()
204 { 226 {
227 TestHelpers.InMethod();
228
205 LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello all"); 229 LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello all");
206 LSL_Types.list testList = new LSL_Types.list(testValue); 230 LSL_Types.list testList = new LSL_Types.list(testValue);
207 231
@@ -214,6 +238,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
214 [Test] 238 [Test]
215 public void TestGetLSLStringItemForKeyItem() 239 public void TestGetLSLStringItemForKeyItem()
216 { 240 {
241 TestHelpers.InMethod();
242
217 LSL_Types.key testValue 243 LSL_Types.key testValue
218 = new LSL_Types.key("98000000-0000-2222-3333-100000001000"); 244 = new LSL_Types.key("98000000-0000-2222-3333-100000001000");
219 LSL_Types.LSLString testStringValue = new LSL_Types.LSLString(testValue); 245 LSL_Types.LSLString testStringValue = new LSL_Types.LSLString(testValue);
@@ -228,6 +254,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
228 [Test] 254 [Test]
229 public void TestGetVector3ItemForVector3Item() 255 public void TestGetVector3ItemForVector3Item()
230 { 256 {
257 TestHelpers.InMethod();
258
231 LSL_Types.Vector3 testValue = new LSL_Types.Vector3(92.34, 58.98754, -0.10987); 259 LSL_Types.Vector3 testValue = new LSL_Types.Vector3(92.34, 58.98754, -0.10987);
232 LSL_Types.list testList = new LSL_Types.list(testValue); 260 LSL_Types.list testList = new LSL_Types.list(testValue);
233 261
@@ -239,6 +267,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
239 [Test] 267 [Test]
240 public void TestGetQuaternionItemForQuaternionItem() 268 public void TestGetQuaternionItemForQuaternionItem()
241 { 269 {
270 TestHelpers.InMethod();
271
242 LSL_Types.Quaternion testValue = new LSL_Types.Quaternion(12.64, 59.43723, 765.3421, 4.00987); 272 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); 273 LSL_Types.list testList = new LSL_Types.list(testValue);
244 274
@@ -251,6 +281,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
251 [Test] 281 [Test]
252 public void TestGetKeyItemForKeyItem() 282 public void TestGetKeyItemForKeyItem()
253 { 283 {
284 TestHelpers.InMethod();
285
254 LSL_Types.key testValue 286 LSL_Types.key testValue
255 = new LSL_Types.key("00000000-0000-2222-3333-100000001012"); 287 = new LSL_Types.key("00000000-0000-2222-3333-100000001012");
256 LSL_Types.list testList = new LSL_Types.list(testValue); 288 LSL_Types.list testList = new LSL_Types.list(testValue);
@@ -258,4 +290,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
258 Assert.AreEqual(testValue, testList.GetKeyItem(0)); 290 Assert.AreEqual(testValue, testList.GetKeyItem(0));
259 } 291 }
260 } 292 }
261} 293} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestVector3.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestVector3.cs
index 195af7f..ebf8001 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestVector3.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_TypesTestVector3.cs
@@ -32,16 +32,17 @@ using OpenSim.Region.ScriptEngine.Shared;
32 32
33namespace OpenSim.Region.ScriptEngine.Shared.Tests 33namespace OpenSim.Region.ScriptEngine.Shared.Tests
34{ 34{
35 /// <summary>
36 /// Tests for Vector3
37 /// </summary>
35 [TestFixture] 38 [TestFixture]
36 public class LSL_TypesTestVector3 39 public class LSL_TypesTestVector3
37 { 40 {
38 /// <summary>
39 /// Tests for Vector3
40 /// </summary>
41 [Test] 41 [Test]
42
43 public void TestDotProduct() 42 public void TestDotProduct()
44 { 43 {
44 TestHelpers.InMethod();
45
45 // The numbers we test for. 46 // The numbers we test for.
46 Dictionary<string, double> expectsSet = new Dictionary<string, double>(); 47 Dictionary<string, double> expectsSet = new Dictionary<string, double>();
47 expectsSet.Add("<1, 2, 3> * <2, 3, 4>", 20.0); 48 expectsSet.Add("<1, 2, 3> * <2, 3, 4>", 20.0);