Add lsl event argument checking for attach and on_rez

master-beforevarregion
Justin Clark-Casey (justincc) 2013-12-21 00:08:36 +00:00
parent e298bf41ff
commit b757ab2586
2 changed files with 9220 additions and 8867 deletions

View File

@ -47,6 +47,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
TestCompile("default { bad() {} }", true); TestCompile("default { bad() {} }", true);
} }
[Test]
public void TestAttachEvent()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
TestKeyArgEvent("attach");
}
[Test]
public void TestObjectRezEvent()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
TestKeyArgEvent("object_rez");
}
[Test] [Test]
public void TestMovingEndEvent() public void TestMovingEndEvent()
{ {
@ -251,6 +269,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
TestCompile("default { " + eventName + "(integer n, integer o) {{}} }", true); 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) private void TestVectorArgEvent(string eventName)
{ {
TestCompile("default { " + eventName + "(vector v) {} }", false); TestCompile("default { " + eventName + "(vector v) {} }", false);

File diff suppressed because it is too large Load Diff