Add lsl event arg checking for at_rot_target

master-beforevarregion
Justin Clark-Casey (justincc) 2013-12-21 00:37:56 +00:00
parent b757ab2586
commit a5e4780547
2 changed files with 9435 additions and 9044 deletions

View File

@ -260,6 +260,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
TestVectorArgEvent("land_collision_end");
}
[Test]
public void TestAtRotTargetEvent()
{
TestHelpers.InMethod();
// TestHelpers.EnableLogging();
TestIntRotRotArgEvent("at_rot_target");
}
private void TestIntArgEvent(string eventName)
{
@ -285,6 +293,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
TestCompile("default { " + eventName + "(vector v, vector w) {{}} }", true);
}
private void TestIntRotRotArgEvent(string eventName)
{
TestCompile("default { " + eventName + "(integer n, rotation r, rotation s) {} }", false);
TestCompile("default { " + eventName + "{{}} }", true);
TestCompile("default { " + eventName + "(string s) {{}} }", true);
TestCompile("default { " + eventName + "(integer n, rotation r, rotation s, rotation t) {{}} }", true);
}
private void TestCompile(string script, bool expectException)
{
bool gotException = false;

File diff suppressed because it is too large Load Diff