LSL-PyOptimizer/unit_tests/coverage.suite/inline-4.lsl
Sei Lisa 1867dc78e7 Add the new test suite.
This test suite has been in use for a long time now, in place of the obsolete and unmanageable testparser.py and testfuncs.py. It verifies the complete optimizer output to stdout and stderr, to ensure that the output matches the expectations.

See unit_tests/README.txt for more info.
2019-01-04 20:27:36 +01:00

49 lines
680 B
Text

f1() inline
{
llOwnerSay("f1");
}
f2(integer f2param) inline
{
llOwnerSay("f2:" + (string)f2param);
}
vector f3(integer f3p1, string f3p2) inline
{
f2(f3p1);
integer f3p1; // test shading the parameter
{
jump x;
llOwnerSay("f3:" + (string)f3p1 + f3p2);
}
@x;
if (f3p2 != "") return <1,1,1>;
do ; while (f4());
return <0,0,0>;
}
integer f4() inline
{
return llGetLinkNumber();
}
say(string s) inline
{
llOwnerSay(s);
}
default
{
state_entry()
{
f1();
if (1) f1();
f2(3);
if (f3(4, "x") == ZERO_VECTOR) llOwnerSay("ok");
}
timer()
{
say("hi");
}
}