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.
This commit is contained in:
49
unit_tests/coverage.suite/inline-4.lsl
Normal file
49
unit_tests/coverage.suite/inline-4.lsl
Normal file
@@ -0,0 +1,49 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user