summaryrefslogtreecommitdiff
path: root/test/unit/test_passes.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_passes.py')
-rw-r--r--test/unit/test_passes.py45
1 files changed, 21 insertions, 24 deletions
diff --git a/test/unit/test_passes.py b/test/unit/test_passes.py
index 25f844757..5f91afa92 100644
--- a/test/unit/test_passes.py
+++ b/test/unit/test_passes.py
@@ -21,32 +21,29 @@ class PassesTest(utils.BinaryenTestCase):
def test_O2(self):
args = ['-O2', '-all']
- for nominal in ['--nominal', False]:
- for closed_world in ['--closed-world', False]:
- curr_args = args[:]
- if nominal:
- curr_args.append(nominal)
- if closed_world:
- curr_args.append(closed_world)
- passes = self.get_passes_run(curr_args)
+ for closed_world in ['--closed-world', False]:
+ curr_args = args[:]
+ if closed_world:
+ curr_args.append(closed_world)
+ passes = self.get_passes_run(curr_args)
- # dce always runs
- self.assertIn('dce', passes)
+ # dce always runs
+ self.assertIn('dce', passes)
- # some passes only run in closed world
- CLOSED_WORLD_PASSES = [
- 'type-refining',
- 'signature-pruning',
- 'signature-refining',
- 'gto',
- 'cfp',
- 'gsi',
- ]
- for pass_ in CLOSED_WORLD_PASSES:
- if closed_world:
- self.assertIn(pass_, passes)
- else:
- self.assertNotIn(pass_, passes)
+ # some passes only run in closed world
+ CLOSED_WORLD_PASSES = [
+ 'type-refining',
+ 'signature-pruning',
+ 'signature-refining',
+ 'gto',
+ 'cfp',
+ 'gsi',
+ ]
+ for pass_ in CLOSED_WORLD_PASSES:
+ if closed_world:
+ self.assertIn(pass_, passes)
+ else:
+ self.assertNotIn(pass_, passes)
def test_O3_O1(self):
# When we run something like -O3 -O1 we should run -O3 followed by -O1