aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-28 12:04:42 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-28 12:04:42 -0800
commit68ec145d73c77b0a7b813aa65f29056de8548e02 (patch)
tree16994b7e5049c82c92d5a0e85a2774472b786662 /tests/runner.py
parent970e5bec31f12af53563c56e548ca4673854854f (diff)
initial work on optimizeShifts pass in js optimizer
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 108095bc..f7b7f1bb 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -5314,7 +5314,9 @@ Options that are modified or new in %s include:
def test_js_optimizer(self):
for input, expected, passes in [
(open(path_from_root('tools', 'test-js-optimizer.js')).read(), open(path_from_root('tools', 'test-js-optimizer-output.js')).read(),
- ['hoistMultiples', 'loopOptimizer', 'unGlobalize', 'removeAssignsToUndefined', 'simplifyExpressionsPre', 'simplifyExpressionsPost'])
+ ['hoistMultiples', 'loopOptimizer', 'unGlobalize', 'removeAssignsToUndefined', 'simplifyExpressionsPre', 'simplifyExpressionsPost']),
+ (open(path_from_root('tools', 'test-js-optimizer-t2.js')).read(), open(path_from_root('tools', 'test-js-optimizer-t2-output.js')).read(),
+ ['simplifyExpressionsPre', 'optimizeShifts']),
]:
output = Popen([NODE_JS, JS_OPTIMIZER] + passes, stdin=PIPE, stdout=PIPE).communicate(input)[0]
self.assertIdentical(expected, output.replace('\n\n', '\n'))