From dffa6567e80446199ee672a5e7c7865a573b73b5 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 23 Sep 2008 12:17:21 +0000 Subject: Alter tests to match up with the results after tyre's patch --- .../ScriptEngine/Common/Tests/LSL_TypesTestList.cs | 36 +++++++++++----------- .../ScriptEngine/Interfaces/IScriptEngine.cs | 12 +------- 2 files changed, 19 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestList.cs b/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestList.cs index e63200e..500d19a 100644 --- a/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestList.cs +++ b/OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestList.cs @@ -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()); } /// @@ -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()); } /// @@ -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()); } } } diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs index ba7e653..64e8c80 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs @@ -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 /// - 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; } - /// - /// Post an event to a single script - /// - bool PostScriptEvent(UUID itemID, EventParams parms); - - /// - /// Post event to an entire prim - /// - bool PostObjectEvent(uint localID, EventParams parms); - void ApiResetScript(UUID itemID); void ResetScript(UUID itemID); void SetScriptState(UUID itemID, bool state); -- cgit v1.1