diff options
author | simonmar <unknown> | 2002-07-31 14:24:30 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-07-31 14:24:30 +0000 |
commit | e5063a042c9a1701ea7273da7bacb530d5c077d3 (patch) | |
tree | 5510d52bb15cfa4f9ade978d5346ed43f30532cf /testsuite/tests/ghc-regress | |
parent | 0d4aee253319bb09c1181c46d455101feb5d7c18 (diff) | |
download | haskell-e5063a042c9a1701ea7273da7bacb530d5c077d3.tar.gz |
[project @ 2002-07-31 14:24:18 by simonmar]
Revamp the testsuite framework. The previous framework was an
experiment that got a little out of control - a whole new language
with an interpreter written in Haskell was rather heavyweight and left
us with a maintenance problem.
So the new test driver is written in Python. The downside is that you
need Python to run the testsuite, but we don't think that's too big a
problem since it only affects developers and Python installs pretty
easily onto everything these days.
Highlights:
- 790 lines of Python, vs. 5300 lines of Haskell + 720 lines of
<strange made-up language>.
- the framework supports running tests in various "ways", which should
catch more bugs. By default, each test is run in three ways:
normal, -O, and -O -fasm. Additionally, if profiling libraries
have been built, another way (-O -prof -auto-all) is added. I plan
to also add a 'GHCi' way.
Running tests multiple ways has already shown up some new bugs!
- documentation is in the README file and is somewhat improved.
- the framework is rather less GHC-specific, and could without much
difficulty be coaxed into using other compilers. Most of the
GHC-specificness is in a separate configuration file (config/ghc).
Things may need a while to settle down. Expect some unexpected
failures.
Diffstat (limited to 'testsuite/tests/ghc-regress')
89 files changed, 999 insertions, 1219 deletions
diff --git a/testsuite/tests/ghc-regress/array/Makefile b/testsuite/tests/ghc-regress/array/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/array/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/array/should_run/all.T b/testsuite/tests/ghc-regress/array/should_run/all.T index 538fa1f912..b5a05c0489 100644 --- a/testsuite/tests/ghc-regress/array/should_run/all.T +++ b/testsuite/tests/ghc-regress/array/should_run/all.T @@ -1,23 +1,22 @@ -include ($confdir ++ "/../vanilla-test.T") +# Args to compile_and_run are: +# extra compile flags +# extra run flags +# expected process return value, if not zero --- Args to vt are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "arr001" { vtr("", "", "") } -test "arr002" { vtr("", "", "") } -test "arr003" { vtr("", "", "1") } -test "arr004" { vtr("", "", "1") } -test "arr005" { vtr("", "", "") } -test "arr006" { vtr("", "", "") } -test "arr007" { vtr("", "", "1") } -test "arr008" { vtr("", "", "1") } -test "arr009" { vtr("", "", "") } -test "arr010" { vtr("", "", "") } -test "arr011" { vtr("", "", "") } -test "arr012" { vtr("", "", "") } -test "arr013" { vtr("", "", "") } -test "arr014" { vtr("-package lang", "", "") } -test "arr015" { vtr("", "", "") } -test "arr016" { vtr("-fglasgow-exts", "", "") } +test('arr001', normal, compile_and_run, ['']) +test('arr002', normal, compile_and_run, ['']) +test('arr003', exit_code(1), compile_and_run, ['']) +test('arr004', exit_code(1), compile_and_run, ['']) +test('arr005', normal, compile_and_run, ['']) +test('arr006', normal, compile_and_run, ['']) +test('arr007', exit_code(1), compile_and_run, ['']) +test('arr008', exit_code(1), compile_and_run, ['']) +test('arr009', normal, compile_and_run, ['']) +test('arr010', normal, compile_and_run, ['']) +test('arr011', normal, compile_and_run, ['']) +test('arr012', normal, compile_and_run, ['']) +test('arr013', normal, compile_and_run, ['']) +test('arr014', normal, compile_and_run, ['-package lang']) +test('arr015', normal, compile_and_run, ['']) +test('arr016', normal, compile_and_run, ['-fglasgow-exts']) diff --git a/testsuite/tests/ghc-regress/ccall/Makefile b/testsuite/tests/ghc-regress/ccall/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/ccall/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/ccall/should_compile/all.T b/testsuite/tests/ghc-regress/ccall/should_compile/all.T index 7c759be479..eeb13cb782 100644 --- a/testsuite/tests/ghc-regress/ccall/should_compile/all.T +++ b/testsuite/tests/ghc-regress/ccall/should_compile/all.T @@ -1,24 +1,19 @@ -include ($confdir ++ "/../vanilla-test.T") +def f( opts ): + opts.compile_to_hc = 1 + opts.omit_ways = ['optasm'] + opts.extra_hc_opts = '-fglasgow-exts' --- Args to vtc are: extra compile flags +setTestOpts(f) --- Use this itsy helper fn to pass in an extra flag -def myvtc($extra_comp_args) -{ - vtc(" -fglasgow-exts " ++ $extra_comp_args) -} - -$compile_to_hc = "True" - -test "cc001" { myvtc("") } -test "cc002" { myvtc("") } -test "cc003" { myvtc("") } -test "cc004" { myvtc("") } -test "cc005" { myvtc("") } -test "cc006" { myvtc("-fno-prune-tydecls") } -test "cc007" { myvtc("") } -test "cc008" { myvtc("") } -test "cc009" { myvtc("") } -test "cc010" { myvtc("") } -test "cc011" { myvtc("") } +test('cc001', normal, compile, ['']) +test('cc002', normal, compile, ['']) +test('cc003', normal, compile, ['']) +test('cc004', normal, compile, ['']) +test('cc005', normal, compile, ['']) +test('cc006', normal, compile, ['']) +test('cc007', normal, compile, ['']) +test('cc008', normal, compile, ['']) +test('cc009', normal, compile, ['']) +test('cc010', normal, compile, ['']) +test('cc011', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/ccall/should_fail/all.T b/testsuite/tests/ghc-regress/ccall/should_fail/all.T index 474da35a3c..c21d8b0724 100644 --- a/testsuite/tests/ghc-regress/ccall/should_fail/all.T +++ b/testsuite/tests/ghc-regress/ccall/should_fail/all.T @@ -1,14 +1,9 @@ +def f( opts ): + opts.extra_hc_opts = '-fglasgow-exts -package lang' -include ($confdir ++ "/../vanilla-test.T") +setTestOpts(f) --- Args to vtcf are: extra compile flags - -def myvtcf ( $args ) -{ - vtcf ( " -fglasgow-exts -package lang " ++ $args) -} - -test "cc001" { myvtcf("") } -test "cc002" { myvtcf("") } -test "cc004" { myvtcf("") } -test "cc005" { myvtcf("") } +test('cc001', normal, compile_fail, ['']) +test('cc002', normal, compile_fail, ['']) +test('cc004', normal, compile_fail, ['']) +test('cc005', normal, compile_fail, ['']) diff --git a/testsuite/tests/ghc-regress/ccall/should_run/all.T b/testsuite/tests/ghc-regress/ccall/should_run/all.T index a47cce8b5b..81d058f215 100644 --- a/testsuite/tests/ghc-regress/ccall/should_run/all.T +++ b/testsuite/tests/ghc-regress/ccall/should_run/all.T @@ -1,28 +1,37 @@ -include ($confdir ++ "/../vanilla-test.T") +# Args to compile_and_run are: +# extra compile flags +# extra run flags +# expected process return value, if not zero --- Args to vt are: extra compile flags --- extra run flags --- expected process return value, if not zero +def f( opts ): + opts.extra_hc_opts = '-fglasgow-exts' -test "fed001" { vtr("-fglasgow-exts", "", "") } -test "ffi001" { vtr("-fglasgow-exts", "", "") } +setTestOpts(f) --- skip this test for now: we don't have the machinery to compile the .c file --- separately. -test "ffi002" { vtr("ffi002_c.c -fglasgow-exts -no-hs-main", "", "") } +test('fed001', normal, compile_and_run, ['']) +test('ffi001', normal, compile_and_run, ['']) -test "ffi003" { skip when $platform == "alpha-dec-osf3" -- no NCG on Alpha yet - vtr("-fglasgow-exts", "", "") } +test('ffi002', normal, compile_and_run, ['ffi002_c.c -no-hs-main']) -test "ffi004" { vtr("-fglasgow-exts", "", "") } +if config.platform == 'alpha-dec-osf3': + f = skip +else: + f = normal --- skip this test for now: it is non-portable due to the use of literal values --- instead of CPP symbols for the flag arguments to open(). -test "ffi005" { skip when True - vtr("-fglasgow-exts", "", "3") } +test('ffi003', f, compile_and_run, ['']) -test "ffi006" { vtr("-fglasgow-exts", "", "") } -test "ffi007" { vtr("-fglasgow-exts", "", "") } -test "ffi008" { vtr("-fglasgow-exts", "", "1") } -test "ffi009" { vtr("-fglasgow-exts", "", "") } +test('ffi004', normal, compile_and_run, ['']) + +# skip this test for now: it is non-portable due to the use of literal values +# instead of CPP symbols for the flag arguments to open(). +test('ffi005', compose(skip, exit_code(3)), compile_and_run, ['']) + +test('ffi006', normal, compile_and_run, ['']) +test('ffi007', normal, compile_and_run, ['']) +test('ffi008', exit_code(1), compile_and_run, ['']) + +# expect fail for way optasm, because the native code generator +# doesn't do -ffloat-store and gets different answers when +# optimisation is on. +test('ffi009', expect_fail_for(['optasm']), compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/codeGen/Makefile b/testsuite/tests/ghc-regress/codeGen/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/codeGen/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/codeGen/should_compile/all.T b/testsuite/tests/ghc-regress/codeGen/should_compile/all.T index 0487245b94..d05f604548 100644 --- a/testsuite/tests/ghc-regress/codeGen/should_compile/all.T +++ b/testsuite/tests/ghc-regress/codeGen/should_compile/all.T @@ -1,7 +1,2 @@ - -include ($confdir ++ "/../vanilla-test.T") - --- Args to vtc are: extra compile flags - -test "cg001" { vtc("") } -test "cg002" { vtc("") } +test('cg001', normal, compile, ['']) +test('cg002', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/codeGen/should_run/all.T b/testsuite/tests/ghc-regress/codeGen/should_run/all.T index 8f36430a53..54e37d7009 100644 --- a/testsuite/tests/ghc-regress/codeGen/should_run/all.T +++ b/testsuite/tests/ghc-regress/codeGen/should_run/all.T @@ -1,58 +1,50 @@ +test('cg001', normal, compile_and_run, ['']) +test('cg002', normal, compile_and_run, ['']) +test('cg003', normal, compile_and_run, ['']) +test('cg004', normal, compile_and_run, ['']) +test('cg005', normal, compile_and_run, ['']) +test('cg006', normal, compile_and_run, ['']) +test('cg007', normal, compile_and_run, ['']) +test('cg008', normal, compile_and_run, ['']) +test('cg009', normal, compile_and_run, ['']) +test('cg010', normal, compile_and_run, ['']) +test('cg011', normal, compile_and_run, ['']) +test('cg012', normal, compile_and_run, ['-fglasgow-exts']) +test('cg013', normal, compile_and_run, ['']) +test('cg014', normal, compile_and_run, ['']) +test('cg015', normal, compile_and_run, ['-fglasgow-exts']) +test('cg016', exit_code(1), compile_and_run, ['']) +test('cg017', normal, compile_and_run, ['']) +test('cg018', normal, compile_and_run, ['-fglasgow-exts']) +test('cg019', normal, compile_and_run, ['']) +test('cg020', normal, compile_and_run, ['']) +test('cg021', normal, compile_and_run, ['']) +test('cg022', normal, compile_and_run, ['']) +test('cg024', normal, compile_and_run, ['']) -include ($confdir ++ "/../vanilla-test.T") +test('cg025', compose(extra_run_opts('cg025.hs'),exit_code(1)), \ + compile_and_run, ['']) --- Args to vt are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "cg001" { vtr("", "", "") } -test "cg002" { vtr("", "", "") } -test "cg003" { vtr("", "", "") } -test "cg004" { vtr("", "", "") } -test "cg005" { vtr("", "", "") } -test "cg006" { vtr("", "", "") } -test "cg007" { vtr("", "", "") } -test "cg008" { vtr("", "", "") } -test "cg009" { vtr("", "", "") } -test "cg010" { vtr("", "", "") } -test "cg011" { vtr("", "", "") } -test "cg012" { vtr("-fglasgow-exts", "", "") } -test "cg013" { vtr("", "", "") } -test "cg014" { vtr("", "", "") } -test "cg015" { vtr("-fglasgow-exts", "", "") } -test "cg016" { vtr("", "", "1") } -test "cg017" { vtr("", "", "") } -test "cg018" { vtr("-fglasgow-exts", "", "") } -test "cg019" { vtr("", "", "") } -test "cg020" { vtr("", "", "") } -test "cg021" { vtr("", "", "") } -test "cg022" { vtr("", "", "") } -test "cg024" { vtr("", "", "") } -test "cg025" { vtr("", "cg025.hs", "1") } -test "cg026" { vtr("-fglasgow-exts -package lang -fvia-C", "", "") } -test "cg027" { vtr("", "", "") } -test "cg028" { vtr("", "", "") } -test "cg031" { vtr("-fglasgow-exts", "", "") } -test "cg032" { vtr("-fglasgow-exts", "", "") } -test "cg033" { vtr("-fglasgow-exts", "", "") } -test "cg034" { vtr("", "", "") } -test "cg035" { vtr("-fglasgow-exts", "", "") } -test "cg036" { vtr("", "", "") } -test "cg037" { vtr("", "", "") } -test "cg038" { vtr("", "", "") } -test "cg039" { vtr("", "", "") } -test "cg040" { vtr("", "", "") } -test "cg042" { vtr("-fglasgow-exts -package lang", "", "") } -test "cg043" { vtr("", "", "") } -test "cg044" { vtr("-cpp -package lang", "", "" ) } - --- -O is temporary, until we fix the problems with seq#... -test "cg045" { vtr( "-O", "", "1") } -test "cg046" { vtr("", "", "") } -test "cg047" { vtr("", "", "") } -test "cg048" { vtr("", "", "") } -test "cg049" { vtr( "-funbox-strict-fields", "", "") } - --- NB: be sure to run cg050 *without* -O; that's what showed the bug -test "cg050" { vtr( "", "", "") } -test "cg051" { vtr( "", "", "1") } -- Expected to fail +test('cg026', normal, compile_and_run, ['-fglasgow-exts -package lang']) +test('cg027', normal, compile_and_run, ['']) +test('cg028', normal, compile_and_run, ['']) +test('cg031', normal, compile_and_run, ['-fglasgow-exts']) +test('cg032', normal, compile_and_run, ['-fglasgow-exts']) +test('cg033', normal, compile_and_run, ['-fglasgow-exts']) +test('cg034', normal, compile_and_run, ['']) +test('cg035', normal, compile_and_run, ['-fglasgow-exts']) +test('cg036', normal, compile_and_run, ['']) +test('cg037', normal, compile_and_run, ['']) +test('cg038', normal, compile_and_run, ['']) +test('cg039', normal, compile_and_run, ['']) +test('cg040', normal, compile_and_run, ['']) +test('cg042', normal, compile_and_run, ['-fglasgow-exts -package lang']) +test('cg043', normal, compile_and_run, ['']) +test('cg044', normal, compile_and_run, ['-cpp -package lang']) +test('cg045', exit_code(1), compile_and_run, ['']) +test('cg046', normal, compile_and_run, ['']) +test('cg047', normal, compile_and_run, ['']) +test('cg048', normal, compile_and_run, ['']) +test('cg049', normal, compile_and_run, ['-funbox-strict-fields']) +test('cg050', normal, compile_and_run, ['']) +test('cg051', exit_code(1), compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/concurrent/Makefile b/testsuite/tests/ghc-regress/concurrent/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/concurrent/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/concurrent/should_run/all.T b/testsuite/tests/ghc-regress/concurrent/should_run/all.T index 5c84d1d663..1a95ffa56b 100644 --- a/testsuite/tests/ghc-regress/concurrent/should_run/all.T +++ b/testsuite/tests/ghc-regress/concurrent/should_run/all.T @@ -1,55 +1,51 @@ +# Args to compile_and_run are: +# extra compile flags +# extra run flags +# expected process return value, if not zero -include ($confdir ++ "/../vanilla-test.T") +def f( opts ): + opts.extra_hc_opts = '-fglasgow-exts' --- Args to vtr are: extra compile flags --- extra run flags --- expected process return value, if not zero --- whether to normalise (depathify) stderr output +setTestOpts(f) -def myvtr ( $args_c, $args_r, $ret_res ) -{ - vtr ( " -fglasgow-exts " ++ $args_c, - $args_r, $ret_res ) -} +test('conc001', normal, compile_and_run, ['']) +test('conc002', normal, compile_and_run, ['']) +test('conc003', normal, compile_and_run, ['']) +test('conc004', normal, compile_and_run, ['']) +test('conc005', normal, compile_and_run, ['-package concurrent']) +test('conc006', normal, compile_and_run, ['']) +test('conc007', extra_run_opts('+RTS -H128M -RTS'), compile_and_run, ['']) +test('conc008', normal, compile_and_run, ['']) +test('conc009', exit_code(1), compile_and_run, ['']) +test('conc010', normal, compile_and_run, ['']) +test('conc012', normal, compile_and_run, ['']) +test('conc013', normal, compile_and_run, ['']) +test('conc014', normal, compile_and_run, ['']) +test('conc015', normal, compile_and_run, ['']) +test('conc016', normal, compile_and_run, ['']) +test('conc017', normal, compile_and_run, ['']) +test('conc018', normal, compile_and_run, ['']) +test('conc019', normal, compile_and_run, ['']) +test('conc020', normal, compile_and_run, ['']) +test('conc021', exit_code(1), compile_and_run, ['']) +test('conc022', normal, compile_and_run, ['']) +test('conc023', normal, compile_and_run, ['']) +test('conc024', normal, compile_and_run, ['']) +test('conc025', normal, compile_and_run, ['']) +test('conc026', normal, compile_and_run, ['']) +test('conc027', normal, compile_and_run, ['']) +test('conc028', normal, compile_and_run, ['']) +test('conc029', normal, compile_and_run, ['']) +test('conc030', extra_run_opts('+RTS -K2M -RTS'), compile_and_run, ['']) +test('conc031', normal, compile_and_run, ['']) +test('conc032', normal, compile_and_run, ['']) +test('conc033', normal, compile_and_run, ['']) +test('conc034', extra_run_opts('+RTS -C0 -RTS'), compile_and_run, ['']) +test('conc035', normal, compile_and_run, ['']) +test('conc036', normal, compile_and_run, ['']) -test "conc001" { myvtr("", "", "") } -test "conc002" { myvtr("", "", "") } -test "conc003" { myvtr("", "", "") } -test "conc004" { myvtr("", "", "") } -test "conc005" { myvtr("-package concurrent", "", "") } -test "conc006" { myvtr("", "", "") } -test "conc007" { myvtr("", "+RTS -H128M -RTS", "") } -test "conc008" { myvtr("", "", "") } -test "conc009" { myvtr("", "", "1") } -test "conc010" { myvtr("", "", "") } -test "conc012" { myvtr("", "", "") } -test "conc013" { myvtr("", "", "") } -test "conc014" { myvtr("", "", "") } -test "conc015" { myvtr("", "", "") } -test "conc016" { myvtr("", "", "") } -test "conc017" { myvtr("", "", "") } -test "conc018" { myvtr("", "", "") } -test "conc019" { myvtr("", "", "") } -test "conc020" { myvtr("", "", "") } -test "conc021" { $normalise_errmsg = True myvtr("", "", "1") } -test "conc022" { myvtr("", "", "") } -test "conc023" { myvtr("", "", "") } -test "conc024" { myvtr("", "", "") } -test "conc025" { myvtr("", "", "") } -test "conc026" { myvtr("", "", "") } -test "conc027" { myvtr("", "", "") } -test "conc028" { myvtr("", "", "") } -test "conc029" { myvtr("", "", "") } -test "conc030" { myvtr("", "+RTS -K2M -RTS", "") } -test "conc031" { myvtr("", "", "") } -test "conc032" { myvtr("", "", "") } -test "conc033" { myvtr("", "", "") } -test "conc034" { myvtr("", "+RTS -C0 -RTS", "") } -test "conc035" { myvtr("", "", "") } -test "conc036" { myvtr("", "", "") } +# These two depend on $(GhcThreadedRts) at the moment, so until we can find +# a way to turn them off when $(GhcThreadedRts) == NO, disable them by default: --- These two depend on $(GhcThreadedRts) at the moment, so until we can find --- a way to turn them off when $(GhcThreadedRts) == NO, disable them by default: --- --- test "conc037" { myvtr("", "", "") } --- test "conc038" { myvtr("", "", "") } +test('conc037', skip, compile_and_run, ['']) +test('conc038', skip, compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/concurrent/should_run/conc021.stderr b/testsuite/tests/ghc-regress/concurrent/should_run/conc021.stderr index b6019d18a1..a005889c33 100644 --- a/testsuite/tests/ghc-regress/concurrent/should_run/conc021.stderr +++ b/testsuite/tests/ghc-regress/concurrent/should_run/conc021.stderr @@ -1,3 +1,2 @@ Fail: wurble - diff --git a/testsuite/tests/ghc-regress/cpranal/Makefile b/testsuite/tests/ghc-regress/cpranal/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/cpranal/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/cpranal/should_compile/all.T b/testsuite/tests/ghc-regress/cpranal/should_compile/all.T index 0e7689e124..0912488e91 100644 --- a/testsuite/tests/ghc-regress/cpranal/should_compile/all.T +++ b/testsuite/tests/ghc-regress/cpranal/should_compile/all.T @@ -1,7 +1,8 @@ +# Just do the opt way... +def f( opts ): + opts.only_ways = ['opt'] -include ($confdir ++ "/../vanilla-test.T") +setTestOpts(f) --- Args to vtc are: extra compile flags - -test "Cpr001_imp" { vtc("-O") } -test "Cpr001" { vtc("-O") } +test('Cpr001_imp', normal, compile, ['']) +test('Cpr001', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/deSugar/Makefile b/testsuite/tests/ghc-regress/deSugar/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/deSugar/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/deSugar/should_compile/all.T b/testsuite/tests/ghc-regress/deSugar/should_compile/all.T index e64dd65cbb..1b08a214be 100644 --- a/testsuite/tests/ghc-regress/deSugar/should_compile/all.T +++ b/testsuite/tests/ghc-regress/deSugar/should_compile/all.T @@ -1,65 +1,60 @@ +# Just do the normal way... +def f( opts ): + opts.only_ways = ['normal'] -include ($confdir ++ "/../vanilla-test.T") +setTestOpts(f) --- Args to vtc are: extra compile flags - --- Use this itsy helper fn to pass in an extra flag ---def myvtc($extra_comp_args) ---{ --- vtc(" -fno-warn-incomplete-patterns " ++ $extra_comp_args) ---} - -test "ds-wildcard" { vtc("") } -test "ds001" { vtc("") } -test "ds002" { vtc("") } -test "ds003" { vtc("") } -test "ds004" { vtc("") } -test "ds005" { vtc("") } -test "ds006" { vtc("") } -test "ds007" { vtc("") } -test "ds008" { vtc("") } -test "ds009" { vtc("") } -test "ds010" { vtc("") } -test "ds011" { vtc("") } -test "ds012" { vtc("") } -test "ds013" { vtc("") } -test "ds014" { vtc("") } -test "ds015" { vtc("") } -test "ds016" { vtc("") } -test "ds017" { vtc("") } -test "ds018" { vtc("") } -test "ds019" { vtc("") } -test "ds020" { vtc("") } -test "ds021" { vtc("") } -test "ds022" { vtc("") } -test "ds023" { vtc("") } -test "ds024" { vtc("") } -test "ds025" { vtc("") } -test "ds026" { vtc("") } -test "ds027" { vtc("") } -test "ds028" { vtc("") } -test "ds029" { vtc("") } -test "ds030" { vtc("") } -test "ds031" { vtc("") } -test "ds032" { vtc("") } -test "ds033" { vtc("") } -test "ds034" { vtc("") } -test "ds035" { vtc("-fglasgow-exts -package lang") } -test "ds036" { vtc("") } -test "ds037" { vtc("") } -test "ds038" { vtc("") } -test "ds039" { vtc("") } -test "ds040" { vtc("") } -test "ds041" { vtc("") } -test "ds042" { vtc("") } -test "ds043" { vtc("") } -test "ds044" { vtc("") } -test "ds045" { vtc("") } -test "ds046" { vtc("-O -funbox-strict-fields") } -test "ds047" { vtc("") } -test "ds048" { vtc("") } -test "ds049" { vtc("-fvia-C -package lang") } -test "ds050" { vtc("-fglasgow-exts") } -test "ds051" { vtc("") } -test "ds052" { $expect = "fail" vtc("") } -test "ds053" { $expect = "fail" vtc("") } +test('ds-wildcard', normal, compile, ['']) +test('ds001', normal, compile, ['']) +test('ds002', normal, compile, ['']) +test('ds003', normal, compile, ['']) +test('ds004', normal, compile, ['']) +test('ds005', normal, compile, ['']) +test('ds006', normal, compile, ['']) +test('ds007', normal, compile, ['']) +test('ds008', normal, compile, ['']) +test('ds009', normal, compile, ['']) +test('ds010', normal, compile, ['']) +test('ds011', normal, compile, ['']) +test('ds012', normal, compile, ['']) +test('ds013', normal, compile, ['']) +test('ds014', normal, compile, ['']) +test('ds015', normal, compile, ['']) +test('ds016', normal, compile, ['']) +test('ds017', normal, compile, ['']) +test('ds018', normal, compile, ['']) +test('ds019', normal, compile, ['']) +test('ds020', normal, compile, ['']) +test('ds021', normal, compile, ['']) +test('ds022', normal, compile, ['']) +test('ds023', normal, compile, ['']) +test('ds024', normal, compile, ['']) +test('ds025', normal, compile, ['']) +test('ds026', normal, compile, ['']) +test('ds027', normal, compile, ['']) +test('ds028', normal, compile, ['']) +test('ds029', normal, compile, ['']) +test('ds030', normal, compile, ['']) +test('ds031', normal, compile, ['']) +test('ds032', normal, compile, ['']) +test('ds033', normal, compile, ['']) +test('ds034', normal, compile, ['']) +test('ds035', normal, compile, ['-fglasgow-exts -package lang']) +test('ds036', normal, compile, ['']) +test('ds037', normal, compile, ['']) +test('ds038', normal, compile, ['']) +test('ds039', normal, compile, ['']) +test('ds040', normal, compile, ['']) +test('ds041', normal, compile, ['']) +test('ds042', normal, compile, ['']) +test('ds043', normal, compile, ['']) +test('ds044', normal, compile, ['']) +test('ds045', normal, compile, ['']) +test('ds046', normal, compile, ['-funbox-strict-fields']) +test('ds047', normal, compile, ['']) +test('ds048', normal, compile, ['']) +test('ds049', normal, compile, ['-package lang']) +test('ds050', normal, compile, ['-fglasgow-exts']) +test('ds051', normal, compile, ['']) +test('ds052', expect_fail, compile, ['']) +test('ds053', expect_fail, compile, ['']) diff --git a/testsuite/tests/ghc-regress/deSugar/should_run/all.T b/testsuite/tests/ghc-regress/deSugar/should_run/all.T index 8262ff55bb..57448d32bc 100644 --- a/testsuite/tests/ghc-regress/deSugar/should_run/all.T +++ b/testsuite/tests/ghc-regress/deSugar/should_run/all.T @@ -1,16 +1,14 @@ +# Args to compile_and_run are: +# extra compile flags +# extra run flags +# expected process return value, if not zero -include ($confdir ++ "/../vanilla-test.T") - --- Args to vt are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "dsrun001" { vtr("", "", "") } -test "dsrun002" { vtr("", "", "") } -test "dsrun003" { vtr("", "", "") } -test "dsrun004" { vtr("", "", "") } -test "dsrun005" { vtr("", "", "1") } -test "dsrun006" { vtr("", "", "") } -test "dsrun007" { vtr("", "", "1") } -test "dsrun008" { vtr("", "", "1") } -test "dsrun009" { vtr("", "", "") } +test('dsrun001', normal, compile_and_run, ['']) +test('dsrun002', normal, compile_and_run, ['']) +test('dsrun003', normal, compile_and_run, ['']) +test('dsrun004', normal, compile_and_run, ['']) +test('dsrun005', exit_code(1), compile_and_run, ['']) +test('dsrun006', normal, compile_and_run, ['']) +test('dsrun007', exit_code(1), compile_and_run, ['']) +test('dsrun008', exit_code(1), compile_and_run, ['']) +test('dsrun009', normal, compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/deriving/Makefile b/testsuite/tests/ghc-regress/deriving/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/deriving/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/all.T b/testsuite/tests/ghc-regress/deriving/should_compile/all.T index 7e44b8e51b..62e219818f 100644 --- a/testsuite/tests/ghc-regress/deriving/should_compile/all.T +++ b/testsuite/tests/ghc-regress/deriving/should_compile/all.T @@ -1,17 +1,12 @@ - -include ($confdir ++ "/../vanilla-test.T") - --- Args to vtc are: extra compile flags - -test "drv001" { vtc("") } -test "drv002" { vtc("") } -test "drv003" { vtc("") } -test "drv004" { vtc("") } -test "drv005" { vtc("") } -test "drv006" { vtc("") } -test "drv007" { vtc("") } -test "drv008" { vtc("") } -test "drv009" { vtc("") } -test "drv010" { vtc("") } -test "drv011" { vtc("") } +test('drv001', normal, compile, ['']) +test('drv002', normal, compile, ['']) +test('drv003', normal, compile, ['']) +test('drv004', normal, compile, ['']) +test('drv005', normal, compile, ['']) +test('drv006', normal, compile, ['']) +test('drv007', normal, compile, ['']) +test('drv008', normal, compile, ['']) +test('drv009', normal, compile, ['']) +test('drv010', normal, compile, ['']) +test('drv011', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/deriving/should_fail/all.T b/testsuite/tests/ghc-regress/deriving/should_fail/all.T index 34b0637774..f614ac28b2 100644 --- a/testsuite/tests/ghc-regress/deriving/should_fail/all.T +++ b/testsuite/tests/ghc-regress/deriving/should_fail/all.T @@ -1,10 +1,6 @@ -include ($confdir ++ "/../vanilla-test.T") - --- Args to vtcf are: extra compile flags - -test "drvfail001" { vtcf("") } -test "drvfail002" { vtcf("") } -test "drvfail003" { vtcf("") } -test "drvfail004" { vtcf("") } -test "drvfail007" { vtcf("") } +test('drvfail001', normal, compile_fail, ['']) +test('drvfail002', normal, compile_fail, ['']) +test('drvfail003', normal, compile_fail, ['']) +test('drvfail004', normal, compile_fail, ['']) +test('drvfail007', normal, compile_fail, ['']) diff --git a/testsuite/tests/ghc-regress/deriving/should_run/all.T b/testsuite/tests/ghc-regress/deriving/should_run/all.T index 4d6fe4792e..8bbbe86a41 100644 --- a/testsuite/tests/ghc-regress/deriving/should_run/all.T +++ b/testsuite/tests/ghc-regress/deriving/should_run/all.T @@ -1,17 +1,15 @@ +# Args to vt are: +# extra compile flags +# extra run flags +# expected process return value, if not zero -include ($confdir ++ "/../vanilla-test.T") - --- Args to vt are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "drvrun001" { vtr("", "", "") } -test "drvrun002" { vtr("", "", "") } -test "drvrun003" { vtr("", "", "") } -test "drvrun004" { vtr("", "", "") } -test "drvrun005" { vtr("", "", "") } -test "drvrun006" { vtr("", "", "") } -test "drvrun007" { vtr("", "", "") } -test "drvrun008" { vtr("-funbox-strict-fields", "", "") } -test "drvrun009" { vtr("", "", "") } -test "drvrun010" { vtr("", "", "") } +test('drvrun001', normal, compile_and_run, ['']) +test('drvrun002', normal, compile_and_run, ['']) +test('drvrun003', normal, compile_and_run, ['']) +test('drvrun004', normal, compile_and_run, ['']) +test('drvrun005', normal, compile_and_run, ['']) +test('drvrun006', normal, compile_and_run, ['']) +test('drvrun007', normal, compile_and_run, ['']) +test('drvrun008', normal, compile_and_run, ['-funbox-strict-fields']) +test('drvrun009', normal, compile_and_run, ['']) +test('drvrun010', normal, compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/deriving/should_run/drvrun005.stderr b/testsuite/tests/ghc-regress/deriving/should_run/drvrun005.stderr index 8b13789179..e69de29bb2 100644 --- a/testsuite/tests/ghc-regress/deriving/should_run/drvrun005.stderr +++ b/testsuite/tests/ghc-regress/deriving/should_run/drvrun005.stderr @@ -1 +0,0 @@ - diff --git a/testsuite/tests/ghc-regress/lib/CPUTime/all.T b/testsuite/tests/ghc-regress/lib/CPUTime/all.T index 565fc36346..d204b0a7aa 100644 --- a/testsuite/tests/ghc-regress/lib/CPUTime/all.T +++ b/testsuite/tests/ghc-regress/lib/CPUTime/all.T @@ -1,4 +1 @@ - -include ($confdir ++ "/../vanilla-test.T") - -test "CPUTime001" { vtr("","","") } +test('CPUTime001', normal, compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/lib/Directory/all.T b/testsuite/tests/ghc-regress/lib/Directory/all.T index ead7028d53..e66dadc67a 100644 --- a/testsuite/tests/ghc-regress/lib/Directory/all.T +++ b/testsuite/tests/ghc-regress/lib/Directory/all.T @@ -1,7 +1,4 @@ - -include ($confdir ++ "/../vanilla-test.T") - -test "currentDirectory001" { vtr("","","") } -test "directory001" { vtr("","","") } -test "getDirectoryContents001" { vtr("","","") } -test "getPermissions001" { vtr("-cpp","","") } +test('currentDirectory001', normal, compile_and_run, ['']) +test('directory001', normal, compile_and_run, ['']) +test('getDirectoryContents001', normal, compile_and_run, ['']) +test('getPermissions001', normal, compile_and_run, ['-cpp']) diff --git a/testsuite/tests/ghc-regress/lib/IO/all.T b/testsuite/tests/ghc-regress/lib/IO/all.T index e0a0dfe20f..e06723d746 100644 --- a/testsuite/tests/ghc-regress/lib/IO/all.T +++ b/testsuite/tests/ghc-regress/lib/IO/all.T @@ -1,53 +1,51 @@ -include ($confdir ++ "/../vanilla-test.T") - -test "IOError001" { $stdin = "IOError001.hs" - vtr("","","") } -test "IOError002" { vtr("","","") } -test "finalization001" { vtr("","","") } -test "hClose001" { vtr("","","") } -test "hFileSize001" { vtr("","","") } -test "hFileSize002" { vtr("","","") } -test "hFlush001" { vtr("","","") } -test "hGetBuffering001" { $stdin = "hGetBuffering001.hs" - vtr("","","") } -test "hGetChar001" { vtr("","","") } -test "hGetLine001" { $stdin = "hGetLine001.hs" - vtr("-cpp","","") } -test "hGetLine002" { vtr("","","") } -test "hGetLine003" { vtr("","","") } -test "hGetPosn001" { vtr("-cpp","","") } -test "hIsEOF001" { vtr("","","") } -test "hIsEOF002" { vtr("-cpp","","") } - --- hReady doesn't work at the end of a file in GHC -test "hReady001" { $expect = "fail" - vtr("-cpp","","") } - -test "hSeek001" { vtr("-cpp","","") } -test "hSeek002" { vtr("-cpp","","") } -test "hSeek003" { vtr("-cpp","","") } -test "hSeek004" { vtr("-cpp","","") } -test "hSetBuffering002" { $stdin = "hSetBuffering002.hs" - vtr("","","") } -test "hSetBuffering003" { $stdin = "hSetBuffering003.hs" - vtr("","","") } -test "ioeGetErrorString001" { vtr("-cpp","","") } -test "ioeGetFileName001" { vtr("-cpp","","") } -test "ioeGetHandle001" { vtr("-cpp","","") } -test "isEOF001" { vtr("","","") } -test "misc001" { vtr("","misc001.hs misc001.out","") } -test "openFile001" { vtr("","","") } -test "openFile002" { vtr("","","1") } -test "openFile003" { vtr("","","") } -test "openFile004" { vtr("","","") } -test "openFile005" { if $platform == "i386-unknown-mingw32" then $expect = "fail" fi - vtr("","","") } -test "openFile006" { vtr("","","") } -test "openFile007" { if $platform == "i386-unknown-mingw32" then $expect = "fail" fi - vtr("","","") } -test "putStr001" { vtr("","","") } -test "readFile001" { if $platform == "i386-unknown-mingw32" then $expect = "fail" fi - vtr("","","") } -test "readwrite001" { vtr("-cpp","","") } -test "readwrite002" { $stdin = "readwrite002.hs" - vtr("-cpp","","") } + +def expect_fail_if_windows( opts ): + return expect_fail_if_platform("i386-unknown-mingw32"); + +test('IOError001', set_stdin('IOError001.hs'), compile_and_run, ['']) +test('IOError002', normal, compile_and_run, ['']) +test('finalization001', normal, compile_and_run, ['']) +test('hClose001', normal, compile_and_run, ['']) +test('hFileSize001', normal, compile_and_run, ['']) +test('hFileSize002', normal, compile_and_run, ['']) +test('hFlush001', normal, compile_and_run, ['']) +test('hGetBuffering001', set_stdin('hGetBuffering001.hs'), compile_and_run, ['']) +test('hGetChar001', normal, compile_and_run, ['']) +test('hGetLine001', set_stdin('hGetLine001.hs'), compile_and_run, ['-cpp']) +test('hGetLine002', normal, compile_and_run, ['']) +test('hGetLine003', normal, compile_and_run, ['']) +test('hGetPosn001', normal, compile_and_run, ['-cpp']) +test('hIsEOF001', normal, compile_and_run, ['']) +test('hIsEOF002', normal, compile_and_run, ['-cpp']) + +# hReady doesn't work at the end of a file in GHC +test('hReady001', expect_fail, compile_and_run, ['-cpp']) + +test('hSeek001', normal, compile_and_run, ['-cpp']) +test('hSeek002', normal, compile_and_run, ['-cpp']) +test('hSeek003', normal, compile_and_run, ['-cpp']) +test('hSeek004', normal, compile_and_run, ['-cpp']) + +test('hSetBuffering002', set_stdin('hSetBuffering002.hs'), compile_and_run, ['']) + +test('hSetBuffering003', set_stdin('hSetBuffering003.hs'), compile_and_run, ['']) + +test('ioeGetErrorString001', normal, compile_and_run, ['-cpp']) +test('ioeGetFileName001', normal, compile_and_run, ['-cpp']) +test('ioeGetHandle001', normal, compile_and_run, ['-cpp']) +test('isEOF001', normal, compile_and_run, ['']) + +test('misc001', extra_run_opts('misc001.hs misc001.out'), \ + compile_and_run, ['']) + +test('openFile001', normal, compile_and_run, ['']) +test('openFile002', exit_code(1), compile_and_run, ['']) +test('openFile003', normal, compile_and_run, ['']) +test('openFile004', normal, compile_and_run, ['']) +test('openFile005', expect_fail_if_windows, compile_and_run, ['']) +test('openFile006', normal, compile_and_run, ['']) +test('openFile007', expect_fail_if_windows, compile_and_run, ['']) +test('putStr001', normal, compile_and_run, ['']) +test('readFile001', expect_fail_if_windows, compile_and_run, ['']) +test('readwrite001', normal, compile_and_run, ['-cpp']) +test('readwrite002', set_stdin('readwrite002.hs'), compile_and_run, ['-cpp']) diff --git a/testsuite/tests/ghc-regress/lib/IOExts/all.T b/testsuite/tests/ghc-regress/lib/IOExts/all.T index 0ec5c41cdc..c69ff1b394 100644 --- a/testsuite/tests/ghc-regress/lib/IOExts/all.T +++ b/testsuite/tests/ghc-regress/lib/IOExts/all.T @@ -1,18 +1,21 @@ -include ($confdir ++ "/../vanilla-test.T") +def set_opts(opts): + opts.extra_hc_opts = '-package lang' --- Use this itsy helper fn to pass in an extra flag -def myvtr($extra_comp_args, $a, $b) -{ - vtr("-package lang " ++ $extra_comp_args, $a, $b) -} +setTestOpts(set_opts) -test "echo001" { $stdin = "echo001.hs" myvtr("","","") } -test "hTell001" { if $platform == "i386-unknown-mingw32" then $expect = "fail" fi - myvtr("","","") } -test "hTell002" { if $platform == "i386-unknown-mingw32" then $expect = "fail" fi - myvtr("","","") } -test "performGC001" { myvtr("","","") } -test "trace001" { myvtr("","","") } -test "hGetBuf001" { myvtr("","","") } -test "hPutBuf001" { myvtr("","","") } -test "hPutBuf002" { myvtr("","","") } +test('echo001', set_stdin("echo001.hs"), compile_and_run, ['']) + +test('hTell001', expect_fail_if_platform("i386-unknown-mingw32"), \ + compile_and_run, ['']) + +test('hTell002', expect_fail_if_platform("i386-unknown-mingw32"), \ + compile_and_run, ['']) + +test('performGC001', normal, compile_and_run, ['']) + +# optimisation screws up this test because some of the traces get commoned up +test('trace001', omit_ways(['opt','optasm']), compile_and_run, ['']) + +test('hGetBuf001', normal, compile_and_run, ['']) +test('hPutBuf001', normal, compile_and_run, ['']) +test('hPutBuf002', normal, compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/lib/IORef/all.T b/testsuite/tests/ghc-regress/lib/IORef/all.T index d151e74267..06e78d9662 100644 --- a/testsuite/tests/ghc-regress/lib/IORef/all.T +++ b/testsuite/tests/ghc-regress/lib/IORef/all.T @@ -1,10 +1,3 @@ -include ($confdir ++ "/../vanilla-test.T") - --- Use this itsy helper fn to pass in an extra flag -def myvtr($extra_comp_args, $a, $b) -{ - vtr("-package lang " ++ $extra_comp_args, $a, $b) -} - -test "ioref001" { myvtr("","+RTS -K16m -RTS","") } +test('ioref001', extra_run_opts('+RTS -K16m -RTS'), \ + compile_and_run, ['-package lang']) diff --git a/testsuite/tests/ghc-regress/lib/Makefile b/testsuite/tests/ghc-regress/lib/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/lib/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/lib/Numeric/all.T b/testsuite/tests/ghc-regress/lib/Numeric/all.T index 65a994c9bc..c31f09d346 100644 --- a/testsuite/tests/ghc-regress/lib/Numeric/all.T +++ b/testsuite/tests/ghc-regress/lib/Numeric/all.T @@ -1,15 +1,8 @@ - -include ($confdir ++ "/../vanilla-test.T") - --- Args to vt are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "num001" { vtr("", "", "") } -test "num002" { vtr("", "", "") } -test "num003" { vtr("", "", "") } -test "num004" { vtr("", "", "") } -test "num005" { vtr("", "", "") } -test "num006" { vtr("-package lang", "", "") } -test "num007" { vtr("", "", "") } -test "num008" { vtr("", "", "") } +test('num001', normal, compile_and_run, ['']) +test('num002', normal, compile_and_run, ['']) +test('num003', normal, compile_and_run, ['']) +test('num004', normal, compile_and_run, ['']) +test('num005', normal, compile_and_run, ['']) +test('num006', normal, compile_and_run, ['-package lang']) +test('num007', normal, compile_and_run, ['']) +test('num008', normal, compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/lib/System/all.T b/testsuite/tests/ghc-regress/lib/System/all.T index 64454abc5d..cd59a6dae1 100644 --- a/testsuite/tests/ghc-regress/lib/System/all.T +++ b/testsuite/tests/ghc-regress/lib/System/all.T @@ -1,6 +1,8 @@ -include ($confdir ++ "/../vanilla-test.T") -test "exitWith001" { vtr("","","42") } -test "getArgs001" { $normalise_output = True vtr("","","") } -test "getEnv001" { vtr("","","") } -test "system001" { skip when $platform == "i386-unknown-mingw32" vtr("","","") } +test('exitWith001', exit_code(42), compile_and_run, ['']) +test('getArgs001', normal, compile_and_run, ['']) +test('getEnv001', normal, compile_and_run, ['']) + +test('system001', expect_fail_if_platform("i386-unknown-mingw32"), \ + compile_and_run, ['']) + diff --git a/testsuite/tests/ghc-regress/lib/Time/all.T b/testsuite/tests/ghc-regress/lib/Time/all.T index f600e2ea04..25b40820c0 100644 --- a/testsuite/tests/ghc-regress/lib/Time/all.T +++ b/testsuite/tests/ghc-regress/lib/Time/all.T @@ -1,5 +1,3 @@ -include ($confdir ++ "/../vanilla-test.T") - -test "time002" { vtr("","","") } -test "time003" { vtr("","","") } -test "time004" { vtr("","","") } +test('time002', normal, compile_and_run, ['']) +test('time003', normal, compile_and_run, ['']) +test('time004', normal, compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/lib/TimeExts/all.T b/testsuite/tests/ghc-regress/lib/TimeExts/all.T index 357a3c20d9..26adad8803 100644 --- a/testsuite/tests/ghc-regress/lib/TimeExts/all.T +++ b/testsuite/tests/ghc-regress/lib/TimeExts/all.T @@ -1,3 +1 @@ -include ($confdir ++ "/../vanilla-test.T") - -test "timeexts001" { vtr("-package lang","","") } +test('timeexts001', normal, compile_and_run, ['-package lang']) diff --git a/testsuite/tests/ghc-regress/lib/net/all.T b/testsuite/tests/ghc-regress/lib/net/all.T index 2699b5d0fe..da8b2d4060 100644 --- a/testsuite/tests/ghc-regress/lib/net/all.T +++ b/testsuite/tests/ghc-regress/lib/net/all.T @@ -1,5 +1,4 @@ -include ($confdir ++ "/../vanilla-test.T") -test "net001" { vtr("-package concurrent -package net","","") } -test "uri001" { vtr("-package network","","") } -test "net002" { vtr("-package net", "3", "") } +test('net001', normal, compile_and_run, [ '-package concurrent -package net']) +test('uri001', normal, compile_and_run, ['-package network']) +test('net002', extra_run_opts('3'), compile_and_run, ['-package net']) diff --git a/testsuite/tests/ghc-regress/lib/should_run/all.T b/testsuite/tests/ghc-regress/lib/should_run/all.T index f8378f18fd..2d082d5f48 100644 --- a/testsuite/tests/ghc-regress/lib/should_run/all.T +++ b/testsuite/tests/ghc-regress/lib/should_run/all.T @@ -1,29 +1,35 @@ -include ($confdir ++ "/../vanilla-test.T") +test('char001', normal, compile_and_run, ['']) +test('rand001', normal, compile_and_run, ['']) +test('show001', normal, compile_and_run, ['']) +test('text001', normal, compile_and_run, ['']) -def lang_vtr($extra_comp_args, $a, $b) -{ - vtr("-package lang " ++ $extra_comp_args, $a, $b) -} +# The rest of these tests need -package lang... +def set_opts( opts ): + opts.extra_hc_opts = '-package lang' +resetTestOpts( set_opts ) -test "addr001" { lang_vtr("","","") } -test "char001" { vtr("","","") } -test "dynamic001" { lang_vtr("","","") } -test "dynamic002" { lang_vtr("","","") } -test "enum01" { lang_vtr("-cpp","","") } -test "enum02" { lang_vtr("-cpp","","") } -test "enum03" { lang_vtr("-cpp","","") } -test "enum04" { $expect = "fail" lang_vtr("","","") } -test "exceptions001" { lang_vtr("","","") } -test "list001" { lang_vtr("","","") } -test "list002" { lang_vtr("","","") } -test "memo001" { lang_vtr("-package util","+RTS -A10k -G1 -RTS","") } -test "memo002" { lang_vtr("-package util","20","") } -test "packedstring001" { lang_vtr("","","") } -test "rand001" { vtr("","","") } -test "show001" { vtr("","","") } -test "stableptr001" { lang_vtr("","+RTS -K4m -RTS","") } -test "stableptr003" { lang_vtr("","","") } -test "stableptr004" { lang_vtr("","+RTS -K4m -RTS","") } -test "stableptr005" { lang_vtr("","","") } -test "text001" { vtr("","","") } -test "weak001" { lang_vtr("-fglasgow-exts","","") } +test('addr001', normal, compile_and_run, ['']) +test('dynamic001', normal, compile_and_run, ['']) +test('dynamic002', normal, compile_and_run, ['']) +test('enum01', normal, compile_and_run, ['-cpp']) +test('enum02', normal, compile_and_run, ['-cpp']) +test('enum03', normal, compile_and_run, ['-cpp']) +test('enum04', expect_fail, compile_and_run, [ '']) +test('exceptions001', normal, compile_and_run, ['']) +test('list001' , normal, compile_and_run, ['']) + +test('memo001', extra_run_opts('+RTS -A10k -G1 -RTS'), \ + compile_and_run, ['-package util']) + +test('memo002', extra_run_opts('20'), \ + compile_and_run, ['-package util']) + +test('packedstring001', normal, compile_and_run, ['']) + +test('stableptr001', extra_run_opts('+RTS -K4m -RTS'), compile_and_run, ['']) +test('stableptr003', normal, compile_and_run, ['']) +test('stableptr004', extra_run_opts('+RTS -K4m -RTS'), compile_and_run, ['']) +test('stableptr005', normal, compile_and_run, ['']) + +test('text001' normal, compile_and_run, ['']) +test('weak001', normal, compile_and_run, ['-fglasgow-exts']) diff --git a/testsuite/tests/ghc-regress/lib/win32/all.T b/testsuite/tests/ghc-regress/lib/win32/all.T index ca100a48ea..15e40aaea3 100644 --- a/testsuite/tests/ghc-regress/lib/win32/all.T +++ b/testsuite/tests/ghc-regress/lib/win32/all.T @@ -1,16 +1,12 @@ --- This isn't a very good test to run automatically at the moment, since --- it doesn't terminate +# This isn't a very good test to run automatically at the moment, since +# it doesn't terminate -include ($confdir ++ "/../vanilla-test.T") +def set_opts( opts ): + opts.extra_hc_opts = '-package lang -package win32' + opts.skip = 1 --- Use this itsy helper fn to pass in an extra flag -def myvtr($extra_comp_args, $a, $b) -{ - -- Only run the tests on Windows...no, let's not as it will - -- only block an automatic testrun. - skip when True || ($platform /= "i386-unknown-mingw32" && - $platform /= "i386-unknown-cygwin32") - vtr("-package lang -package win32 " ++ $extra_comp_args, $a, $b) -} +# if config.platform != "i386-unknown-mingw32" and \ +# config.platform != "i386-unknown-cygwin32": +# opts.skip = 1 -test "win32001" { myvtr("","","") } +test('win32001', set_opts, compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/numeric/Makefile b/testsuite/tests/ghc-regress/numeric/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/numeric/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/numeric/should_run/all.T b/testsuite/tests/ghc-regress/numeric/should_run/all.T index 34d3afa172..d0c6dcea04 100644 --- a/testsuite/tests/ghc-regress/numeric/should_run/all.T +++ b/testsuite/tests/ghc-regress/numeric/should_run/all.T @@ -1,26 +1,31 @@ +# Args to compile_and_run are: +# extra compile flags +# extra run flags +# expected process return value, if not zero -include ($confdir ++ "/../vanilla-test.T") +test('arith001', normal, compile_and_run, ['']) +test('arith002', normal, compile_and_run, ['']) +test('arith003', normal, compile_and_run, ['']) +test('arith004', normal, compile_and_run, ['']) +test('arith005', normal, compile_and_run, ['']) +test('arith006', normal, compile_and_run, ['-package lang']) +test('arith007', normal, compile_and_run, ['']) --- Args to vt are: extra compile flags --- extra run flags --- expected process return value, if not zero +# This test generates slightly different results with the NCG on x86, +# because of the extra precision when floating point computations are +# done in registers rather than going via memory. +test('arith008', expect_fail_for(['optasm']), compile_and_run, ['']) -test "arith001" { vtr("", "", "") } -test "arith002" { vtr("", "", "") } -test "arith003" { vtr("", "", "") } -test "arith004" { vtr("", "", "") } -test "arith005" { vtr("", "", "") } -test "arith006" { vtr("-package lang", "", "") } -test "arith007" { vtr("", "", "") } -test "arith008" { vtr("", "", "") } -test "arith009" { vtr("", "", "") } -test "arith010" { vtr("-package lang", "", "") } -test "arith011" { vtr("-package lang", "", "") } -test "arith012" { vtr("-package lang", "", "") } -test "arith013" { vtr("", "", "") } -test "arith014" { vtr("", "", "") } -test "arith015" { vtr("", "", "") } -test "num009" { vtr("", "", "") } -test "num010" { vtr("", "", "") } -test "num011" { vtr("", "", "") } -test "arith016" { vtr("-fglasgow-exts", "", "") } +test('arith009', normal, compile_and_run, ['']) +test('arith010', normal, compile_and_run, ['-package lang']) +test('arith011', normal, compile_and_run, ['-package lang']) + +test('arith012', expect_fail_for(['optasm']), compile_and_run, ['-package lang']) + +test('arith013', normal, compile_and_run, ['']) +test('arith014', normal, compile_and_run, ['']) +test('arith015', normal, compile_and_run, ['']) +test('num009', normal, compile_and_run, ['']) +test('num010', normal, compile_and_run, ['']) +test('num011', normal, compile_and_run, ['']) +test('arith016', normal, compile_and_run, ['-fglasgow-exts']) diff --git a/testsuite/tests/ghc-regress/parser/Makefile b/testsuite/tests/ghc-regress/parser/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/parser/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/parser/should_compile/all.T b/testsuite/tests/ghc-regress/parser/should_compile/all.T index 2f1a09f5f4..b92e6c431f 100644 --- a/testsuite/tests/ghc-regress/parser/should_compile/all.T +++ b/testsuite/tests/ghc-regress/parser/should_compile/all.T @@ -1,43 +1,41 @@ -include ($confdir ++ "/../vanilla-test.T") +test('read001', normal, compile, ['']) +test('read002', normal, compile, ['']) +test('read003', normal, compile, ['']) +test('read004', normal, compile, ['']) +test('read005', normal, compile, ['']) -test "read001" { vtc("") } -test "read002" { vtc("") } -test "read003" { vtc("") } -test "read004" { vtc("") } -test "read005" { vtc("") } +# these two are really a multi-module test, order is important +test('read006', normal, compile, ['']) +test('read007', normal, compile, ['']) --- these two are really a multi-module test, order is important -test "read006" { vtc("") } -test "read007" { vtc("") } +test('read008', normal, compile, ['']) +test('read009', normal, compile, ['']) +test('read010', normal, compile, ['']) +test('read011', normal, compile, ['']) -test "read008" { vtc("") } -test "read009" { vtc("") } -test "read010" { vtc("") } -test "read011" { vtc("") } +# these two are really a multi-module test, order is important +test('read012', omit_ways(['optasm']), compile, ['-fvia-C -funfold-casms-in-hi-file -fglasgow-exts']) +test('read013', normal, compile, ['-fglasgow-exts']) --- these two are really a multi-module test, order is important -test "read012" { vtc("-fvia-C -O -funfold-casms-in-hi-file -fglasgow-exts") } -test "read013" { vtc("-O -fglasgow-exts") } - -test "read014" { vtc("-Wall") } -test "read015" { vtc("") } -test "read016" { vtc("") } -test "read017" { vtc("") } -test "read018" { vtc("") } -test "read019" { vtc("") } -test "read020" { vtc("") } -test "read021" { vtc("") } -test "read022" { vtc("-fglasgow-exts") } -test "read023" { vtc("") } -test "read024" { vtc("-fglasgow-exts") } -test "read025" { vtc("") } -test "read026" { vtc("") } -test "read027" { vtc("") } -test "read028" { vtc("") } -test "read029" { vtc("") } -test "read030" { vtc("") } -test "read031" { vtc("") } -test "read032" { vtc("") } -test "read033" { vtc("") } -test "read034" { vtc("") } +test('read014', normal, compile, ['-Wall']) +test('read015', normal, compile, ['']) +test('read016', normal, compile, ['']) +test('read017', normal, compile, ['']) +test('read018', normal, compile, ['']) +test('read019', normal, compile, ['']) +test('read020', normal, compile, ['']) +test('read021', normal, compile, ['']) +test('read022', normal, compile, ["-fglasgow-exts"]) +test('read023', normal, compile, ['']) +test('read024', normal, compile, ["-fglasgow-exts"]) +test('read025', normal, compile, ['']) +test('read026', normal, compile, ['']) +test('read027', normal, compile, ['']) +test('read028', normal, compile, ['']) +test('read029', normal, compile, ['']) +test('read030', normal, compile, ['']) +test('read031', normal, compile, ['']) +test('read032', normal, compile, ['']) +test('read033', normal, compile, ['']) +test('read034', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/parser/should_fail/all.T b/testsuite/tests/ghc-regress/parser/should_fail/all.T index 947fc1c7ab..cda3e0c983 100644 --- a/testsuite/tests/ghc-regress/parser/should_fail/all.T +++ b/testsuite/tests/ghc-regress/parser/should_fail/all.T @@ -1,31 +1,30 @@ -include ($confdir ++ "/../vanilla-test.T") +test('read001', normal, compile_fail, ['']) +test('read002', expect_fail, compile_fail, ['']) +test('read003', normal, compile_fail, ['']) +test('read004', normal, compile_fail, ['']) +test('read005', normal, compile_fail, ['']) +test('read006', normal, compile_fail, ['']) +test('read007', normal, compile_fail, ['']) +test('read008', normal, compile_fail, ['']) +test('read009', normal, compile_fail, ['']) +# test10: missing +test('read011', normal, compile_fail, ['']) +test('read012', normal, compile_fail, ['']) +test('read013', normal, compile_fail, ['-fglasgow-exts']) +test('read014', normal, compile_fail, ['']) +test('read015', normal, compile_fail, ['']) +test('read016', normal, compile_fail, ['']) +test('read017', normal, compile_fail, ['']) +test('read018', normal, compile_fail, ['']) +test('read019', normal, compile_fail, ['']) +test('read020', normal, compile_fail, ['']) -test "read001" { vtcf("") } -test "read002" { $expect = "fail" vtcf("") } -test "read003" { vtcf("") } -test "read004" { vtcf("") } -test "read005" { vtcf("") } -test "read006" { vtcf("") } -test "read007" { vtcf("") } -test "read008" { vtcf("") } -test "read009" { vtcf("") } ---test "read010" { vtcf("") } -test "read011" { vtcf("") } -test "read012" { vtcf("") } -test "read013" { vtcf("-fglasgow-exts") } -test "read014" { vtcf("") } -test "read015" { vtcf("") } -test "read016" { vtcf("") } -test "read017" { vtcf("") } -test "read018" { vtcf("") } -test "read019" { vtcf("") } -test "read020" { vtcf("") } +# empty file (length zero) is a legal Haskell module. It fails to compile +# because it doesn't contain a definition of Main.main. GHC 5.02 crashed +# on this example. +test('read021', normal, compile_fail, ['']) --- empty file (length zero) is a legal Haskell module. It fails to compile --- because it doesn't contain a definition of Main.main. GHC 5.02 crashed --- on this example. -test "read021" { vtcf("") } -test "read022" { vtcf("") } -test "read023" { vtcf("") } -test "read024" { $expect = "fail" vtcf("") } +test('read022', normal, compile_fail, ['']) +test('read023', normal, compile_fail, ['']) +test('read024', expect_fail, compile_fail, ['']) diff --git a/testsuite/tests/ghc-regress/programs/10queens/test.T b/testsuite/tests/ghc-regress/programs/10queens/test.T index bd721cc5b8..f9fda0d4e9 100644 --- a/testsuite/tests/ghc-regress/programs/10queens/test.T +++ b/testsuite/tests/ghc-regress/programs/10queens/test.T @@ -1,9 +1,2 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "10queens" { mtr("", "", "") } - +test('10queens', normal, multimod_compile_and_run, ['Main', '']) diff --git a/testsuite/tests/ghc-regress/programs/Makefile b/testsuite/tests/ghc-regress/programs/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/programs/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/programs/andre_monad/test.T b/testsuite/tests/ghc-regress/programs/andre_monad/test.T index 44250a6084..9ca1884164 100644 --- a/testsuite/tests/ghc-regress/programs/andre_monad/test.T +++ b/testsuite/tests/ghc-regress/programs/andre_monad/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "andre_monad" { mtr("", "", "") } +test('andre_monad', normal, multimod_compile_and_run, ['Main', '']) diff --git a/testsuite/tests/ghc-regress/programs/andy_cherry/test.T b/testsuite/tests/ghc-regress/programs/andy_cherry/test.T index 984575c7d7..30ec335f08 100644 --- a/testsuite/tests/ghc-regress/programs/andy_cherry/test.T +++ b/testsuite/tests/ghc-regress/programs/andy_cherry/test.T @@ -1,11 +1,4 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - --- The program wants to read stuff from its own directory, --- so we pass it the test dir as its single argument. -test "andy_cherry" { mtr("-package lang -cpp", ".", "") } +test('andy_cherry', extra_run_opts('.'), multimod_compile_and_run, \ + ['Main', '-package lang -cpp']) diff --git a/testsuite/tests/ghc-regress/programs/barton-mangler-bug/test.T b/testsuite/tests/ghc-regress/programs/barton-mangler-bug/test.T index df779b9061..9ecd6d399d 100644 --- a/testsuite/tests/ghc-regress/programs/barton-mangler-bug/test.T +++ b/testsuite/tests/ghc-regress/programs/barton-mangler-bug/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "barton-mangler-bug" { mtr("", "", "") } +test('barton-mangler-bug', normal, multimod_compile_and_run, ['Main', '']) diff --git a/testsuite/tests/ghc-regress/programs/callback/test.T b/testsuite/tests/ghc-regress/programs/callback/test.T index f774029a5c..e3fcf9d1e2 100644 --- a/testsuite/tests/ghc-regress/programs/callback/test.T +++ b/testsuite/tests/ghc-regress/programs/callback/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "callback" { mtr("-fglasgow-exts -package lang -fvia-C", "", "") } - +test('callback', omit_ways(['optasm']), multimod_compile_and_run, \ + ['Main', '-fglasgow-exts -package lang -fvia-C']) diff --git a/testsuite/tests/ghc-regress/programs/cholewo-eval/test.T b/testsuite/tests/ghc-regress/programs/cholewo-eval/test.T index 449e0341e2..49f0302e59 100644 --- a/testsuite/tests/ghc-regress/programs/cholewo-eval/test.T +++ b/testsuite/tests/ghc-regress/programs/cholewo-eval/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "cholewo-eval" { mtr("", "", "") } +test('cholewo-eval', normal, multimod_compile_and_run, ['Main', '']) diff --git a/testsuite/tests/ghc-regress/programs/cvh_unboxing/test.T b/testsuite/tests/ghc-regress/programs/cvh_unboxing/test.T index 1615806247..4d4aed7ea5 100644 --- a/testsuite/tests/ghc-regress/programs/cvh_unboxing/test.T +++ b/testsuite/tests/ghc-regress/programs/cvh_unboxing/test.T @@ -1,9 +1,4 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "cvh_unboxing" { mtr("-fglasgow-exts", "", "") } +test('cvh_unboxing', normal, multimod_compile_and_run, \ + ['Main', '-fglasgow-exts']) diff --git a/testsuite/tests/ghc-regress/programs/fast2haskell/test.T b/testsuite/tests/ghc-regress/programs/fast2haskell/test.T index 7d35942e22..d2c8575d1c 100644 --- a/testsuite/tests/ghc-regress/programs/fast2haskell/test.T +++ b/testsuite/tests/ghc-regress/programs/fast2haskell/test.T @@ -1,9 +1,4 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "fast2haskell" { mtr("-fglasgow-exts -package lang", "", "") } +test('fast2haskell', normal, multimod_compile_and_run, \ + ['Main', '-fglasgow-exts -package lang']) diff --git a/testsuite/tests/ghc-regress/programs/fun_insts/test.T b/testsuite/tests/ghc-regress/programs/fun_insts/test.T index 213d7bedc4..819d72e394 100644 --- a/testsuite/tests/ghc-regress/programs/fun_insts/test.T +++ b/testsuite/tests/ghc-regress/programs/fun_insts/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "fun_insts" { mtr("", "", "") } +test('fun_insts', normal, multimod_compile_and_run, ['Main', '']) diff --git a/testsuite/tests/ghc-regress/programs/galois_raytrace/test.T b/testsuite/tests/ghc-regress/programs/galois_raytrace/test.T index 3d61a179f5..d7de92b61b 100644 --- a/testsuite/tests/ghc-regress/programs/galois_raytrace/test.T +++ b/testsuite/tests/ghc-regress/programs/galois_raytrace/test.T @@ -1,10 +1,5 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - --- pass $testdir so it knows where its home dir is -test "galois_raytrace" { mtr("-O -package lang -package text", "", "") } +# pass $testdir so it knows where its home dir is +test('galois_raytrace', omit_ways(['normal']), multimod_compile_and_run, \ + ['Main', '-O -package lang -package text']) diff --git a/testsuite/tests/ghc-regress/programs/jeff-bug/test.T b/testsuite/tests/ghc-regress/programs/jeff-bug/test.T index 584c8f29bd..6a84a955e5 100644 --- a/testsuite/tests/ghc-regress/programs/jeff-bug/test.T +++ b/testsuite/tests/ghc-regress/programs/jeff-bug/test.T @@ -1,12 +1,5 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - --- Lack sensible input file to test it with. -test "jeff-bug" { - $expect = "fail" - mtr("-package lang -fglasgow-exts -cpp", "-count /dev/null", "") - } +test('jeff-bug', \ + compose(expect_fail, extra_run_opts('-count /dev/null'), \ + multimod_compile_and_run, \ + ['Main', '-package lang -fglasgow-exts -cpp']) diff --git a/testsuite/tests/ghc-regress/programs/jl_defaults/test.T b/testsuite/tests/ghc-regress/programs/jl_defaults/test.T index 7557f11379..85951c3346 100644 --- a/testsuite/tests/ghc-regress/programs/jl_defaults/test.T +++ b/testsuite/tests/ghc-regress/programs/jl_defaults/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "jl_defaults" { mtr("", "", "") } +test('jl_defaults', normal, multimod_compile_and_run, ['Main', '']) diff --git a/testsuite/tests/ghc-regress/programs/jq_readsPrec/test.T b/testsuite/tests/ghc-regress/programs/jq_readsPrec/test.T index 81d3a4754f..c78e7bbb16 100644 --- a/testsuite/tests/ghc-regress/programs/jq_readsPrec/test.T +++ b/testsuite/tests/ghc-regress/programs/jq_readsPrec/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "jq_readsPrec" { mtr("", "", "") } +test('jq_readsPrec', normal, multimod_compile_and_run, ['Main', '']) diff --git a/testsuite/tests/ghc-regress/programs/jtod_circint/test.T b/testsuite/tests/ghc-regress/programs/jtod_circint/test.T index 7325a7f888..45a1bb2aff 100644 --- a/testsuite/tests/ghc-regress/programs/jtod_circint/test.T +++ b/testsuite/tests/ghc-regress/programs/jtod_circint/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "jtod_circint" { mtr("", "", "") } +test('jtod_circint', normal, multimod_compile_and_run, ['Main', '']) diff --git a/testsuite/tests/ghc-regress/programs/jules_xref/test.T b/testsuite/tests/ghc-regress/programs/jules_xref/test.T index 2c78c8d5e5..896a27840c 100644 --- a/testsuite/tests/ghc-regress/programs/jules_xref/test.T +++ b/testsuite/tests/ghc-regress/programs/jules_xref/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "jules_xref" { mtr("", "", "") } +test('jules_xref', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/jules_xref2/test.T b/testsuite/tests/ghc-regress/programs/jules_xref2/test.T index 29991307dd..2db52e53d6 100644 --- a/testsuite/tests/ghc-regress/programs/jules_xref2/test.T +++ b/testsuite/tests/ghc-regress/programs/jules_xref2/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "jules_xref2" { mtr("", "", "") } +test('jules_xref2', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/launchbury/test.T b/testsuite/tests/ghc-regress/programs/launchbury/test.T index 6d3c4e04dd..88d1f56887 100644 --- a/testsuite/tests/ghc-regress/programs/launchbury/test.T +++ b/testsuite/tests/ghc-regress/programs/launchbury/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "launchbury" { mtr("", "", "") } +test('launchbury', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/lennart_range/test.T b/testsuite/tests/ghc-regress/programs/lennart_range/test.T index beafb27cd3..d2ebca0ec6 100644 --- a/testsuite/tests/ghc-regress/programs/lennart_range/test.T +++ b/testsuite/tests/ghc-regress/programs/lennart_range/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "lennart_range" { mtr("", "", "") } +test('lennart_range', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/lex/test.T b/testsuite/tests/ghc-regress/programs/lex/test.T index 1e6b8d1139..8f73b3b3be 100644 --- a/testsuite/tests/ghc-regress/programs/lex/test.T +++ b/testsuite/tests/ghc-regress/programs/lex/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "lex" { mtr("", "", "") } +test('lex', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/life_space_leak/test.T b/testsuite/tests/ghc-regress/programs/life_space_leak/test.T index a2c9104b3e..a5f6bb3108 100644 --- a/testsuite/tests/ghc-regress/programs/life_space_leak/test.T +++ b/testsuite/tests/ghc-regress/programs/life_space_leak/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "life_space_leak" { mtr("", "", "") } +test('life_space_leak', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/north_array/test.T b/testsuite/tests/ghc-regress/programs/north_array/test.T index b7cfd87022..c58b47c1a3 100644 --- a/testsuite/tests/ghc-regress/programs/north_array/test.T +++ b/testsuite/tests/ghc-regress/programs/north_array/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "north_array" { mtr("", "", "") } +test('north_array', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/okeefe_neural/test.T b/testsuite/tests/ghc-regress/programs/okeefe_neural/test.T index 308bfcdef4..b4ec1f4fa6 100644 --- a/testsuite/tests/ghc-regress/programs/okeefe_neural/test.T +++ b/testsuite/tests/ghc-regress/programs/okeefe_neural/test.T @@ -1,14 +1,12 @@ -include ($confdir ++ "/../multimod-test.T") +# this one causes the compiler to run out of heap in the simplifier --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero +def set_opts( opts ): + opts.expect = 'fail' + # Skip the test on alpha-dec-osf3, where we + # run into an infinite loop on some builds + if config.platform == "alpha-dec-osf3": + opts.skip = 1; --- this one causes the compiler to run out of heap in the simplifier -test "okeefe_neural" { - -- Skip the test on alpha-dec-osf3, where we - -- run into an infinite loop on some builds - skip when $platform == "alpha-dec-osf3" - $expect = "fail" - mtr("-package lang +RTS -M64m -RTS", "", "") } +test('okeefe_neural', set_opts, multimod_compile_and_run, \ + ['Main', '', '-package lang +RTS -M64m -RTS']) diff --git a/testsuite/tests/ghc-regress/programs/record_upd/test.T b/testsuite/tests/ghc-regress/programs/record_upd/test.T index 37d34ff71b..211e6c13f0 100644 --- a/testsuite/tests/ghc-regress/programs/record_upd/test.T +++ b/testsuite/tests/ghc-regress/programs/record_upd/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "record_upd" { mtr("", "", "") } +test('record_upd', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/rittri/test.T b/testsuite/tests/ghc-regress/programs/rittri/test.T index ecc27a7c29..edc515f87d 100644 --- a/testsuite/tests/ghc-regress/programs/rittri/test.T +++ b/testsuite/tests/ghc-regress/programs/rittri/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "rittri" { mtr("", "", "") } +test('rittri', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/sanders_array/test.T b/testsuite/tests/ghc-regress/programs/sanders_array/test.T index b4293afa8e..255db76f8d 100644 --- a/testsuite/tests/ghc-regress/programs/sanders_array/test.T +++ b/testsuite/tests/ghc-regress/programs/sanders_array/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "sanders_array" { mtr("", "", "") } +test('sanders_array', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/seward-space-leak/test.T b/testsuite/tests/ghc-regress/programs/seward-space-leak/test.T index 3b29a79ed1..dd3119f2d3 100644 --- a/testsuite/tests/ghc-regress/programs/seward-space-leak/test.T +++ b/testsuite/tests/ghc-regress/programs/seward-space-leak/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "seward-space-leak" { mtr("", "", "") } +test('seward-space-leak', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/programs/strict_anns/test.T b/testsuite/tests/ghc-regress/programs/strict_anns/test.T index 466920107a..73abb57e11 100644 --- a/testsuite/tests/ghc-regress/programs/strict_anns/test.T +++ b/testsuite/tests/ghc-regress/programs/strict_anns/test.T @@ -1,9 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - --- Args to mtr are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "strict_anns" { mtr("", "", "") } +test('strict_anns', normal, multimod_compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/rename/Makefile b/testsuite/tests/ghc-regress/rename/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/rename/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/rename/should_compile/all.T b/testsuite/tests/ghc-regress/rename/should_compile/all.T index 8e93b33794..9fa7cd50a7 100644 --- a/testsuite/tests/ghc-regress/rename/should_compile/all.T +++ b/testsuite/tests/ghc-regress/rename/should_compile/all.T @@ -1,41 +1,38 @@ +# Args to vtc are: extra compile flags -include ($confdir ++ "/../vanilla-test.T") - --- Args to vtc are: extra compile flags - -test "rn003" { vtc("") } -test "rn005" { vtc("") } -test "rn006" { vtc("") } -test "rn009" { vtc("") } -test "rn010" { vtc("") } -test "rn011" { vtc("") } -test "rn012" { vtc("") } -test "rn013" { vtc("") } -test "rn017" { vtc("") } -test "rn019" { vtc("") } -test "rn020" { vtc("") } -test "rn022" { vtc("") } -test "rn023" { vtc("") } -test "rn024" { vtc("") } -test "rn025" { vtc("") } -test "rn026" { vtc("") } -test "rn027" { vtc("") } -test "rn028" { vtc("") } -test "rn029" { vtc("") } -test "rn031" { vtc("") } -test "rn032" { vtc("") } -test "rn033" { vtc("") } -test "rn034" { vtc("") } -test "rn035" { vtc("") } -test "rn036" { vtc("") } +test('rn003', normal, compile, ['']) +test('rn005', normal, compile, ['']) +test('rn006', normal, compile, ['']) +test('rn009', normal, compile, ['']) +test('rn010', normal, compile, ['']) +test('rn011', normal, compile, ['']) +test('rn012', normal, compile, ['']) +test('rn013', normal, compile, ['']) +test('rn017', normal, compile, ['']) +test('rn019', normal, compile, ['']) +test('rn020', normal, compile, ['']) +test('rn022', normal, compile, ['']) +test('rn023', normal, compile, ['']) +test('rn024', normal, compile, ['']) +test('rn025', normal, compile, ['']) +test('rn026', normal, compile, ['']) +test('rn027', normal, compile, ['']) +test('rn028', normal, compile, ['']) +test('rn029', normal, compile, ['']) +test('rn031', normal, compile, ['']) +test('rn032', normal, compile, ['']) +test('rn033', normal, compile, ['']) +test('rn034', normal, compile, ['']) +test('rn035', normal, compile, ['']) +test('rn036', normal, compile, ['']) --- really a mulit-module test: -test "Rn037Help" { vtc("") } -test "rn037" { vtc("") } +# really a mulit-module test: +test('Rn037Help', normal, compile, ['']) +test('rn037', normal, compile, ['']) -test "rn039" { vtc("") } -test "rn040" { $expect = "fail" vtc("") } +test('rn039', normal, compile, ['']) +test('rn040', expect_fail, compile, ['']) -test "timing001" { vtc("") } -test "timing002" { vtc("") } -test "timing003" { vtc("") } +test('timing001', normal, compile, ['']) +test('timing002', normal, compile, ['']) +test('timing003', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/rename/should_fail/all.T b/testsuite/tests/ghc-regress/rename/should_fail/all.T index ae766953a0..c2046a14ea 100644 --- a/testsuite/tests/ghc-regress/rename/should_fail/all.T +++ b/testsuite/tests/ghc-regress/rename/should_fail/all.T @@ -1,44 +1,40 @@ -include ($confdir ++ "/../vanilla-test.T") +test('rnfail001', normal, compile_fail, ['']) +test('rnfail002', normal, compile_fail, ['']) +test('rnfail003', normal, compile_fail, ['']) +test('rnfail004', normal, compile_fail, ['']) +test('rnfail007', normal, compile_fail, ['']) +test('rnfail008', normal, compile_fail, ['']) +test('rnfail009', normal, compile_fail, ['']) +test('rnfail010', normal, compile_fail, ['']) +test('rnfail011', normal, compile_fail, ['']) +test('rnfail012', normal, compile_fail, ['']) +test('rnfail013', normal, compile_fail, ['']) +test('rnfail014', normal, compile_fail, ['']) +test('rnfail015', normal, compile_fail, ['']) +test('rnfail016', normal, compile_fail, ['']) +test('rnfail017', normal, compile_fail, ['']) +test('rnfail018', normal, compile_fail, ['']) +test('rnfail019', normal, compile_fail, ['']) +test('rnfail020', normal, compile_fail, ['']) +test('rnfail021', normal, compile_fail, ['']) +test('rnfail022', normal, compile_fail, ['']) +test('rnfail023', normal, compile_fail, ['']) +test('rnfail024', normal, compile_fail, ['']) +test('rnfail025', normal, compile_fail, ['']) +test('rnfail026', normal, compile_fail, ['']) +test('rnfail027', normal, compile_fail, ['']) +test('rnfail028', normal, compile_fail, ['']) +test('rnfail029', normal, compile_fail, ['']) +test('rnfail030', normal, compile_fail, ['']) +test('rnfail031', normal, compile_fail, ['']) +test('rnfail032', normal, compile_fail, ['']) +test('rnfail033', normal, compile_fail, ['']) +test('rnfail034', expect_fail, compile_fail, ['']) +test('rnfail035', normal, compile_fail, ['']) --- Args to vtcf are: extra compile flags +# these two are really a single multi-module test +test('Rn037Help', normal, compile, ['']) +test('rnfail037', normal, compile_fail, ['']) -test "rnfail001" { vtcf("") } -test "rnfail002" { vtcf("") } -test "rnfail003" { vtcf("") } -test "rnfail004" { vtcf("") } -test "rnfail007" { vtcf("") } -test "rnfail008" { vtcf("") } -test "rnfail009" { vtcf("") } -test "rnfail010" { vtcf("") } -test "rnfail011" { vtcf("") } -test "rnfail012" { vtcf("") } -test "rnfail013" { vtcf("") } -test "rnfail014" { vtcf("") } -test "rnfail015" { vtcf("") } -test "rnfail016" { vtcf("") } -test "rnfail017" { vtcf("") } -test "rnfail018" { vtcf("") } -test "rnfail019" { vtcf("") } -test "rnfail020" { vtcf("") } -test "rnfail021" { vtcf("") } -test "rnfail022" { vtcf("") } -test "rnfail023" { vtcf("") } -test "rnfail024" { vtcf("") } -test "rnfail025" { vtcf("") } -test "rnfail026" { vtcf("") } -test "rnfail027" { vtcf("") } -test "rnfail028" { vtcf("") } -test "rnfail029" { vtcf("") } -test "rnfail030" { vtcf("") } -test "rnfail031" { vtcf("") } -test "rnfail032" { vtcf("") } -test "rnfail033" { vtcf("") } -test "rnfail034" { $expect = "fail" vtcf("") } -test "rnfail035" { vtcf("") } - --- these two are really a multi-module tests -test "Rn037Help" { vtc("") } -test "rnfail037" { vtcf("") } - -test "rnfail038" { vtcf("") } +test('rnfail038', normal, compile_fail, ['']) diff --git a/testsuite/tests/ghc-regress/rename/should_fail/rnfail019.stderr b/testsuite/tests/ghc-regress/rename/should_fail/rnfail019.stderr index e2305c377b..f47d3577c6 100644 --- a/testsuite/tests/ghc-regress/rename/should_fail/rnfail019.stderr +++ b/testsuite/tests/ghc-regress/rename/should_fail/rnfail019.stderr @@ -2,4 +2,4 @@ rnfail019.hs:5: The operator `:' [infixr 5] of a section must have lower precedence than the operand `(:)' [infixr 5] - In the section: `((x : y) :)' + in the section: `((x : y) :)' diff --git a/testsuite/tests/ghc-regress/rename/should_fail/rnfail021.stderr b/testsuite/tests/ghc-regress/rename/should_fail/rnfail021.stderr index 76a236f690..929295bc02 100644 --- a/testsuite/tests/ghc-regress/rename/should_fail/rnfail021.stderr +++ b/testsuite/tests/ghc-regress/rename/should_fail/rnfail021.stderr @@ -1,3 +1,4 @@ rnfail021.hs:5: - Invalid use of qualified name `Baz.f' in its declaration + Invalid use of qualified name `Baz.f' + In its declaration diff --git a/testsuite/tests/ghc-regress/simplCore/Makefile b/testsuite/tests/ghc-regress/simplCore/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/simplCore/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/simplCore/should_compile/all.T b/testsuite/tests/ghc-regress/simplCore/should_compile/all.T index 06578930da..5978467634 100644 --- a/testsuite/tests/ghc-regress/simplCore/should_compile/all.T +++ b/testsuite/tests/ghc-regress/simplCore/should_compile/all.T @@ -1,21 +1,16 @@ +test('simpl001', normal, compile, ['']) +test('simpl002', normal, compile, ['']) +test('simpl003', normal, compile, ['']) +test('simpl004', normal, compile, ['-package lang']) +test('simpl005', normal, compile, ['']) -include ($confdir ++ "/../vanilla-test.T") +# these two are really a multi-module test +test('Simpl006Help', normal, compile, ['']) +test('simpl006', normal, compile, ['-package concurrent']) --- Args to vtc are: extra compile flags +test('simpl007', normal, compile, ['']) +test('simpl008', normal, compile, ['-fglasgow-exts']) -test "simpl001" { vtc("") } -test "simpl002" { vtc("") } -test "simpl003" { vtc("") } -test "simpl004" { vtc("-package lang") } -test "simpl005" { vtc("") } - --- these two are really a multi-module test -test "Simpl006Help" { vtc("-O") } -test "simpl006" { vtc("-package concurrent") } - -test "simpl007" { vtc("") } -test "simpl008" { vtc("-fglasgow-exts") } - --- these two are really a multi-module test -test "Simpl009Help" { vtc("-O") } -test "simpl009" { vtc("-O") } +# these two are really a multi-module test +test('Simpl009Help', normal, compile, ['']) +test('simpl009', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/simplCore/should_run/all.T b/testsuite/tests/ghc-regress/simplCore/should_run/all.T index e51a7fdbad..90a8c0fbfd 100644 --- a/testsuite/tests/ghc-regress/simplCore/should_run/all.T +++ b/testsuite/tests/ghc-regress/simplCore/should_run/all.T @@ -1,9 +1,13 @@ +# Args to compile_and_run are: +# extra compile flags +# extra run flags +# expected process return value, if not zero -include ($confdir ++ "/../vanilla-test.T") +# Only compile with optimisation +def f( opts ): + opts.only_ways = ['opt'] --- Args to vt are: extra compile flags --- extra run flags --- expected process return value, if not zero +setTestOpts(f) -test "simplrun001" { vtr("-O", "", "") } -test "simplrun002" { vtr("-O", "", "") } +test('simplrun001', normal, compile_and_run, ['']) +test('simplrun002', normal, compile_and_run, ['']) diff --git a/testsuite/tests/ghc-regress/stranal/Makefile b/testsuite/tests/ghc-regress/stranal/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/ghc-regress/stranal/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/stranal/should_compile/all.T b/testsuite/tests/ghc-regress/stranal/should_compile/all.T index 2f712b7524..1a9218d7fc 100644 --- a/testsuite/tests/ghc-regress/stranal/should_compile/all.T +++ b/testsuite/tests/ghc-regress/stranal/should_compile/all.T @@ -1,25 +1,19 @@ +# Only compile with optimisation +def f( opts ): + opts.only_ways = ['opt'] -include ($confdir ++ "/../vanilla-test.T") +setTestOpts(f) --- Args to vtc are: extra compile flags - --- Use this itsy helper fn to pass in an extra flag -def myvtc($extra_comp_args) -{ - vtc(" -O " ++ $extra_comp_args) -} - - -test "default" { myvtc("") } -test "fact" { myvtc("") } -test "fun" { myvtc("") } -test "goo" { myvtc("") } -test "ins" { myvtc("") } -test "map" { myvtc("") } -test "sim" { myvtc("") } -test "str001" { myvtc("") } -test "str002" { myvtc("") } -test "syn" { myvtc("") } -test "test" { myvtc("") } -test "tst" { myvtc("") } -test "unu" { myvtc("") } +test('default', normal, compile, ['']) +test('fact', normal, compile, ['']) +test('fun', normal, compile, ['']) +test('goo', normal, compile, ['']) +test('ins', normal, compile, ['']) +test('map', normal, compile, ['']) +test('sim', normal, compile, ['']) +test('str001', normal, compile, ['']) +test('str002', normal, compile, ['']) +test('syn', normal, compile, ['']) +test('test', normal, compile, ['']) +test('tst', normal, compile, ['']) +test('unu', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/typecheck/prog001/test.T b/testsuite/tests/ghc-regress/typecheck/prog001/test.T index 2e62455624..9032686cc7 100644 --- a/testsuite/tests/ghc-regress/typecheck/prog001/test.T +++ b/testsuite/tests/ghc-regress/typecheck/prog001/test.T @@ -1,5 +1,3 @@ -include ($confdir ++ "/../multimod-test.T") - -test "typecheck.prog001" { mtc("C", "-fglasgow-exts") } - +test('typecheck.prog001', normal, multimod_compile, \ + ['C', '-v0 -fglasgow-exts']) diff --git a/testsuite/tests/ghc-regress/typecheck/should_compile/all.T b/testsuite/tests/ghc-regress/typecheck/should_compile/all.T index b5d904e039..d2d619b08b 100644 --- a/testsuite/tests/ghc-regress/typecheck/should_compile/all.T +++ b/testsuite/tests/ghc-regress/typecheck/should_compile/all.T @@ -1,164 +1,160 @@ +# Args to vtc are: extra compile flags -include ($confdir ++ "/../vanilla-test.T") +def f( opts ): + opts.extra_hc_opts = '-fno-warn-incomplete-patterns' --- Args to vtc are: extra compile flags +setTestOpts(f) --- Use this itsy helper fn to pass in an extra flag -def myvtc($extra_comp_args) -{ - vtc(" -fno-warn-incomplete-patterns " ++ $extra_comp_args) -} - -test "tc001" { myvtc("") } -test "tc002" { myvtc("") } -test "tc003" { myvtc("") } -test "tc004" { myvtc("") } -test "tc005" { myvtc("") } -test "tc006" { myvtc("") } -test "tc007" { myvtc("") } -test "tc008" { myvtc("") } -test "tc009" { myvtc("") } -test "tc010" { myvtc("") } -test "tc011" { myvtc("") } -test "tc012" { myvtc("") } -test "tc013" { myvtc("") } -test "tc014" { myvtc("") } -test "tc015" { myvtc("") } -test "tc016" { myvtc("") } -test "tc017" { myvtc("") } -test "tc018" { myvtc("") } -test "tc019" { myvtc("-fglasgow-exts") } -test "tc020" { myvtc("") } -test "tc021" { myvtc("") } -test "tc022" { myvtc("") } -test "tc023" { myvtc("") } -test "tc024" { myvtc("") } -test "tc025" { myvtc("") } -test "tc026" { myvtc("") } -test "tc027" { myvtc("") } -test "tc028" { myvtc("") } -test "tc029" { myvtc("") } -test "tc030" { myvtc("") } -test "tc031" { myvtc("") } -test "tc032" { myvtc("") } -test "tc033" { myvtc("") } -test "tc034" { myvtc("") } -test "tc035" { myvtc("") } -test "tc036" { myvtc("") } -test "tc037" { myvtc("") } -test "tc038" { myvtc("") } -test "tc039" { myvtc("") } -test "tc040" { myvtc("") } -test "tc041" { myvtc("") } -test "tc042" { myvtc("") } -test "tc043" { myvtc("") } -test "tc044" { myvtc("") } -test "tc045" { myvtc("") } -test "tc046" { myvtc("") } -test "tc047" { myvtc("") } -test "tc048" { myvtc("") } -test "tc049" { myvtc("") } -test "tc050" { myvtc("") } -test "tc051" { myvtc("") } -test "tc052" { myvtc("") } -test "tc053" { myvtc("") } -test "tc054" { myvtc("") } -test "tc055" { myvtc("") } -test "tc056" { myvtc("") } -test "tc057" { myvtc("") } -test "tc058" { myvtc("") } -test "tc059" { myvtc("") } -test "tc060" { myvtc("") } -test "tc061" { myvtc("") } -test "tc062" { myvtc("") } -test "tc063" { myvtc("") } -test "tc064" { myvtc("") } -test "tc065" { myvtc("-package lang -package data") } -test "tc066" { myvtc("") } -test "tc067" { myvtc("") } -test "tc068" { myvtc("") } -test "tc069" { myvtc("") } -test "tc070" { myvtc("") } -test "tc073" { myvtc("") } -test "tc074" { myvtc("") } -test "tc076" { myvtc("") } -test "tc077" { myvtc("") } -test "tc078" { myvtc("") } -test "tc079" { myvtc("") } -test "tc080" { myvtc("") } -test "tc081" { myvtc("") } -test "tc082" { myvtc("") } -test "tc084" { myvtc("") } -test "tc085" { myvtc("-package lang") } -test "tc086" { myvtc("") } -test "tc087" { myvtc("-fglasgow-exts") } -test "tc088" { myvtc("-package lang") } -test "tc089" { myvtc("") } -test "tc090" { myvtc("") } -test "tc091" { myvtc("") } -test "tc092" { myvtc("") } -test "tc093" { myvtc("") } -test "tc094" { myvtc("") } -test "tc095" { myvtc("") } -test "tc096" { myvtc("") } -test "tc097" { myvtc("-fglasgow-exts") } -test "tc098" { myvtc("") } -test "tc099" { myvtc("") } -test "tc100" { myvtc("-O") } -test "tc101" { myvtc("") } -test "tc102" { myvtc("") } -test "tc103" { myvtc("") } -test "tc104" { myvtc("") } -test "tc105" { myvtc("") } -test "tc106" { myvtc("") } -test "tc107" { myvtc("") } -test "tc108" { myvtc("-fglasgow-exts") } -test "tc109" { myvtc("") } -test "tc111" { myvtc("") } -test "tc112" { myvtc("") } -test "tc113" { myvtc("") } -test "tc114" { myvtc("") } -test "tc115" { myvtc("") } -test "tc116" { myvtc("") } -test "tc117" { myvtc("") } -test "tc118" { myvtc("") } -test "tc119" { myvtc("") } -test "tc120" { myvtc("") } -test "tc121" { myvtc("") } -test "tc122" { myvtc("") } -test "tc123" { myvtc("") } -test "tc124" { myvtc("") } -test "tc125" { myvtc("") } -test "tc126" { myvtc("") } -test "tc127" { myvtc("") } -test "tc128" { myvtc("") } -test "tc129" { myvtc("") } -test "tc130" { myvtc("") } -test "tc131" { myvtc("") } -test "tc132" { myvtc("-package lang") } -test "tc133" { myvtc("") } -test "tc134" { myvtc("") } -test "tc135" { myvtc("") } -test "tc136" { myvtc("") } -test "tc137" { myvtc("") } -test "tc140" { myvtc("") } -test "tc141" { myvtc("") } -test "tc142" { myvtc("") } -test "tc143" { myvtc("") } -test "tc144" { myvtc("") } -test "tc145" { myvtc("") } -test "tc146" { myvtc("") } -test "tc147" { myvtc("") } -test "tc148" { myvtc("") } -test "tc149" { myvtc("") } -test "tc150" { myvtc("") } -test "tc151" { myvtc("") } -test "tc152" { myvtc("") } -test "tc153" { myvtc("") } -test "tc154" { myvtc("") } -test "tc155" { myvtc("") } -test "tc156" { myvtc("") } -test "tc157" { myvtc("") } -test "tc158" { myvtc("") } -test "tc159" { myvtc("") } -test "tc160" { myvtc("") } +test('tc001', normal, compile, ['']) +test('tc002', normal, compile, ['']) +test('tc003', normal, compile, ['']) +test('tc004', normal, compile, ['']) +test('tc005', normal, compile, ['']) +test('tc006', normal, compile, ['']) +test('tc007', normal, compile, ['']) +test('tc008', normal, compile, ['']) +test('tc009', normal, compile, ['']) +test('tc010', normal, compile, ['']) +test('tc011', normal, compile, ['']) +test('tc012', normal, compile, ['']) +test('tc013', normal, compile, ['']) +test('tc014', normal, compile, ['']) +test('tc015', normal, compile, ['']) +test('tc016', normal, compile, ['']) +test('tc017', normal, compile, ['']) +test('tc018', normal, compile, ['']) +test('tc019', normal, compile, ['-fglasgow-exts']) +test('tc020', normal, compile, ['']) +test('tc021', normal, compile, ['']) +test('tc022', normal, compile, ['']) +test('tc023', normal, compile, ['']) +test('tc024', normal, compile, ['']) +test('tc025', normal, compile, ['']) +test('tc026', normal, compile, ['']) +test('tc027', normal, compile, ['']) +test('tc028', normal, compile, ['']) +test('tc029', normal, compile, ['']) +test('tc030', normal, compile, ['']) +test('tc031', normal, compile, ['']) +test('tc032', normal, compile, ['']) +test('tc033', normal, compile, ['']) +test('tc034', normal, compile, ['']) +test('tc035', normal, compile, ['']) +test('tc036', normal, compile, ['']) +test('tc037', normal, compile, ['']) +test('tc038', normal, compile, ['']) +test('tc039', normal, compile, ['']) +test('tc040', normal, compile, ['']) +test('tc041', normal, compile, ['']) +test('tc042', normal, compile, ['']) +test('tc043', normal, compile, ['']) +test('tc044', normal, compile, ['']) +test('tc045', normal, compile, ['']) +test('tc046', normal, compile, ['']) +test('tc047', normal, compile, ['']) +test('tc048', normal, compile, ['']) +test('tc049', normal, compile, ['']) +test('tc050', normal, compile, ['']) +test('tc051', normal, compile, ['']) +test('tc052', normal, compile, ['']) +test('tc053', normal, compile, ['']) +test('tc054', normal, compile, ['']) +test('tc055', normal, compile, ['']) +test('tc056', normal, compile, ['']) +test('tc057', normal, compile, ['']) +test('tc058', normal, compile, ['']) +test('tc059', normal, compile, ['']) +test('tc060', normal, compile, ['']) +test('tc061', normal, compile, ['']) +test('tc062', normal, compile, ['']) +test('tc063', normal, compile, ['']) +test('tc064', normal, compile, ['']) +test('tc065', normal, compile, ['-package lang -package data']) +test('tc066', normal, compile, ['']) +test('tc067', normal, compile, ['']) +test('tc068', normal, compile, ['']) +test('tc069', normal, compile, ['']) +test('tc070', normal, compile, ['']) +test('tc073', normal, compile, ['']) +test('tc074', normal, compile, ['']) +test('tc076', normal, compile, ['']) +test('tc077', normal, compile, ['']) +test('tc078', normal, compile, ['']) +test('tc079', normal, compile, ['']) +test('tc080', normal, compile, ['']) +test('tc081', normal, compile, ['']) +test('tc082', normal, compile, ['']) +test('tc084', normal, compile, ['']) +test('tc085', normal, compile, ['-package lang']) +test('tc086', normal, compile, ['']) +test('tc087', normal, compile, ['-fglasgow-exts']) +test('tc088', normal, compile, ['-package lang']) +test('tc089', normal, compile, ['']) +test('tc090', normal, compile, ['']) +test('tc091', normal, compile, ['']) +test('tc092', normal, compile, ['']) +test('tc093', normal, compile, ['']) +test('tc094', normal, compile, ['']) +test('tc095', normal, compile, ['']) +test('tc096', normal, compile, ['']) +test('tc097', normal, compile, ['-fglasgow-exts']) +test('tc098', normal, compile, ['']) +test('tc099', normal, compile, ['']) +test('tc100', normal, compile, ['']) +test('tc101', normal, compile, ['']) +test('tc102', normal, compile, ['']) +test('tc103', normal, compile, ['']) +test('tc104', normal, compile, ['']) +test('tc105', normal, compile, ['']) +test('tc106', normal, compile, ['']) +test('tc107', normal, compile, ['']) +test('tc108', normal, compile, ['-fglasgow-exts']) +test('tc109', normal, compile, ['']) +test('tc111', normal, compile, ['']) +test('tc112', normal, compile, ['']) +test('tc113', normal, compile, ['']) +test('tc114', normal, compile, ['']) +test('tc115', normal, compile, ['']) +test('tc116', normal, compile, ['']) +test('tc117', normal, compile, ['']) +test('tc118', normal, compile, ['']) +test('tc119', normal, compile, ['']) +test('tc120', normal, compile, ['']) +test('tc121', normal, compile, ['']) +test('tc122', normal, compile, ['']) +test('tc123', normal, compile, ['']) +test('tc124', normal, compile, ['']) +test('tc125', normal, compile, ['']) +test('tc126', normal, compile, ['']) +test('tc127', normal, compile, ['']) +test('tc128', normal, compile, ['']) +test('tc129', normal, compile, ['']) +test('tc130', normal, compile, ['']) +test('tc131', normal, compile, ['']) +test('tc132', normal, compile, ['-package lang']) +test('tc133', normal, compile, ['']) +test('tc134', normal, compile, ['']) +test('tc135', normal, compile, ['']) +test('tc136', normal, compile, ['']) +test('tc137', normal, compile, ['']) +test('tc140', normal, compile, ['']) +test('tc141', normal, compile, ['']) +test('tc142', normal, compile, ['']) +test('tc143', normal, compile, ['']) +test('tc144', normal, compile, ['']) +test('tc145', normal, compile, ['']) +test('tc146', normal, compile, ['']) +test('tc147', normal, compile, ['']) +test('tc148', normal, compile, ['']) +test('tc149', normal, compile, ['']) +test('tc150', normal, compile, ['']) +test('tc151', normal, compile, ['']) +test('tc152', normal, compile, ['']) +test('tc153', normal, compile, ['']) +test('tc154', normal, compile, ['']) +test('tc155', normal, compile, ['']) +test('tc156', normal, compile, ['']) +test('tc157', normal, compile, ['']) +test('tc158', normal, compile, ['']) +test('tc159', normal, compile, ['']) +test('tc160', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/typecheck/should_fail/all.T b/testsuite/tests/ghc-regress/typecheck/should_fail/all.T index ebd2ae8d3a..5a8603179a 100644 --- a/testsuite/tests/ghc-regress/typecheck/should_fail/all.T +++ b/testsuite/tests/ghc-regress/typecheck/should_fail/all.T @@ -1,108 +1,101 @@ -include ($confdir ++ "/../vanilla-test.T") +test('tcfail001', normal, compile_fail, ['']) +test('tcfail002', normal, compile_fail, ['']) +test('tcfail003', normal, compile_fail, ['']) +test('tcfail004', normal, compile_fail, ['']) +test('tcfail005', normal, compile_fail, ['']) +test('tcfail006', normal, compile_fail, ['']) +test('tcfail007', normal, compile_fail, ['']) +test('tcfail008', normal, compile_fail, ['']) +test('tcfail009', normal, compile_fail, ['']) +test('tcfail010', normal, compile_fail, ['']) +test('tcfail011', normal, compile_fail, ['']) +test('tcfail012', normal, compile_fail, ['']) +test('tcfail013', normal, compile_fail, ['']) +test('tcfail014', normal, compile_fail, ['']) +test('tcfail015', normal, compile_fail, ['']) +test('tcfail016', normal, compile_fail, ['']) +test('tcfail017', normal, compile_fail, ['']) +test('tcfail018', normal, compile_fail, ['']) +test('tcfail019', normal, compile_fail, ['']) +test('tcfail020', normal, compile_fail, ['']) +test('tcfail021', normal, compile_fail, ['']) +test('tcfail023', normal, compile_fail, ['']) +test('tcfail027', normal, compile_fail, ['']) +test('tcfail028', normal, compile_fail, ['']) +test('tcfail029', normal, compile_fail, ['']) +test('tcfail030', normal, compile_fail, ['']) +test('tcfail031', normal, compile_fail, ['']) +test('tcfail032', normal, compile_fail, ['']) +test('tcfail033', normal, compile_fail, ['']) +test('tcfail034', normal, compile_fail, ['']) +test('tcfail035', normal, compile_fail, ['']) +test('tcfail036', normal, compile_fail, ['']) +test('tcfail037', normal, compile_fail, ['']) +test('tcfail038', normal, compile_fail, ['']) +test('tcfail040', normal, compile_fail, ['']) +test('tcfail042', normal, compile_fail, ['']) +test('tcfail043', normal, compile_fail, ['']) +test('tcfail044', normal, compile_fail, ['']) +test('tcfail045', normal, compile_fail, ['-fglasgow-exts -package lang']) +test('tcfail046', normal, compile_fail, ['']) +test('tcfail047', normal, compile_fail, ['']) +test('tcfail048', normal, compile_fail, ['']) +test('tcfail049', normal, compile_fail, ['']) +test('tcfail050', normal, compile_fail, ['']) +test('tcfail051', normal, compile_fail, ['']) +test('tcfail052', normal, compile_fail, ['']) +test('tcfail053', normal, compile_fail, ['']) +test('tcfail054', normal, compile_fail, ['']) +test('tcfail055', normal, compile_fail, ['']) +test('tcfail056', normal, compile_fail, ['']) +test('tcfail057', normal, compile_fail, ['']) +test('tcfail058', normal, compile_fail, ['']) +test('tcfail061', normal, compile_fail, ['']) +test('tcfail062', normal, compile_fail, ['']) +test('tcfail063', normal, compile_fail, ['']) +test('tcfail065', normal, compile_fail, ['']) +test('tcfail067', normal, compile_fail, ['']) +test('tcfail068', normal, compile_fail, ['-fglasgow-exts -package lang']) +test('tcfail069', normal, compile_fail, ['']) +test('tcfail070', normal, compile_fail, ['']) +test('tcfail071', normal, compile_fail, ['']) +test('tcfail072', normal, compile_fail, ['']) +test('tcfail073', normal, compile_fail, ['']) +test('tcfail075', normal, compile_fail, ['']) +test('tcfail076', normal, compile_fail, ['']) +test('tcfail077', normal, compile_fail, ['']) +test('tcfail078', normal, compile_fail, ['']) +test('tcfail079', normal, compile_fail, ['']) +test('tcfail080', expect_fail, compile_fail, ['-fglasgow-exts -package lang']) +test('tcfail082', normal, compile_fail, ['']) +test('tcfail083', normal, compile_fail, ['']) +test('tcfail084', normal, compile_fail, ['']) +test('tcfail085', normal, compile_fail, ['']) +test('tcfail086', normal, compile_fail, ['']) +test('tcfail087', normal, compile_fail, ['']) +test('tcfail088', normal, compile_fail, ['']) +test('tcfail089', normal, compile_fail, ['']) +test('tcfail090', normal, compile_fail, ['']) +test('tcfail091', normal, compile_fail, ['']) +test('tcfail092', normal, compile_fail, ['']) +test('tcfail093', normal, compile_fail, ['']) +test('tcfail094', normal, compile_fail, ['']) +test('tcfail095', normal, compile_fail, ['']) +test('tcfail096', normal, compile_fail, ['']) +test('tcfail097', normal, compile_fail, ['']) --- Args to vtcf are: extra compile flags +# The compiler should reject tc098, but it doesn't. Hence +# this is an expected failure. +test('tcfail098', expect_fail, compile_fail, ['']) -test "tcfail001" { vtcf("") } -test "tcfail002" { vtcf("") } -test "tcfail003" { vtcf("") } -test "tcfail004" { vtcf("") } -test "tcfail005" { vtcf("") } -test "tcfail006" { vtcf("") } -test "tcfail007" { vtcf("") } -test "tcfail008" { vtcf("") } -test "tcfail009" { vtcf("") } -test "tcfail010" { vtcf("") } -test "tcfail011" { vtcf("") } -test "tcfail012" { vtcf("") } -test "tcfail013" { vtcf("") } -test "tcfail014" { vtcf("") } -test "tcfail015" { vtcf("") } -test "tcfail016" { vtcf("") } -test "tcfail017" { vtcf("") } -test "tcfail018" { vtcf("") } -test "tcfail019" { vtcf("") } -test "tcfail020" { vtcf("") } -test "tcfail021" { vtcf("") } -test "tcfail023" { vtcf("") } -test "tcfail027" { vtcf("") } -test "tcfail028" { vtcf("") } -test "tcfail029" { vtcf("") } -test "tcfail030" { vtcf("") } -test "tcfail031" { vtcf("") } -test "tcfail032" { vtcf("") } -test "tcfail033" { vtcf("") } -test "tcfail034" { vtcf("") } -test "tcfail035" { vtcf("") } -test "tcfail036" { vtcf("") } -test "tcfail037" { vtcf("") } -test "tcfail038" { vtcf("") } -test "tcfail040" { vtcf("") } -test "tcfail042" { vtcf("") } -test "tcfail043" { vtcf("") } -test "tcfail044" { vtcf("") } -test "tcfail045" { vtcf("-fglasgow-exts -package lang") } -test "tcfail046" { vtcf("") } -test "tcfail047" { vtcf("") } -test "tcfail048" { vtcf("") } -test "tcfail049" { vtcf("") } -test "tcfail050" { vtcf("") } -test "tcfail051" { vtcf("") } -test "tcfail052" { vtcf("") } -test "tcfail053" { vtcf("") } -test "tcfail054" { vtcf("") } -test "tcfail055" { vtcf("") } -test "tcfail056" { vtcf("") } -test "tcfail057" { vtcf("") } -test "tcfail058" { vtcf("") } -test "tcfail061" { vtcf("") } -test "tcfail062" { vtcf("") } -test "tcfail063" { vtcf("") } -test "tcfail065" { vtcf("") } -test "tcfail067" { vtcf("") } -test "tcfail068" { vtcf("-fglasgow-exts -package lang") } -test "tcfail069" { vtcf("") } -test "tcfail070" { vtcf("") } -test "tcfail071" { vtcf("") } -test "tcfail072" { vtcf("") } -test "tcfail073" { vtcf("") } -test "tcfail075" { vtcf("") } -test "tcfail076" { vtcf("") } -test "tcfail077" { vtcf("") } -test "tcfail078" { vtcf("") } -test "tcfail079" { vtcf("") } -test "tcfail080" { $expect = "fail" - vtcf("-fglasgow-exts -package lang") } -test "tcfail082" { vtcf("") } -test "tcfail083" { vtcf("") } -test "tcfail084" { vtcf("") } -test "tcfail085" { vtcf("") } -test "tcfail086" { vtcf("") } -test "tcfail087" { vtcf("") } -test "tcfail088" { vtcf("") } -test "tcfail089" { vtcf("-O") } -test "tcfail090" { vtcf("") } -test "tcfail091" { vtcf("") } -test "tcfail092" { vtcf("") } -test "tcfail093" { vtcf("") } -test "tcfail094" { vtcf("") } -test "tcfail095" { vtcf("") } -test "tcfail096" { vtcf("") } -test "tcfail097" { vtcf("") } - --- The compiler should reject tc098, but it doesn't. Hence --- this is an expected failure. -test "tcfail098" { $expect = "fail" - vtcf("") } - -test "tcfail099" { vtcf("") } - -test "tcfail100" { vtcf("") } -test "tcfail101" { vtcf("") } -test "tcfail102" { vtcf("") } -test "tcfail103" { vtcf("") } -test "tcfail104" { vtcf("") } -test "tcfail105" { vtcf("") } -test "tcfail106" { vtcf("") } -test "tcfail107" { vtcf("") } -test "tcfail108" { vtcf("") } +test('tcfail099', normal, compile_fail, ['']) +test('tcfail100', normal, compile_fail, ['']) +test('tcfail101', normal, compile_fail, ['']) +test('tcfail102', normal, compile_fail, ['']) +test('tcfail103', normal, compile_fail, ['']) +test('tcfail104', normal, compile_fail, ['']) +test('tcfail105', normal, compile_fail, ['']) +test('tcfail106', normal, compile_fail, ['']) +test('tcfail107', normal, compile_fail, ['']) +test('tcfail108', normal, compile_fail, ['']) diff --git a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail004.stderr b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail004.stderr index 5325da03db..465abaa67a 100644 --- a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail004.stderr +++ b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail004.stderr @@ -3,4 +3,4 @@ tcfail004.hs:3: Couldn't match `(t, t1)' against `(t2, t3, t4)' Expected type: (t, t1) Inferred type: (t2, t3, t4) - in a pattern binding: (1, 2, 3) + In a pattern binding: (1, 2, 3) diff --git a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail038.stderr b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail038.stderr index d16461ee67..8c7e05e977 100644 --- a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail038.stderr +++ b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail038.stderr @@ -1,8 +1,8 @@ tcfail038.hs:9: Conflicting definitions for `==' - in the bindings in an instance declaration + In the bindings in an instance declaration tcfail038.hs:10: Conflicting definitions for `/=' - in the bindings in an instance declaration + In the bindings in an instance declaration diff --git a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail043.stderr b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail043.stderr index 3dd8884368..f2a6332590 100644 --- a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail043.stderr +++ b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail043.stderr @@ -3,7 +3,7 @@ tcfail043.hs:38: Ambiguous type variable(s) `a' in the constraint `Ord_ a' arising from use of `gt' at tcfail043.hs:38 In the predicate expression: gt (hd bs) a - in a lambda abstraction: + In a lambda abstraction: if gt (hd bs) a then False else diff --git a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail044.stderr b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail044.stderr index f7687ffcc4..8b68d12b36 100644 --- a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail044.stderr +++ b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail044.stderr @@ -1,12 +1,12 @@ -./tcfail044.hs:5: +tcfail044.hs:5: Illegal instance declaration for `Eq (a -> a)' - (the instance type must be of form (T a b c) + (The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables) In the instance declaration for `Eq (a -> a)' -./tcfail044.hs:8: +tcfail044.hs:8: Illegal instance declaration for `Num (a -> a)' - (the instance type must be of form (T a b c) + (The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables) In the instance declaration for `Num (a -> a)' diff --git a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail047.stderr b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail047.stderr index a82ce5676a..cc32a6d6ce 100644 --- a/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail047.stderr +++ b/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail047.stderr @@ -1,6 +1,6 @@ -./tcfail047.hs:6: +tcfail047.hs:6: Illegal instance declaration for `A (a, (b, c))' - (the instance type must be of form (T a b c) + (The instance type must be of form (T a b c) where T is not a synonym, and a,b,c are distinct type variables) In the instance declaration for `A (a, (b, c))' diff --git a/testsuite/tests/ghc-regress/typecheck/should_run/all.T b/testsuite/tests/ghc-regress/typecheck/should_run/all.T index 7e27860891..36a3db21d5 100644 --- a/testsuite/tests/ghc-regress/typecheck/should_run/all.T +++ b/testsuite/tests/ghc-regress/typecheck/should_run/all.T @@ -1,28 +1,26 @@ +# Args to compile_and_run are: +# extra compile flags +# extra run flags +# expected process return value, if not zero -include ($confdir ++ "/../vanilla-test.T") - --- Args to vt are: extra compile flags --- extra run flags --- expected process return value, if not zero - -test "tcrun001" { vtr("", "", "") } -test "tcrun002" { vtr("", "", "") } -test "tcrun003" { vtr("-fglasgow-exts", "", "") } -test "tcrun004" { vtr("-fglasgow-exts", "", "") } -test "tcrun005" { vtr("", "", "") } -test "tcrun006" { vtr("", "", "") } -test "tcrun007" { vtr("", "", "") } -test "tcrun008" { vtr("", "", "") } -test "tcrun009" { vtr("", "", "") } -test "tcrun010" { vtr("", "", "") } -test "tcrun011" { vtr("", "", "") } -test "tcrun012" { vtr("", "", "") } -test "tcrun013" { vtr("", "", "") } -test "tcrun014" { vtr("", "", "") } -test "tcrun015" { vtr("-O", "", "") } -test "tcrun016" { vtr("", "", "") } -test "tcrun017" { vtr("", "", "") } -test "tcrun018" { vtr("", "", "") } -test "tcrun019" { vtr("", "", "") } -test "tcrun020" { vtr("", "", "") } -test "tcrun021" { vtr("-package data", "", "") } +test('tcrun001', normal, compile_and_run, ['']) +test('tcrun002', normal, compile_and_run, ['']) +test('tcrun003', normal, compile_and_run, ['-fglasgow-exts']) +test('tcrun004', normal, compile_and_run, ['-fglasgow-exts']) +test('tcrun005', normal, compile_and_run, ['']) +test('tcrun006', normal, compile_and_run, ['']) +test('tcrun007', normal, compile_and_run, ['']) +test('tcrun008', normal, compile_and_run, ['']) +test('tcrun009', normal, compile_and_run, ['']) +test('tcrun010', normal, compile_and_run, ['']) +test('tcrun011', normal, compile_and_run, ['']) +test('tcrun012', normal, compile_and_run, ['']) +test('tcrun013', normal, compile_and_run, ['']) +test('tcrun014', normal, compile_and_run, ['']) +test('tcrun015', normal, compile_and_run, ['-O']) +test('tcrun016', normal, compile_and_run, ['']) +test('tcrun017', normal, compile_and_run, ['']) +test('tcrun018', normal, compile_and_run, ['']) +test('tcrun019', normal, compile_and_run, ['']) +test('tcrun020', normal, compile_and_run, ['']) +test('tcrun021', normal, compile_and_run, ['-package data']) diff --git a/testsuite/tests/ghc-regress/typecheck/should_run/tcrun022.hs b/testsuite/tests/ghc-regress/typecheck/should_run/tcrun022.hs deleted file mode 100644 index 0988220342..0000000000 --- a/testsuite/tests/ghc-regress/typecheck/should_run/tcrun022.hs +++ /dev/null @@ -1,19 +0,0 @@ --- Test the implementation of negative patterns. --- We should get a call to 'negate'. - -module Main where - -main = print (minusTwo,trueOrFalse) - -minusTwo = -2::N - -trueOrFalse = - case minusTwo of - -2 -> True - _ -> False - -data N = Negate N | FromInteger Integer deriving (Eq,Show) - -instance Num N where - negate = Negate - fromInteger = FromInteger diff --git a/testsuite/tests/ghc-regress/typecheck/should_run/tcrun022.stdout b/testsuite/tests/ghc-regress/typecheck/should_run/tcrun022.stdout deleted file mode 100644 index 1f0a31b942..0000000000 --- a/testsuite/tests/ghc-regress/typecheck/should_run/tcrun022.stdout +++ /dev/null @@ -1 +0,0 @@ -(Negate (FromInteger 2),True) |