mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Fix a test case in testparser.py.
Commit 13f3c95
was clearly a step in the right direction. We had a test case that mistakenly relied on the broken behaviour that that commit fixed, for the constant values to remain in the output. That is clearly wrong, so we fix the test case to not rely on that.
This commit is contained in:
parent
7659eb1654
commit
8358fd5012
1 changed files with 11 additions and 9 deletions
|
@ -483,9 +483,9 @@ class Test03_Optimizer(UnitTestCase):
|
|||
'default { timer() {} timer() {} }')
|
||||
|
||||
p = self.parser.parse('default{timer(){\n'
|
||||
'llLog(3);llLog(3.0);\n'
|
||||
'llStringToBase64((key)"");llGetAgentInfo("");\n'
|
||||
'llStringToBase64("");llGetAgentInfo((key)"");\n'
|
||||
'llSetPrimitiveParams([llLog(3),llLog(3.0),\n'
|
||||
'llStringToBase64((key)""),llGetAgentInfo(""),\n'
|
||||
'llStringToBase64(""),llGetAgentInfo((key)"")]);\n'
|
||||
'}}\n'
|
||||
)
|
||||
self.opt.optimize(p, ('optimize','constfold'))
|
||||
|
@ -494,12 +494,14 @@ class Test03_Optimizer(UnitTestCase):
|
|||
'{\n'
|
||||
' timer()\n'
|
||||
' {\n'
|
||||
' 1.0986123;\n'
|
||||
' 1.0986123;\n'
|
||||
' "";\n'
|
||||
' 0;\n'
|
||||
' "";\n'
|
||||
' 0;\n'
|
||||
' llSetPrimitiveParams(\n'
|
||||
' [ 1.0986123\n'
|
||||
' , 1.0986123\n'
|
||||
' , ""\n'
|
||||
' , 0\n'
|
||||
' , ""\n'
|
||||
' , 0\n'
|
||||
' ]);\n'
|
||||
' }\n'
|
||||
'}\n'
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue