Add a different sort of stats_num_field helper function
authorIan Lynagh <ian@well-typed.com>
Thu, 7 Feb 2013 22:47:30 +0000 (22:47 +0000)
committerIan Lynagh <ian@well-typed.com>
Thu, 7 Feb 2013 22:47:30 +0000 (22:47 +0000)
commitfba6633406223b0b14a7f122d58fe6821493d17f
treeddfb2e48c1a08d8fb102c47592931b659620e69b
parent83a6ae94d7fd51267690a1c949314b060d765951
Add a different sort of stats_num_field helper function

Uses look like
    stats_num_field('bytes allocated',
                    [(wordsize(32), 45648, 5),
                     (wordsize(64), 49400, 5)])
where the first matching triple will be used. e.g. we could override
the Win32 expected values with:
                    [(platform('i386-unknown-mingw32'), 41000, 5),
                     (wordsize(32),                     45648, 5),
                     (wordsize(64),                     49400, 5)])
with other 32-bit platforms falling through to the wordsize(32) case.

This makes it easier to give different values for different platforms,
while being sure that all platforms are covered.
testsuite/driver/testlib.py
testsuite/tests/perf/should_run/all.T