Alter tests to match up with the results after tyre's patch
parent
44e566260c
commit
dffa6567e8
|
@ -45,17 +45,17 @@ namespace OpenSim.Region.ScriptEngine.Common.Tests
|
|||
public void TestConcatenateString()
|
||||
{
|
||||
LSL_Types.list testList = new LSL_Types.list(1, 'a', "test");
|
||||
testList += "addition";
|
||||
testList += new LSL_Types.LSLString("addition");
|
||||
|
||||
Assert.AreEqual(4, testList.Length);
|
||||
Assert.AreEqual("addition", testList.Data[3]);
|
||||
Assert.AreEqual(typeof(System.String), testList.Data[3].GetType());
|
||||
Assert.AreEqual(new LSL_Types.LSLString("addition"), testList.Data[3]);
|
||||
Assert.AreEqual(typeof(LSL_Types.LSLString), testList.Data[3].GetType());
|
||||
|
||||
LSL_Types.list secondTestList = testList + "more";
|
||||
LSL_Types.list secondTestList = testList + new LSL_Types.LSLString("more");
|
||||
|
||||
Assert.AreEqual(5, secondTestList.Length);
|
||||
Assert.AreEqual("more", secondTestList.Data[4]);
|
||||
Assert.AreEqual(typeof(System.String), secondTestList.Data[4].GetType());
|
||||
Assert.AreEqual(new LSL_Types.LSLString("more"), secondTestList.Data[4]);
|
||||
Assert.AreEqual(typeof(LSL_Types.LSLString), secondTestList.Data[4].GetType());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -65,17 +65,17 @@ namespace OpenSim.Region.ScriptEngine.Common.Tests
|
|||
public void TestConcatenateInteger()
|
||||
{
|
||||
LSL_Types.list testList = new LSL_Types.list(1, 'a', "test");
|
||||
testList += 20;
|
||||
testList += new LSL_Types.LSLInteger(20);
|
||||
|
||||
Assert.AreEqual(4, testList.Length);
|
||||
Assert.AreEqual(20, testList.Data[3]);
|
||||
Assert.AreEqual(typeof(int), testList.Data[3].GetType());
|
||||
Assert.AreEqual(new LSL_Types.LSLInteger(20), testList.Data[3]);
|
||||
Assert.AreEqual(typeof(LSL_Types.LSLInteger), testList.Data[3].GetType());
|
||||
|
||||
LSL_Types.list secondTestList = testList + 2;
|
||||
LSL_Types.list secondTestList = testList + new LSL_Types.LSLInteger(2);
|
||||
|
||||
Assert.AreEqual(5, secondTestList.Length);
|
||||
Assert.AreEqual(2, secondTestList.Data[4]);
|
||||
Assert.AreEqual(typeof(int), secondTestList.Data[4].GetType());
|
||||
Assert.AreEqual(new LSL_Types.LSLInteger(2), secondTestList.Data[4]);
|
||||
Assert.AreEqual(typeof(LSL_Types.LSLInteger), secondTestList.Data[4].GetType());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -85,17 +85,17 @@ namespace OpenSim.Region.ScriptEngine.Common.Tests
|
|||
public void TestConcatenateDouble()
|
||||
{
|
||||
LSL_Types.list testList = new LSL_Types.list(1, 'a', "test");
|
||||
testList += 2.0;
|
||||
testList += new LSL_Types.LSLFloat(2.0);
|
||||
|
||||
Assert.AreEqual(4, testList.Length);
|
||||
Assert.AreEqual(2.0, testList.Data[3]);
|
||||
Assert.AreEqual(typeof(double), testList.Data[3].GetType());
|
||||
Assert.AreEqual(new LSL_Types.LSLFloat(2.0), testList.Data[3]);
|
||||
Assert.AreEqual(typeof(LSL_Types.LSLFloat), testList.Data[3].GetType());
|
||||
|
||||
LSL_Types.list secondTestList = testList + 0.04;
|
||||
LSL_Types.list secondTestList = testList + new LSL_Types.LSLFloat(0.04);
|
||||
|
||||
Assert.AreEqual(5, secondTestList.Length);
|
||||
Assert.AreEqual(0.04, secondTestList.Data[4]);
|
||||
Assert.AreEqual(typeof(double), secondTestList.Data[4].GetType());
|
||||
Assert.AreEqual(new LSL_Types.LSLFloat(0.04), secondTestList.Data[4]);
|
||||
Assert.AreEqual(typeof(LSL_Types.LSLFloat), secondTestList.Data[4].GetType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
|
|||
/// An interface for a script API module to communicate with
|
||||
/// the engine it's running under
|
||||
/// </summary>
|
||||
public interface IScriptEngine
|
||||
public interface IScriptEngine : IEventReceiver
|
||||
{
|
||||
Scene World { get; }
|
||||
IConfig Config { get; }
|
||||
|
@ -48,16 +48,6 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
|
|||
ILog Log { get; }
|
||||
string ScriptEngineName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Post an event to a single script
|
||||
/// </summary>
|
||||
bool PostScriptEvent(UUID itemID, EventParams parms);
|
||||
|
||||
/// <summary>
|
||||
/// Post event to an entire prim
|
||||
/// </summary>
|
||||
bool PostObjectEvent(uint localID, EventParams parms);
|
||||
|
||||
void ApiResetScript(UUID itemID);
|
||||
void ResetScript(UUID itemID);
|
||||
void SetScriptState(UUID itemID, bool state);
|
||||
|
|
Loading…
Reference in New Issue