From 8358fd5012b38e3448156fa1b04ea43aaf60d6fd Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Sat, 28 Jan 2017 03:13:44 +0100 Subject: [PATCH] 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. --- testparser.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/testparser.py b/testparser.py index 8270f2b..4e29ebd 100644 --- a/testparser.py +++ b/testparser.py @@ -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' )