LSL-PyOptimizer/unit_tests/coverage.suite/lsloutput-1.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

37 lines
1 KiB
Text

list L = [llList2Key([llUnescapeURL("%09")], 0)];
float f1 = -0.; // kept the same
float f2 = -3.; // transformed to -3
default
{
state_entry()
{
float f0 = -15.5; // transformed to (float)-15.5
vector v = <f0, f1, f2>;
rotation r = <f0, f1, f2, f0>;
integer i;
while (llFrand(2) > 1)
{
llOwnerSay((string)(f0 + f1 + f2 + i));
llSetPrimitiveParams(L);
llSetPrimitiveParams(L);
L = llGetPhysicsMaterial();
f0 = llList2Float(L, 0);
f1 = llList2Float(L, 1);
f2 = llList2Float(L, 2);
i = llList2Integer(L, i++);
i = llList2Integer(L, i--);
v = <f1, 0, 0>;
r = <f1, 0, 0, 0>f1>;
llSetRegionPos(v);
llSetLocalRot(r);
print(r.s);
++i; --i;
if (i)
i >>= 1;
else if (i > llFrand(3))
return;
L[2] = (integer)L[3];
}
}
}