Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/b58a676f3bb23ea3e9a8f41615260f91aa6f89ee

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

commit b58a676f3bb23ea3e9a8f41615260f91aa6f89ee
Author: Simon Marlow <marlo...@gmail.com>
Date:   Wed Oct 24 17:06:19 2012 +0100

    add test for #7233

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

 tests/numeric/should_run/T7233.hs     |   14 ++++++++++++++
 tests/numeric/should_run/T7233.stdout |   10 ++++++++++
 tests/numeric/should_run/all.T        |    2 ++
 3 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/tests/numeric/should_run/T7233.hs 
b/tests/numeric/should_run/T7233.hs
new file mode 100644
index 0000000..5c0cee1
--- /dev/null
+++ b/tests/numeric/should_run/T7233.hs
@@ -0,0 +1,14 @@
+import Data.Int
+import Data.Word
+
+main = do
+  print [5 `div` (minBound+k::Int)    | k <- [0 .. 10]]
+  print [5 `div` (minBound+k::Int8)   | k <- [0 .. 10]]
+  print [5 `div` (minBound+k::Int16)  | k <- [0 .. 10]]
+  print [5 `div` (minBound+k::Int32)  | k <- [0 .. 10]]
+  print [5 `div` (minBound+k::Int64)  | k <- [0 .. 10]]
+  print [5 `quot` (minBound+k::Int)    | k <- [0 .. 10]]
+  print [5 `quot` (minBound+k::Int8)   | k <- [0 .. 10]]
+  print [5 `quot` (minBound+k::Int16)  | k <- [0 .. 10]]
+  print [5 `quot` (minBound+k::Int32)  | k <- [0 .. 10]]
+  print [5 `quot` (minBound+k::Int64)  | k <- [0 .. 10]]
diff --git a/tests/numeric/should_run/T7233.stdout 
b/tests/numeric/should_run/T7233.stdout
new file mode 100644
index 0000000..24b71d8
--- /dev/null
+++ b/tests/numeric/should_run/T7233.stdout
@@ -0,0 +1,10 @@
+[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
+[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
+[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
+[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
+[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]
+[0,0,0,0,0,0,0,0,0,0,0]
+[0,0,0,0,0,0,0,0,0,0,0]
+[0,0,0,0,0,0,0,0,0,0,0]
+[0,0,0,0,0,0,0,0,0,0,0]
+[0,0,0,0,0,0,0,0,0,0,0]
diff --git a/tests/numeric/should_run/all.T b/tests/numeric/should_run/all.T
index 9244ac7..ff19507 100644
--- a/tests/numeric/should_run/all.T
+++ b/tests/numeric/should_run/all.T
@@ -63,3 +63,5 @@ test('T7014',
      extra_clean(['T7014.simpl']),
      run_command,
      ['$MAKE -s --no-print-directory T7014'])
+
+test('T7233', normal, compile_and_run, [''])



_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to