Add lsl event argument checking for attach and on_rez
parent
e298bf41ff
commit
b757ab2586
|
@ -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
Loading…
Reference in New Issue