diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-06-13 20:21:03 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-06-15 23:34:25 -0400 |
commit | 57b718481d5363ab33df4c7814f74897418f79d7 (patch) | |
tree | 331ed2714167b2ea5722b0387d51e957329f40e1 /testsuite/driver | |
parent | ca721193fc71c065036deecfb9d4274fbfc6850d (diff) | |
download | haskell-57b718481d5363ab33df4c7814f74897418f79d7.tar.gz |
testsuite: Add assertions that way lists are in fact lists
Previously there were a few cases where operations like `omit_ways`
were incorrectly passed a single way (e.g. `omit_ways('threaded2')`).
This won't work as the author expected.
Diffstat (limited to 'testsuite/driver')
-rw-r--r-- | testsuite/driver/testlib.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 9ec39267d6..e37bf5d49b 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -204,6 +204,7 @@ def use_specs( specs ): ['A B', '-O -prof -fno-prof-count-entries -v0']) """ + assert isinstance(specs, dict) return lambda name, opts, s=specs: _use_specs( name, opts, s ) def _use_specs( name, opts, specs ): @@ -213,6 +214,7 @@ def _use_specs( name, opts, specs ): # ----- def expect_fail_for( ways ): + assert isinstance(ways, list) return lambda name, opts, w=ways: _expect_fail_for( name, opts, w ) def _expect_fail_for( name, opts, ways ): @@ -228,6 +230,7 @@ def _expect_broken( name, opts, bug ): opts.expect = 'fail'; def expect_broken_for( bug, ways ): + assert isinstance(ways, list) return lambda name, opts, b=bug, w=ways: _expect_broken_for( name, opts, b, w ) def _expect_broken_for( name, opts, bug, ways ): @@ -271,6 +274,7 @@ def fragile_for( bug, ways ): # ----- def omit_ways( ways ): + assert isinstance(ways, list) return lambda name, opts, w=ways: _omit_ways( name, opts, w ) def _omit_ways( name, opts, ways ): @@ -280,6 +284,7 @@ def _omit_ways( name, opts, ways ): # ----- def only_ways( ways ): + assert isinstance(ways, list) return lambda name, opts, w=ways: _only_ways( name, opts, w ) def _only_ways( name, opts, ways ): @@ -288,6 +293,7 @@ def _only_ways( name, opts, ways ): # ----- def extra_ways( ways ): + assert isinstance(ways, list) return lambda name, opts, w=ways: _extra_ways( name, opts, w ) def _extra_ways( name, opts, ways ): |