diff options
author | Melanie Thielker | 2008-09-23 12:17:21 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-23 12:17:21 +0000 |
commit | dffa6567e80446199ee672a5e7c7865a573b73b5 (patch) | |
tree | 4323c7a6c774ecdf24b9c1912cf85646fb5bc8ed /OpenSim/Region/ScriptEngine | |
parent | Mantis #2243 (diff) | |
download | opensim-SC-dffa6567e80446199ee672a5e7c7865a573b73b5.zip opensim-SC-dffa6567e80446199ee672a5e7c7865a573b73b5.tar.gz opensim-SC-dffa6567e80446199ee672a5e7c7865a573b73b5.tar.bz2 opensim-SC-dffa6567e80446199ee672a5e7c7865a573b73b5.tar.xz |
Alter tests to match up with the results after tyre's patch
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/Tests/LSL_TypesTestList.cs | 36 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs | 12 |
2 files changed, 19 insertions, 29 deletions
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 | |||
45 | public void TestConcatenateString() | 45 | public void TestConcatenateString() |
46 | { | 46 | { |
47 | LSL_Types.list testList = new LSL_Types.list(1, 'a', "test"); | 47 | LSL_Types.list testList = new LSL_Types.list(1, 'a', "test"); |
48 | testList += "addition"; | 48 | testList += new LSL_Types.LSLString("addition"); |
49 | 49 | ||
50 | Assert.AreEqual(4, testList.Length); | 50 | Assert.AreEqual(4, testList.Length); |
51 | Assert.AreEqual("addition", testList.Data[3]); | 51 | Assert.AreEqual(new LSL_Types.LSLString("addition"), testList.Data[3]); |
52 | Assert.AreEqual(typeof(System.String), testList.Data[3].GetType()); | 52 | Assert.AreEqual(typeof(LSL_Types.LSLString), testList.Data[3].GetType()); |
53 | 53 | ||
54 | LSL_Types.list secondTestList = testList + "more"; | 54 | LSL_Types.list secondTestList = testList + new LSL_Types.LSLString("more"); |
55 | 55 | ||
56 | Assert.AreEqual(5, secondTestList.Length); | 56 | Assert.AreEqual(5, secondTestList.Length); |
57 | Assert.AreEqual("more", secondTestList.Data[4]); | 57 | Assert.AreEqual(new LSL_Types.LSLString("more"), secondTestList.Data[4]); |
58 | Assert.AreEqual(typeof(System.String), secondTestList.Data[4].GetType()); | 58 | Assert.AreEqual(typeof(LSL_Types.LSLString), secondTestList.Data[4].GetType()); |
59 | } | 59 | } |
60 | 60 | ||
61 | /// <summary> | 61 | /// <summary> |
@@ -65,17 +65,17 @@ namespace OpenSim.Region.ScriptEngine.Common.Tests | |||
65 | public void TestConcatenateInteger() | 65 | public void TestConcatenateInteger() |
66 | { | 66 | { |
67 | LSL_Types.list testList = new LSL_Types.list(1, 'a', "test"); | 67 | LSL_Types.list testList = new LSL_Types.list(1, 'a', "test"); |
68 | testList += 20; | 68 | testList += new LSL_Types.LSLInteger(20); |
69 | 69 | ||
70 | Assert.AreEqual(4, testList.Length); | 70 | Assert.AreEqual(4, testList.Length); |
71 | Assert.AreEqual(20, testList.Data[3]); | 71 | Assert.AreEqual(new LSL_Types.LSLInteger(20), testList.Data[3]); |
72 | Assert.AreEqual(typeof(int), testList.Data[3].GetType()); | 72 | Assert.AreEqual(typeof(LSL_Types.LSLInteger), testList.Data[3].GetType()); |
73 | 73 | ||
74 | LSL_Types.list secondTestList = testList + 2; | 74 | LSL_Types.list secondTestList = testList + new LSL_Types.LSLInteger(2); |
75 | 75 | ||
76 | Assert.AreEqual(5, secondTestList.Length); | 76 | Assert.AreEqual(5, secondTestList.Length); |
77 | Assert.AreEqual(2, secondTestList.Data[4]); | 77 | Assert.AreEqual(new LSL_Types.LSLInteger(2), secondTestList.Data[4]); |
78 | Assert.AreEqual(typeof(int), secondTestList.Data[4].GetType()); | 78 | Assert.AreEqual(typeof(LSL_Types.LSLInteger), secondTestList.Data[4].GetType()); |
79 | } | 79 | } |
80 | 80 | ||
81 | /// <summary> | 81 | /// <summary> |
@@ -85,17 +85,17 @@ namespace OpenSim.Region.ScriptEngine.Common.Tests | |||
85 | public void TestConcatenateDouble() | 85 | public void TestConcatenateDouble() |
86 | { | 86 | { |
87 | LSL_Types.list testList = new LSL_Types.list(1, 'a', "test"); | 87 | LSL_Types.list testList = new LSL_Types.list(1, 'a', "test"); |
88 | testList += 2.0; | 88 | testList += new LSL_Types.LSLFloat(2.0); |
89 | 89 | ||
90 | Assert.AreEqual(4, testList.Length); | 90 | Assert.AreEqual(4, testList.Length); |
91 | Assert.AreEqual(2.0, testList.Data[3]); | 91 | Assert.AreEqual(new LSL_Types.LSLFloat(2.0), testList.Data[3]); |
92 | Assert.AreEqual(typeof(double), testList.Data[3].GetType()); | 92 | Assert.AreEqual(typeof(LSL_Types.LSLFloat), testList.Data[3].GetType()); |
93 | 93 | ||
94 | LSL_Types.list secondTestList = testList + 0.04; | 94 | LSL_Types.list secondTestList = testList + new LSL_Types.LSLFloat(0.04); |
95 | 95 | ||
96 | Assert.AreEqual(5, secondTestList.Length); | 96 | Assert.AreEqual(5, secondTestList.Length); |
97 | Assert.AreEqual(0.04, secondTestList.Data[4]); | 97 | Assert.AreEqual(new LSL_Types.LSLFloat(0.04), secondTestList.Data[4]); |
98 | Assert.AreEqual(typeof(double), secondTestList.Data[4].GetType()); | 98 | Assert.AreEqual(typeof(LSL_Types.LSLFloat), secondTestList.Data[4].GetType()); |
99 | } | 99 | } |
100 | } | 100 | } |
101 | } | 101 | } |
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 | |||
40 | /// An interface for a script API module to communicate with | 40 | /// An interface for a script API module to communicate with |
41 | /// the engine it's running under | 41 | /// the engine it's running under |
42 | /// </summary> | 42 | /// </summary> |
43 | public interface IScriptEngine | 43 | public interface IScriptEngine : IEventReceiver |
44 | { | 44 | { |
45 | Scene World { get; } | 45 | Scene World { get; } |
46 | IConfig Config { get; } | 46 | IConfig Config { get; } |
@@ -48,16 +48,6 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
48 | ILog Log { get; } | 48 | ILog Log { get; } |
49 | string ScriptEngineName { get; } | 49 | string ScriptEngineName { get; } |
50 | 50 | ||
51 | /// <summary> | ||
52 | /// Post an event to a single script | ||
53 | /// </summary> | ||
54 | bool PostScriptEvent(UUID itemID, EventParams parms); | ||
55 | |||
56 | /// <summary> | ||
57 | /// Post event to an entire prim | ||
58 | /// </summary> | ||
59 | bool PostObjectEvent(uint localID, EventParams parms); | ||
60 | |||
61 | void ApiResetScript(UUID itemID); | 51 | void ApiResetScript(UUID itemID); |
62 | void ResetScript(UUID itemID); | 52 | void ResetScript(UUID itemID); |
63 | void SetScriptState(UUID itemID, bool state); | 53 | void SetScriptState(UUID itemID, bool state); |