diff options
author | Melanie | 2012-10-31 21:42:06 +0000 |
---|---|---|
committer | Melanie | 2012-10-31 21:42:06 +0000 |
commit | a2c60943240ad9af8fe2bd86d990f36fc26930ee (patch) | |
tree | 15585e94e32082d7ac74bb341d82ce6bcccb8a57 /OpenSim/Region/ScriptEngine | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Also add the additional ScriptException constructor necessary to get [Seriali... (diff) | |
download | opensim-SC-a2c60943240ad9af8fe2bd86d990f36fc26930ee.zip opensim-SC-a2c60943240ad9af8fe2bd86d990f36fc26930ee.tar.gz opensim-SC-a2c60943240ad9af8fe2bd86d990f36fc26930ee.tar.bz2 opensim-SC-a2c60943240ad9af8fe2bd86d990f36fc26930ee.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Framework/TaskInventoryItem.cs
OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/ScriptException.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/ScriptException.cs b/OpenSim/Region/ScriptEngine/Shared/ScriptException.cs index ae67fc5..f55ba7e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/ScriptException.cs +++ b/OpenSim/Region/ScriptEngine/Shared/ScriptException.cs | |||
@@ -26,9 +26,11 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Runtime.Serialization; | ||
29 | 30 | ||
30 | namespace OpenSim.Region.ScriptEngine.Shared | 31 | namespace OpenSim.Region.ScriptEngine.Shared |
31 | { | 32 | { |
33 | [Serializable] | ||
32 | public class ScriptException : Exception | 34 | public class ScriptException : Exception |
33 | { | 35 | { |
34 | public ScriptException() : base() {} | 36 | public ScriptException() : base() {} |
@@ -36,5 +38,7 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
36 | public ScriptException(string message) : base(message) {} | 38 | public ScriptException(string message) : base(message) {} |
37 | 39 | ||
38 | public ScriptException(string message, Exception innerException) : base(message, innerException) {} | 40 | public ScriptException(string message, Exception innerException) : base(message, innerException) {} |
41 | |||
42 | public ScriptException(SerializationInfo info, StreamingContext context) :base(info, context) {} | ||
39 | } | 43 | } |
40 | } \ No newline at end of file | 44 | } \ No newline at end of file |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs index f247a0b..f331658 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Tests/XEngineTest.cs | |||
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests | |||
90 | // log4net.Config.XmlConfigurator.Configure(); | 90 | // log4net.Config.XmlConfigurator.Configure(); |
91 | 91 | ||
92 | UUID userId = TestHelpers.ParseTail(0x1); | 92 | UUID userId = TestHelpers.ParseTail(0x1); |
93 | // UUID objectId = TestHelpers.ParseTail(0x2); | 93 | // UUID objectId = TestHelpers.ParseTail(0x100); |
94 | // UUID itemId = TestHelpers.ParseTail(0x3); | 94 | // UUID itemId = TestHelpers.ParseTail(0x3); |
95 | string itemName = "TestStartScript() Item"; | 95 | string itemName = "TestStartScript() Item"; |
96 | 96 | ||
@@ -105,12 +105,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Tests | |||
105 | 105 | ||
106 | m_scene.EventManager.OnChatFromWorld += OnChatFromWorld; | 106 | m_scene.EventManager.OnChatFromWorld += OnChatFromWorld; |
107 | 107 | ||
108 | m_scene.RezNewScript(userId, itemTemplate); | 108 | SceneObjectPart partWhereRezzed = m_scene.RezNewScript(userId, itemTemplate); |
109 | 109 | ||
110 | m_chatEvent.WaitOne(60000); | 110 | m_chatEvent.WaitOne(60000); |
111 | 111 | ||
112 | Assert.That(m_osChatMessageReceived, Is.Not.Null, "No chat message received in TestStartScript()"); | 112 | Assert.That(m_osChatMessageReceived, Is.Not.Null, "No chat message received in TestStartScript()"); |
113 | Assert.That(m_osChatMessageReceived.Message, Is.EqualTo("Script running")); | 113 | Assert.That(m_osChatMessageReceived.Message, Is.EqualTo("Script running")); |
114 | |||
115 | bool running; | ||
116 | TaskInventoryItem scriptItem = partWhereRezzed.Inventory.GetInventoryItem(itemName); | ||
117 | Assert.That( | ||
118 | SceneObjectPartInventory.TryGetScriptInstanceRunning(m_scene, scriptItem, out running), Is.True); | ||
119 | Assert.That(running, Is.True); | ||
114 | } | 120 | } |
115 | 121 | ||
116 | private void OnChatFromWorld(object sender, OSChatMessage oscm) | 122 | private void OnChatFromWorld(object sender, OSChatMessage oscm) |