mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
Get all test methods in OpenSim.Region.ScriptEngine.Tests.dll to report that they're running
This commit is contained in:
@@ -46,7 +46,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[TestFixture, LongRunning]
|
||||
public class LSL_ApiTest
|
||||
{
|
||||
|
||||
private const double ANGLE_ACCURACY_IN_RADIANS = 1E-6;
|
||||
private const double VECTOR_COMPONENT_ACCURACY = 0.0000005d;
|
||||
private const float FLOAT_ACCURACY = 0.00005f;
|
||||
@@ -55,7 +54,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[SetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
|
||||
IConfigSource initConfigSource = new IniConfigSource();
|
||||
IConfig config = initConfigSource.AddConfig("XEngine");
|
||||
config.Set("Enabled", "true");
|
||||
@@ -75,6 +73,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestllAngleBetween()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
CheckllAngleBetween(new Vector3(1, 0, 0), 0, 1, 1);
|
||||
CheckllAngleBetween(new Vector3(1, 0, 0), 90, 1, 1);
|
||||
CheckllAngleBetween(new Vector3(1, 0, 0), 180, 1, 1);
|
||||
@@ -158,6 +158,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
// llRot2Euler test.
|
||||
public void TestllRot2Euler()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
// 180, 90 and zero degree rotations.
|
||||
CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 0.0f, 1.0f));
|
||||
CheckllRot2Euler(new LSL_Types.Quaternion(0.0f, 0.0f, 0.707107f, 0.707107f));
|
||||
@@ -256,6 +258,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
// llSetPrimitiveParams and llGetPrimitiveParams test.
|
||||
public void TestllSetPrimitiveParams()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
// Create Prim1.
|
||||
Scene scene = SceneHelpers.SetupScene();
|
||||
string obj1Name = "Prim1";
|
||||
@@ -486,9 +490,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
}
|
||||
|
||||
[Test]
|
||||
// llVecNorm test.
|
||||
public void TestllVecNorm()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
// Check special case for normalizing zero vector.
|
||||
CheckllVecNorm(new LSL_Types.Vector3(0.0d, 0.0d, 0.0d), new LSL_Types.Vector3(0.0d, 0.0d, 0.0d));
|
||||
// Check various vectors.
|
||||
|
||||
@@ -213,6 +213,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestConstructFromInt()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
foreach (KeyValuePair<int, double> number in m_intDoubleSet)
|
||||
@@ -228,6 +230,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestConstructFromDouble()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
|
||||
@@ -243,6 +247,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastLSLFloatToInt()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
int testNumber;
|
||||
|
||||
foreach (KeyValuePair<double, int> number in m_doubleIntSet)
|
||||
@@ -258,6 +264,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastLSLFloatToUint()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
uint testNumber;
|
||||
|
||||
foreach (KeyValuePair<double, int> number in m_doubleUintSet)
|
||||
@@ -273,6 +281,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestImplicitCastLSLFloatToBooleanTrue()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
bool testBool;
|
||||
|
||||
@@ -291,6 +301,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestImplicitCastLSLFloatToBooleanFalse()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat = new LSL_Types.LSLFloat(0.0);
|
||||
bool testBool = testFloat;
|
||||
|
||||
@@ -303,6 +315,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestImplicitCastIntToLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
foreach (int number in m_intList)
|
||||
@@ -318,6 +332,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestImplicitCastLSLIntegerToLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
foreach (int number in m_intList)
|
||||
@@ -333,6 +349,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastLSLIntegerToLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
foreach (int number in m_intList)
|
||||
@@ -348,6 +366,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastStringToLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
foreach (KeyValuePair<string, double> number in m_stringDoubleSet)
|
||||
@@ -363,6 +383,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastLSLStringToLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
foreach (KeyValuePair<string, double> number in m_stringDoubleSet)
|
||||
@@ -378,6 +400,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestImplicitCastDoubleToLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
foreach (double number in m_doubleList)
|
||||
@@ -393,6 +417,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestImplicitCastLSLFloatToDouble()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
double testNumber;
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
@@ -411,26 +437,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastLSLFloatToFloat()
|
||||
{
|
||||
float testFloat;
|
||||
float numberAsFloat;
|
||||
LSL_Types.LSLFloat testLSLFloat;
|
||||
foreach (double number in m_doubleList)
|
||||
{
|
||||
testLSLFloat = new LSL_Types.LSLFloat(number);
|
||||
numberAsFloat = (float)number;
|
||||
testFloat = (float)testLSLFloat;
|
||||
TestHelpers.InMethod();
|
||||
|
||||
Assert.That((double)testFloat, new DoubleToleranceConstraint((double)numberAsFloat, _lowPrecisionTolerance));
|
||||
}
|
||||
float testFloat;
|
||||
float numberAsFloat;
|
||||
LSL_Types.LSLFloat testLSLFloat;
|
||||
|
||||
foreach (double number in m_doubleList)
|
||||
{
|
||||
testLSLFloat = new LSL_Types.LSLFloat(number);
|
||||
numberAsFloat = (float)number;
|
||||
testFloat = (float)testLSLFloat;
|
||||
|
||||
Assert.That((double)testFloat, new DoubleToleranceConstraint((double)numberAsFloat, _lowPrecisionTolerance));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Tests the equality (==) operator.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestEqualsOperator()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloatA, testFloatB;
|
||||
|
||||
foreach (double number in m_doubleList)
|
||||
@@ -450,6 +480,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestNotEqualOperator()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloatA, testFloatB;
|
||||
|
||||
foreach (double number in m_doubleList)
|
||||
@@ -469,6 +501,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestIncrementOperator()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
double testNumber;
|
||||
|
||||
@@ -493,6 +527,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestDecrementOperator()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
double testNumber;
|
||||
|
||||
@@ -517,6 +553,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestToString()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
foreach (KeyValuePair<double, string> number in m_doubleStringSet)
|
||||
@@ -532,6 +570,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestAddTwoLSLFloats()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testResult;
|
||||
|
||||
foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
|
||||
@@ -547,6 +587,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestSubtractTwoLSLFloats()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testResult;
|
||||
|
||||
foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
|
||||
@@ -562,6 +604,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestMultiplyTwoLSLFloats()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testResult;
|
||||
|
||||
foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
|
||||
@@ -577,6 +621,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestDivideTwoLSLFloats()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testResult;
|
||||
|
||||
foreach (KeyValuePair<double, double> number in m_doubleDoubleSet)
|
||||
@@ -595,6 +641,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestImplicitCastBooleanToLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testFloat;
|
||||
|
||||
testFloat = (1 == 0);
|
||||
@@ -610,4 +658,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
Assert.That(testFloat.value, new DoubleToleranceConstraint(1.0, _lowPrecisionTolerance));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastLSLFloatToLSLInteger()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLInteger testInteger;
|
||||
|
||||
foreach (KeyValuePair<double, int> number in m_doubleIntSet)
|
||||
@@ -94,6 +96,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastStringToLSLInteger()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLInteger testInteger;
|
||||
|
||||
foreach (KeyValuePair<string, int> number in m_stringIntSet)
|
||||
@@ -109,6 +113,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastLSLStringToLSLInteger()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLInteger testInteger;
|
||||
|
||||
foreach (KeyValuePair<string, int> number in m_stringIntSet)
|
||||
@@ -124,6 +130,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestImplicitCastBooleanToLSLInteger()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLInteger testInteger;
|
||||
|
||||
testInteger = (1 == 0);
|
||||
|
||||
@@ -71,6 +71,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestConstructFromLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLString testString;
|
||||
|
||||
foreach (KeyValuePair<double, string> number in m_doubleStringSet)
|
||||
@@ -86,6 +88,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastLSLFloatToLSLString()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLString testString;
|
||||
|
||||
foreach (KeyValuePair<double, string> number in m_doubleStringSet)
|
||||
@@ -101,6 +105,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestExplicitCastLSLStringToQuaternion()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
string quaternionString = "<0.00000, 0.70711, 0.00000, 0.70711>";
|
||||
LSL_Types.LSLString quaternionLSLString = new LSL_Types.LSLString(quaternionString);
|
||||
|
||||
@@ -118,6 +124,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestImplicitCastBooleanToLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLString testString;
|
||||
|
||||
testString = (LSL_Types.LSLString) (1 == 0);
|
||||
|
||||
@@ -44,6 +44,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestConcatenateString()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test"));
|
||||
testList += new LSL_Types.LSLString("addition");
|
||||
|
||||
@@ -64,6 +66,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestConcatenateInteger()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test"));
|
||||
testList += new LSL_Types.LSLInteger(20);
|
||||
|
||||
@@ -84,6 +88,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestConcatenateDouble()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.list testList = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger('a'), new LSL_Types.LSLString("test"));
|
||||
testList += new LSL_Types.LSLFloat(2.0f);
|
||||
|
||||
@@ -104,6 +110,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestCastLSLIntegerItemToLSLInteger()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(123);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -116,6 +124,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestCastLSLFloatItemToLSLFloat()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(123.45678987);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -128,6 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestCastLSLStringItemToLSLString()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello there");
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -140,6 +152,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestCastVector3ItemToVector3()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.Vector3 testValue = new LSL_Types.Vector3(12.34, 56.987654, 0.00987);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -151,6 +165,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestCastQuaternionItemToQuaternion()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.Quaternion testValue = new LSL_Types.Quaternion(12.34, 56.44323, 765.983421, 0.00987);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -165,6 +181,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestGetLSLIntegerItemForLSLIntegerItem()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(999911);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -177,6 +195,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestGetLSLFloatItemForLSLFloatItem()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLFloat testValue = new LSL_Types.LSLFloat(321.45687876);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -189,11 +209,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestGetLSLFloatItemForLSLIntegerItem()
|
||||
{
|
||||
LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(3060987);
|
||||
LSL_Types.LSLFloat testFloatValue = new LSL_Types.LSLFloat(testValue);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
TestHelpers.InMethod();
|
||||
|
||||
Assert.AreEqual(testFloatValue, testList.GetLSLFloatItem(0));
|
||||
LSL_Types.LSLInteger testValue = new LSL_Types.LSLInteger(3060987);
|
||||
LSL_Types.LSLFloat testFloatValue = new LSL_Types.LSLFloat(testValue);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
Assert.AreEqual(testFloatValue, testList.GetLSLFloatItem(0));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -202,6 +224,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestGetLSLStringItemForLSLStringItem()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.LSLString testValue = new LSL_Types.LSLString("hello all");
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -214,6 +238,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestGetLSLStringItemForKeyItem()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.key testValue
|
||||
= new LSL_Types.key("98000000-0000-2222-3333-100000001000");
|
||||
LSL_Types.LSLString testStringValue = new LSL_Types.LSLString(testValue);
|
||||
@@ -228,6 +254,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestGetVector3ItemForVector3Item()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.Vector3 testValue = new LSL_Types.Vector3(92.34, 58.98754, -0.10987);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -239,6 +267,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestGetQuaternionItemForQuaternionItem()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.Quaternion testValue = new LSL_Types.Quaternion(12.64, 59.43723, 765.3421, 4.00987);
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
|
||||
@@ -251,6 +281,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
[Test]
|
||||
public void TestGetKeyItemForKeyItem()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
LSL_Types.key testValue
|
||||
= new LSL_Types.key("00000000-0000-2222-3333-100000001012");
|
||||
LSL_Types.list testList = new LSL_Types.list(testValue);
|
||||
@@ -258,4 +290,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
Assert.AreEqual(testValue, testList.GetKeyItem(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,16 +32,17 @@ using OpenSim.Region.ScriptEngine.Shared;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
{
|
||||
/// <summary>
|
||||
/// Tests for Vector3
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
public class LSL_TypesTestVector3
|
||||
{
|
||||
/// <summary>
|
||||
/// Tests for Vector3
|
||||
/// </summary>
|
||||
[Test]
|
||||
|
||||
public void TestDotProduct()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
|
||||
// The numbers we test for.
|
||||
Dictionary<string, double> expectsSet = new Dictionary<string, double>();
|
||||
expectsSet.Add("<1, 2, 3> * <2, 3, 4>", 20.0);
|
||||
|
||||
Reference in New Issue
Block a user