mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-03 00:18:20 +00:00
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:
parent
7fbde0269c
commit
1867dc78e7
547 changed files with 11680 additions and 0 deletions
75
unit_tests/coverage.suite/lslrenamer-1.lsl
Normal file
75
unit_tests/coverage.suite/lslrenamer-1.lsl
Normal file
|
@ -0,0 +1,75 @@
|
|||
list L;
|
||||
float f1 = 5;
|
||||
float f2 = 5;
|
||||
float f3 = 5;
|
||||
float f4 = 5;
|
||||
float f5 = 5;
|
||||
float f6 = 5;
|
||||
float f7 = 5;
|
||||
float f8 = 5;
|
||||
float f9 = 5;
|
||||
float fA = 5;
|
||||
float fB = 5;
|
||||
float fC = 5;
|
||||
float fD = 5;
|
||||
float fE = 5;
|
||||
float fF = 5;
|
||||
|
||||
// Transformation of function names and arguments
|
||||
Test(float x, float y)
|
||||
{
|
||||
llParticleSystem([x, y]);
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
listen(integer chan, string name, key id, string msg)
|
||||
{
|
||||
float f0 = 2; // locals not transformed
|
||||
while ((integer)llFrand(2))
|
||||
{
|
||||
llOwnerSay((string)(f0 + f1 + f2 + f3 + f4 + f5 + f6 + f7
|
||||
+ f8 + f9 + fA + fB + fC + fD + fE + fF));
|
||||
L = llGetPhysicsMaterial();
|
||||
f0 = llList2Float(L, 0);
|
||||
f1 = llList2Float(L, 1);
|
||||
f2 = llList2Float(L, 2);
|
||||
f3 = llList2Float(L, 3);
|
||||
f4 = llList2Float(L, 4);
|
||||
f5 = llList2Float(L, 5);
|
||||
f6 = llList2Float(L, 6);
|
||||
f7 = llList2Float(L, 7);
|
||||
f8 = llList2Float(L, 8);
|
||||
f9 = llList2Float(L, 9);
|
||||
fA = llList2Float(L, 10);
|
||||
fB = llList2Float(L, 11);
|
||||
fC = llList2Float(L, 12);
|
||||
fD = llList2Float(L, 13);
|
||||
fE = llList2Float(L, 14);
|
||||
fF = llList2Float(L, 15);
|
||||
Test(f0, f1);
|
||||
if (llFrand(1) < 0.5) jump there;
|
||||
}
|
||||
@there;
|
||||
state TestState;
|
||||
}
|
||||
}
|
||||
|
||||
state TestState
|
||||
{
|
||||
// Events with a different internal name
|
||||
on_rez(integer i)
|
||||
{
|
||||
llDie();
|
||||
}
|
||||
|
||||
run_time_permissions(integer j)
|
||||
{
|
||||
llDie();
|
||||
}
|
||||
|
||||
remote_data(integer evtype, key cid, key mid, string sender, integer idata, string sdata)
|
||||
{
|
||||
llDie();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue