diff options
author | Justin Clark-Casey (justincc) | 2013-12-21 00:46:34 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-12-21 00:46:34 +0000 |
commit | 871ac5b16c368fb08045db7c48857db93da5899e (patch) | |
tree | f58016f224005918a7770bf10e5bbe3cc32a4ab1 /OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs | |
parent | Add lsl event arg checking for at_rot_target (diff) | |
download | opensim-SC-871ac5b16c368fb08045db7c48857db93da5899e.zip opensim-SC-871ac5b16c368fb08045db7c48857db93da5899e.tar.gz opensim-SC-871ac5b16c368fb08045db7c48857db93da5899e.tar.bz2 opensim-SC-871ac5b16c368fb08045db7c48857db93da5899e.tar.xz |
Add arg checking for at_target lsl event
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs index 854b4bf..ea43d66 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs | |||
@@ -269,6 +269,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
269 | TestIntRotRotArgEvent("at_rot_target"); | 269 | TestIntRotRotArgEvent("at_rot_target"); |
270 | } | 270 | } |
271 | 271 | ||
272 | [Test] | ||
273 | public void TestAtTargetEvent() | ||
274 | { | ||
275 | TestHelpers.InMethod(); | ||
276 | // TestHelpers.EnableLogging(); | ||
277 | |||
278 | TestIntVecVecArgEvent("at_target"); | ||
279 | } | ||
280 | |||
272 | private void TestIntArgEvent(string eventName) | 281 | private void TestIntArgEvent(string eventName) |
273 | { | 282 | { |
274 | TestCompile("default { " + eventName + "(integer n) {} }", false); | 283 | TestCompile("default { " + eventName + "(integer n) {} }", false); |
@@ -301,6 +310,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
301 | TestCompile("default { " + eventName + "(integer n, rotation r, rotation s, rotation t) {{}} }", true); | 310 | TestCompile("default { " + eventName + "(integer n, rotation r, rotation s, rotation t) {{}} }", true); |
302 | } | 311 | } |
303 | 312 | ||
313 | private void TestIntVecVecArgEvent(string eventName) | ||
314 | { | ||
315 | TestCompile("default { " + eventName + "(integer n, vector v, vector w) {} }", false); | ||
316 | TestCompile("default { " + eventName + "{{}} }", true); | ||
317 | TestCompile("default { " + eventName + "(string s) {{}} }", true); | ||
318 | TestCompile("default { " + eventName + "(integer n, vector v, vector w, vector x) {{}} }", true); | ||
319 | } | ||
320 | |||
304 | private void TestCompile(string script, bool expectException) | 321 | private void TestCompile(string script, bool expectException) |
305 | { | 322 | { |
306 | bool gotException = false; | 323 | bool gotException = false; |