diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Tests')
7 files changed, 23 insertions, 26 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs index 36c7582..6dd6c17 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
94 | TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, userId); | 94 | TaskInventoryHelpers.AddSceneObject(m_scene, so1.RootPart, inventoryItemName, itemId, userId); |
95 | 95 | ||
96 | LSL_Api api = new LSL_Api(); | 96 | LSL_Api api = new LSL_Api(); |
97 | api.Initialize(new ScriptInstance(m_engine, so1.RootPart, null, 0, false, int.MaxValue)); | 97 | api.Initialize(m_engine, so1.RootPart, null, null); |
98 | 98 | ||
99 | // Create a second object | 99 | // Create a second object |
100 | SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, userId, "so2", 0x100); | 100 | SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, userId, "so2", 0x100); |
@@ -127,7 +127,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
127 | SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, user1Id, "so1", 0x10); | 127 | SceneObjectGroup so1 = SceneHelpers.CreateSceneObject(1, user1Id, "so1", 0x10); |
128 | m_scene.AddSceneObject(so1); | 128 | m_scene.AddSceneObject(so1); |
129 | LSL_Api api = new LSL_Api(); | 129 | LSL_Api api = new LSL_Api(); |
130 | api.Initialize(new ScriptInstance(m_engine, so1.RootPart, null, 0, false, int.MaxValue)); | 130 | api.Initialize(m_engine, so1.RootPart, null, null); |
131 | 131 | ||
132 | // Create an object embedded inside the first | 132 | // Create an object embedded inside the first |
133 | UUID itemId = TestHelpers.ParseTail(0x20); | 133 | UUID itemId = TestHelpers.ParseTail(0x20); |
@@ -137,7 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
137 | SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, user2Id, "so2", 0x100); | 137 | SceneObjectGroup so2 = SceneHelpers.CreateSceneObject(1, user2Id, "so2", 0x100); |
138 | m_scene.AddSceneObject(so2); | 138 | m_scene.AddSceneObject(so2); |
139 | LSL_Api api2 = new LSL_Api(); | 139 | LSL_Api api2 = new LSL_Api(); |
140 | api2.Initialize(new ScriptInstance(m_engine, so2.RootPart, null, 0, false, int.MaxValue)); | 140 | api2.Initialize(m_engine, so2.RootPart, null, null); |
141 | 141 | ||
142 | // *** Firstly, we test where llAllowInventoryDrop() has not been called. *** | 142 | // *** Firstly, we test where llAllowInventoryDrop() has not been called. *** |
143 | api.llGiveInventory(so2.UUID.ToString(), inventoryItemName); | 143 | api.llGiveInventory(so2.UUID.ToString(), inventoryItemName); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs index 5121344..5b57bbe 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs | |||
@@ -105,7 +105,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
105 | m_scene.AddSceneObject(grp2); | 105 | m_scene.AddSceneObject(grp2); |
106 | 106 | ||
107 | LSL_Api apiGrp1 = new LSL_Api(); | 107 | LSL_Api apiGrp1 = new LSL_Api(); |
108 | apiGrp1.Initialize(new ScriptInstance(m_engine, grp1.RootPart, grp1Item, 0, false, int.MaxValue)); | 108 | apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item, null); |
109 | 109 | ||
110 | apiGrp1.llCreateLink(grp2.UUID.ToString(), ScriptBaseClass.TRUE); | 110 | apiGrp1.llCreateLink(grp2.UUID.ToString(), ScriptBaseClass.TRUE); |
111 | 111 | ||
@@ -132,7 +132,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
132 | grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; | 132 | grp1Item.PermsMask |= ScriptBaseClass.PERMISSION_CHANGE_LINKS; |
133 | 133 | ||
134 | LSL_Api apiGrp1 = new LSL_Api(); | 134 | LSL_Api apiGrp1 = new LSL_Api(); |
135 | apiGrp1.Initialize(new ScriptInstance(m_engine, grp1.RootPart, grp1Item, 0, false, int.MaxValue)); | 135 | apiGrp1.Initialize(m_engine, grp1.RootPart, grp1Item, null); |
136 | 136 | ||
137 | apiGrp1.llBreakLink(2); | 137 | apiGrp1.llBreakLink(2); |
138 | 138 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs index 28e5831..60de5cb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
68 | engine.AddRegion(scene); | 68 | engine.AddRegion(scene); |
69 | 69 | ||
70 | m_lslApi = new LSL_Api(); | 70 | m_lslApi = new LSL_Api(); |
71 | m_lslApi.Initialize(new ScriptInstance(engine, part, null, 0, false, int.MaxValue)); | 71 | m_lslApi.Initialize(engine, part, null, null); |
72 | } | 72 | } |
73 | 73 | ||
74 | [Test] | 74 | [Test] |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs index 48c2465..e97ae06 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiTest.cs | |||
@@ -67,7 +67,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
67 | engine.AddRegion(scene); | 67 | engine.AddRegion(scene); |
68 | 68 | ||
69 | m_lslApi = new LSL_Api(); | 69 | m_lslApi = new LSL_Api(); |
70 | m_lslApi.Initialize(new ScriptInstance(engine, part, null, 0, false, int.MaxValue)); | 70 | m_lslApi.Initialize(engine, part, null, null); |
71 | } | 71 | } |
72 | 72 | ||
73 | [Test] | 73 | [Test] |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs index 5164d4e..c88bad5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
94 | m_scene.AddSceneObject(so); | 94 | m_scene.AddSceneObject(so); |
95 | 95 | ||
96 | OSSL_Api osslApi = new OSSL_Api(); | 96 | OSSL_Api osslApi = new OSSL_Api(); |
97 | osslApi.Initialize(new ScriptInstance(m_engine, part, null, 0, false, int.MaxValue)); | 97 | osslApi.Initialize(m_engine, part, null, null); |
98 | 98 | ||
99 | string notecardName = "appearanceNc"; | 99 | string notecardName = "appearanceNc"; |
100 | 100 | ||
@@ -135,7 +135,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
135 | m_scene.AddSceneObject(so); | 135 | m_scene.AddSceneObject(so); |
136 | 136 | ||
137 | OSSL_Api osslApi = new OSSL_Api(); | 137 | OSSL_Api osslApi = new OSSL_Api(); |
138 | osslApi.Initialize(new ScriptInstance(m_engine, part, null, 0, false, int.MaxValue)); | 138 | osslApi.Initialize(m_engine, part, null, null); |
139 | 139 | ||
140 | string notecardName = "appearanceNc"; | 140 | string notecardName = "appearanceNc"; |
141 | 141 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs index e7b3319..b2803a1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAttachmentTests.cs | |||
@@ -99,10 +99,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
99 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); | 99 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); |
100 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); | 100 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); |
101 | 101 | ||
102 | ScriptInstance si = new ScriptInstance(m_engine, inWorldObj.RootPart, scriptItem, 0, false, int.MaxValue); | 102 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); |
103 | new LSL_Api().Initialize(si); | ||
104 | OSSL_Api osslApi = new OSSL_Api(); | 103 | OSSL_Api osslApi = new OSSL_Api(); |
105 | osslApi.Initialize(si); | 104 | osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); |
106 | 105 | ||
107 | // SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, ua1.PrincipalID); | 106 | // SceneObjectGroup sog1 = SceneHelpers.CreateSceneObject(1, ua1.PrincipalID); |
108 | 107 | ||
@@ -146,10 +145,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
146 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); | 145 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); |
147 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); | 146 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); |
148 | 147 | ||
149 | ScriptInstance si = new ScriptInstance(m_engine, inWorldObj.RootPart, scriptItem, 0, false, int.MaxValue); | 148 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); |
150 | new LSL_Api().Initialize(si); | ||
151 | OSSL_Api osslApi = new OSSL_Api(); | 149 | OSSL_Api osslApi = new OSSL_Api(); |
152 | osslApi.Initialize(si); | 150 | osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); |
153 | 151 | ||
154 | // Create an object embedded inside the first | 152 | // Create an object embedded inside the first |
155 | TaskInventoryHelpers.AddNotecard( | 153 | TaskInventoryHelpers.AddNotecard( |
@@ -195,10 +193,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
195 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); | 193 | SceneObjectGroup inWorldObj = SceneHelpers.AddSceneObject(m_scene, "inWorldObj", ua1.PrincipalID); |
196 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); | 194 | TaskInventoryItem scriptItem = TaskInventoryHelpers.AddScript(m_scene, inWorldObj.RootPart); |
197 | 195 | ||
198 | ScriptInstance si = new ScriptInstance(m_engine, inWorldObj.RootPart, scriptItem, 0, false, int.MaxValue); | 196 | new LSL_Api().Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); |
199 | new LSL_Api().Initialize(si); | ||
200 | OSSL_Api osslApi = new OSSL_Api(); | 197 | OSSL_Api osslApi = new OSSL_Api(); |
201 | osslApi.Initialize(si); | 198 | osslApi.Initialize(m_engine, inWorldObj.RootPart, scriptItem, null); |
202 | 199 | ||
203 | // Create an object embedded inside the first | 200 | // Create an object embedded inside the first |
204 | TaskInventoryHelpers.AddSceneObject( | 201 | TaskInventoryHelpers.AddSceneObject( |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs index 584f44f..1f8a6e5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs | |||
@@ -100,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
100 | m_scene.AddSceneObject(so); | 100 | m_scene.AddSceneObject(so); |
101 | 101 | ||
102 | OSSL_Api osslApi = new OSSL_Api(); | 102 | OSSL_Api osslApi = new OSSL_Api(); |
103 | osslApi.Initialize(new ScriptInstance(m_engine, part, null, 0, false, int.MaxValue)); | 103 | osslApi.Initialize(m_engine, part, null, null); |
104 | 104 | ||
105 | string notecardName = "appearanceNc"; | 105 | string notecardName = "appearanceNc"; |
106 | osslApi.osOwnerSaveAppearance(notecardName); | 106 | osslApi.osOwnerSaveAppearance(notecardName); |
@@ -126,7 +126,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
126 | m_scene.AddSceneObject(so); | 126 | m_scene.AddSceneObject(so); |
127 | 127 | ||
128 | OSSL_Api osslApi = new OSSL_Api(); | 128 | OSSL_Api osslApi = new OSSL_Api(); |
129 | osslApi.Initialize(new ScriptInstance(m_engine, so.RootPart, null, 0, false, int.MaxValue)); | 129 | osslApi.Initialize(m_engine, so.RootPart, null, null); |
130 | 130 | ||
131 | bool gotExpectedException = false; | 131 | bool gotExpectedException = false; |
132 | try | 132 | try |
@@ -161,7 +161,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
161 | m_scene.AddSceneObject(so); | 161 | m_scene.AddSceneObject(so); |
162 | 162 | ||
163 | OSSL_Api osslApi = new OSSL_Api(); | 163 | OSSL_Api osslApi = new OSSL_Api(); |
164 | osslApi.Initialize(new ScriptInstance(m_engine, part, null, 0, false, int.MaxValue)); | 164 | osslApi.Initialize(m_engine, part, null, null); |
165 | 165 | ||
166 | string notecardName = "appearanceNc"; | 166 | string notecardName = "appearanceNc"; |
167 | osslApi.osOwnerSaveAppearance(notecardName); | 167 | osslApi.osOwnerSaveAppearance(notecardName); |
@@ -195,7 +195,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
195 | m_scene.AddSceneObject(so); | 195 | m_scene.AddSceneObject(so); |
196 | 196 | ||
197 | OSSL_Api osslApi = new OSSL_Api(); | 197 | OSSL_Api osslApi = new OSSL_Api(); |
198 | osslApi.Initialize(new ScriptInstance(m_engine, part, null, 0, false, int.MaxValue)); | 198 | osslApi.Initialize(m_engine, part, null, null); |
199 | 199 | ||
200 | osslApi.osOwnerSaveAppearance(firstAppearanceNcName); | 200 | osslApi.osOwnerSaveAppearance(firstAppearanceNcName); |
201 | 201 | ||
@@ -233,7 +233,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
233 | m_scene.AddSceneObject(so); | 233 | m_scene.AddSceneObject(so); |
234 | 234 | ||
235 | OSSL_Api osslApi = new OSSL_Api(); | 235 | OSSL_Api osslApi = new OSSL_Api(); |
236 | osslApi.Initialize(new ScriptInstance(m_engine, part, null, 0, false, int.MaxValue)); | 236 | osslApi.Initialize(m_engine, part, null, null); |
237 | 237 | ||
238 | osslApi.osOwnerSaveAppearance(firstAppearanceNcName); | 238 | osslApi.osOwnerSaveAppearance(firstAppearanceNcName); |
239 | 239 | ||
@@ -285,10 +285,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
285 | m_scene.AddSceneObject(otherSo); | 285 | m_scene.AddSceneObject(otherSo); |
286 | 286 | ||
287 | OSSL_Api osslApi = new OSSL_Api(); | 287 | OSSL_Api osslApi = new OSSL_Api(); |
288 | osslApi.Initialize(new ScriptInstance(m_engine, part, null, 0, false, int.MaxValue)); | 288 | osslApi.Initialize(m_engine, part, null, null); |
289 | 289 | ||
290 | OSSL_Api otherOsslApi = new OSSL_Api(); | 290 | OSSL_Api otherOsslApi = new OSSL_Api(); |
291 | otherOsslApi.Initialize(new ScriptInstance(m_engine, otherPart, null, 0, false, int.MaxValue)); | 291 | otherOsslApi.Initialize(m_engine, otherPart, null, null); |
292 | 292 | ||
293 | string notecardName = "appearanceNc"; | 293 | string notecardName = "appearanceNc"; |
294 | osslApi.osOwnerSaveAppearance(notecardName); | 294 | osslApi.osOwnerSaveAppearance(notecardName); |
@@ -332,7 +332,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
332 | m_scene.AddSceneObject(so); | 332 | m_scene.AddSceneObject(so); |
333 | 333 | ||
334 | OSSL_Api osslApi = new OSSL_Api(); | 334 | OSSL_Api osslApi = new OSSL_Api(); |
335 | osslApi.Initialize(new ScriptInstance(m_engine, part, null, 0, false, int.MaxValue)); | 335 | osslApi.Initialize(m_engine, part, null, null); |
336 | 336 | ||
337 | string notecardName = "appearanceNc"; | 337 | string notecardName = "appearanceNc"; |
338 | osslApi.osOwnerSaveAppearance(notecardName); | 338 | osslApi.osOwnerSaveAppearance(notecardName); |