From b757ab2586a68e3e79ea364fa2aa944f8431b8c0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 21 Dec 2013 00:08:36 +0000 Subject: Add lsl event argument checking for attach and on_rez --- .../Shared/CodeTools/Tests/LSL_EventTests.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs index 5dcdf1a..4e27c00 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs @@ -48,6 +48,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests } [Test] + public void TestAttachEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestKeyArgEvent("attach"); + } + + [Test] + public void TestObjectRezEvent() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + TestKeyArgEvent("object_rez"); + } + + [Test] public void TestMovingEndEvent() { TestHelpers.InMethod(); @@ -251,6 +269,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests TestCompile("default { " + eventName + "(integer n, integer o) {{}} }", true); } + private void TestKeyArgEvent(string eventName) + { + TestCompile("default { " + eventName + "(key k) {} }", false); + TestCompile("default { " + eventName + "{{}} }", true); + TestCompile("default { " + eventName + "(string s) {{}} }", true); + TestCompile("default { " + eventName + "(key k, key l) {{}} }", true); + } + private void TestVectorArgEvent(string eventName) { TestCompile("default { " + eventName + "(vector v) {} }", false); -- cgit v1.1