[commit: testsuite] master: Add test cases for T457 (5dd852a)

git at git.haskell.org git at git.haskell.org
Mon Aug 19 14:26:16 CEST 2013


Repository : ssh://git@git.haskell.org/testsuite

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5dd852a891bf2956933a2e901f8ff183b78bc1a8/testsuite

>---------------------------------------------------------------

commit 5dd852a891bf2956933a2e901f8ff183b78bc1a8
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Mon Aug 19 13:47:04 2013 +0200

    Add test cases for T457
    
    (fixes #457)


>---------------------------------------------------------------

5dd852a891bf2956933a2e901f8ff183b78bc1a8
 tests/simplCore/should_run/T457.hs     |    5 +++++
 tests/simplCore/should_run/T457.stderr |    1 +
 tests/simplCore/should_run/all.T       |    2 ++
 3 files changed, 8 insertions(+)

diff --git a/tests/simplCore/should_run/T457.hs b/tests/simplCore/should_run/T457.hs
new file mode 100644
index 0000000..8a1afe8
--- /dev/null
+++ b/tests/simplCore/should_run/T457.hs
@@ -0,0 +1,5 @@
+f x = case x of
+  x at True  -> \y -> x && y
+  x at False -> \y -> x && y
+
+main = putStrLn $ f (error "Correct") `seq` "Error"
diff --git a/tests/simplCore/should_run/T457.stderr b/tests/simplCore/should_run/T457.stderr
new file mode 100644
index 0000000..0a18be2
--- /dev/null
+++ b/tests/simplCore/should_run/T457.stderr
@@ -0,0 +1 @@
+T457: Correct
diff --git a/tests/simplCore/should_run/all.T b/tests/simplCore/should_run/all.T
index 32f78fa..c9be7a4 100644
--- a/tests/simplCore/should_run/all.T
+++ b/tests/simplCore/should_run/all.T
@@ -59,3 +59,5 @@ test('T5997', normal, compile_and_run, [''])
 test('T7101', normal, compile_and_run, [''])
 test('T7924', exit_code(1), compile_and_run, [''])
 
+# Run this test *without* optimisation too
+test('T457', [ only_ways(['normal','optasm']), exit_code(1) ], compile_and_run, [''])





More information about the ghc-commits mailing list