diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs index ea43d66..67ce10a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs | |||
@@ -278,6 +278,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
278 | TestIntVecVecArgEvent("at_target"); | 278 | TestIntVecVecArgEvent("at_target"); |
279 | } | 279 | } |
280 | 280 | ||
281 | [Test] | ||
282 | public void TestControlEvent() | ||
283 | { | ||
284 | TestHelpers.InMethod(); | ||
285 | // TestHelpers.EnableLogging(); | ||
286 | |||
287 | TestKeyIntIntArgEvent("control"); | ||
288 | } | ||
289 | |||
281 | private void TestIntArgEvent(string eventName) | 290 | private void TestIntArgEvent(string eventName) |
282 | { | 291 | { |
283 | TestCompile("default { " + eventName + "(integer n) {} }", false); | 292 | TestCompile("default { " + eventName + "(integer n) {} }", false); |
@@ -318,6 +327,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
318 | TestCompile("default { " + eventName + "(integer n, vector v, vector w, vector x) {{}} }", true); | 327 | TestCompile("default { " + eventName + "(integer n, vector v, vector w, vector x) {{}} }", true); |
319 | } | 328 | } |
320 | 329 | ||
330 | private void TestKeyIntIntArgEvent(string eventName) | ||
331 | { | ||
332 | TestCompile("default { " + eventName + "(key k, integer n, integer o) {} }", false); | ||
333 | TestCompile("default { " + eventName + "{{}} }", true); | ||
334 | TestCompile("default { " + eventName + "(string s) {{}} }", true); | ||
335 | TestCompile("default { " + eventName + "(key k, integer n, integer o, integer p) {{}} }", true); | ||
336 | } | ||
337 | |||
321 | private void TestCompile(string script, bool expectException) | 338 | private void TestCompile(string script, bool expectException) |
322 | { | 339 | { |
323 | bool gotException = false; | 340 | bool gotException = false; |