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:
Sei Lisa 2017-01-28 03:13:44 +01:00
parent 7659eb1654
commit 8358fd5012

View file

@ -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'
)