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
29
unit_tests/regression.suite/cast-list2xxx.lsl
Normal file
29
unit_tests/regression.suite/cast-list2xxx.lsl
Normal file
|
@ -0,0 +1,29 @@
|
|||
default{timer(){
|
||||
|
||||
list L = llDeleteSubList(llGetPhysicsMaterial(), 0, 99999)
|
||||
+ [0.9999997, 0.000111222, 2, 2147483647];
|
||||
|
||||
// this returns 1, but llList2Integer returns 0
|
||||
integer a = (integer)llList2String(L, 0);
|
||||
|
||||
// this returns 0.000111, but llList2Float returns 0.000111222
|
||||
float b = (float)llList2String(L, 1);
|
||||
|
||||
// test consistency
|
||||
string c = (string)llList2String(L, 0);
|
||||
|
||||
// this returns (key)"2", but llList2Key returns (key)""
|
||||
key d = (key)llList2String(L, 2);
|
||||
|
||||
// same as above, the typecast is implicit
|
||||
key e = llList2String(L, 2);
|
||||
|
||||
// this returns 0, but llList2Float would return 0.000111222
|
||||
float f = (float)llList2Integer(L, 1);
|
||||
|
||||
// this returns -2147483648, but llList2Integer returns 2147483647
|
||||
integer g = (integer)llList2Float(L, 3);
|
||||
|
||||
llParticleSystem([a,b,c,d,e]);
|
||||
|
||||
}}
|
Loading…
Add table
Add a link
Reference in a new issue