Add arg checking for at_target lsl event
parent
a5e4780547
commit
871ac5b16c
|
@ -269,6 +269,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||||
TestIntRotRotArgEvent("at_rot_target");
|
TestIntRotRotArgEvent("at_rot_target");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestAtTargetEvent()
|
||||||
|
{
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
// TestHelpers.EnableLogging();
|
||||||
|
|
||||||
|
TestIntVecVecArgEvent("at_target");
|
||||||
|
}
|
||||||
|
|
||||||
private void TestIntArgEvent(string eventName)
|
private void TestIntArgEvent(string eventName)
|
||||||
{
|
{
|
||||||
TestCompile("default { " + eventName + "(integer n) {} }", false);
|
TestCompile("default { " + eventName + "(integer n) {} }", false);
|
||||||
|
@ -301,6 +310,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||||
TestCompile("default { " + eventName + "(integer n, rotation r, rotation s, rotation t) {{}} }", true);
|
TestCompile("default { " + eventName + "(integer n, rotation r, rotation s, rotation t) {{}} }", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TestIntVecVecArgEvent(string eventName)
|
||||||
|
{
|
||||||
|
TestCompile("default { " + eventName + "(integer n, vector v, vector w) {} }", false);
|
||||||
|
TestCompile("default { " + eventName + "{{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(string s) {{}} }", true);
|
||||||
|
TestCompile("default { " + eventName + "(integer n, vector v, vector w, vector x) {{}} }", true);
|
||||||
|
}
|
||||||
|
|
||||||
private void TestCompile(string script, bool expectException)
|
private void TestCompile(string script, bool expectException)
|
||||||
{
|
{
|
||||||
bool gotException = false;
|
bool gotException = false;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue