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

56 lines
1.1 KiB
Text

// Coverage tests of normal parsing
f(){f();} // triggers FindSymbolPartial's last lines except the very last
integer g(){if(1)return 1;else return 1;}
integer T = TRUE;
vector V = <1,-2,TRUE>;
quaternion Q = <PI, 1.0, 0, 1>;
list L = [];
default
{
timer()
{
integer i;
float f;
vector v;
// Parse_vector_rotation_tail
<0,0,0.1>1>;
// Parse_unary_postfix_expression
ZERO_VECTOR;
i = 1;
i += i;
f += i;
i -= 1;
i *= f;
i /= 1;
i %= 1;
v *= i;
++v.x;
// Parse_bitxor
2^2;
// Parse_expression
1&&1;
// Parse_statement
@J;
1;
jump J;
// Scanner coverage
quaternion q;
1.3f;
0x0;
0x00000100000000;
4294967296;
42949672950;
L"\t\"";
1 // Not a string delimiter because it has \ at EOL:
" \
// Not a string delimiter because it's the last double quote
// in the file:
";
}
}