Add arg checking for at_target lsl event

master-beforevarregion
Justin Clark-Casey (justincc) 2013-12-21 00:46:34 +00:00
parent a5e4780547
commit 871ac5b16c
2 changed files with 9450 additions and 9120 deletions

View File

@ -269,6 +269,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
TestIntRotRotArgEvent("at_rot_target");
}
[Test]
public void TestAtTargetEvent()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
TestIntVecVecArgEvent("at_target");
}
private void TestIntArgEvent(string eventName)
{
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);
}
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)
{
bool gotException = false;

File diff suppressed because it is too large Load Diff