diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-02-07 23:36:55 +0000 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-02-07 23:36:55 +0000 |
commit | f3c0dae0297cf700be37e73f182be9caebf23977 (patch) | |
tree | 398f5e4bc4823491e6064fa34b6a0af0f1c476ec /testsuite/driver | |
parent | fba6633406223b0b14a7f122d58fe6821493d17f (diff) | |
download | haskell-f3c0dae0297cf700be37e73f182be9caebf23977.tar.gz |
Allow a simpler form of stats_num_field where all platforms use the same value
Diffstat (limited to 'testsuite/driver')
-rw-r--r-- | testsuite/driver/testlib.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index c9884347c7..4c9b2c269e 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -258,12 +258,16 @@ def _stats_num_field( name, opts, field, expecteds ): if field in opts.stats_range_fields: framework_fail(name, 'duplicate-numfield', 'Duplicate ' + field + ' num_field check') - for (b, expected, dev) in expecteds: - if b: - opts.stats_range_fields[field] = (expected, dev) - return + if type(expecteds) is types.ListType: + for (b, expected, dev) in expecteds: + if b: + opts.stats_range_fields[field] = (expected, dev) + return + framework_fail(name, 'numfield-no-expected', 'No expected value found for ' + field + ' in num_field check') - framework_fail(name, 'numfield-no-expected', 'No expected value found for ' + field + ' in num_field check') + else: + (expected, dev) = expecteds + opts.stats_range_fields[field] = (expected, dev) def stats_range_field( field, expected, dev ): return stats_num_field( field, [(True, expected, dev)] ) |