mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Add unit test for the _Pragma operator
This commit is contained in:
parent
7fd7eae56c
commit
e261ac2121
3 changed files with 33 additions and 0 deletions
14
unit_tests/coverage.suite/pragma-operator.lsl
Normal file
14
unit_tests/coverage.suite/pragma-operator.lsl
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
_Pragma("OPT inline")
|
||||||
|
|
||||||
|
string f(integer x) inline
|
||||||
|
{
|
||||||
|
return "ok";
|
||||||
|
}
|
||||||
|
|
||||||
|
default
|
||||||
|
{
|
||||||
|
state_entry()
|
||||||
|
{
|
||||||
|
llOwnerSay(f(5));
|
||||||
|
}
|
||||||
|
}
|
18
unit_tests/coverage.suite/pragma-operator.out
Normal file
18
unit_tests/coverage.suite/pragma-operator.out
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
default
|
||||||
|
{
|
||||||
|
state_entry()
|
||||||
|
{
|
||||||
|
string ___ret__00001;
|
||||||
|
{
|
||||||
|
integer x = 5;
|
||||||
|
{
|
||||||
|
{
|
||||||
|
___ret__00001 = "ok";
|
||||||
|
jump ___rtl__00001;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@___rtl__00001;
|
||||||
|
llOwnerSay(___ret__00001);
|
||||||
|
}
|
||||||
|
}
|
1
unit_tests/coverage.suite/pragma-operator.run
Normal file
1
unit_tests/coverage.suite/pragma-operator.run
Normal file
|
@ -0,0 +1 @@
|
||||||
|
main.py - -O clear,processpre
|
Loading…
Add table
Add a link
Reference in a new issue