add test for #7233
authorSimon Marlow <marlowsd@gmail.com>
Wed, 24 Oct 2012 16:06:19 +0000 (17:06 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 24 Oct 2012 16:06:19 +0000 (17:06 +0100)
testsuite/tests/numeric/should_run/T7233.hs [new file with mode: 0644]
testsuite/tests/numeric/should_run/T7233.stdout [new file with mode: 0644]
testsuite/tests/numeric/should_run/all.T

diff --git a/testsuite/tests/numeric/should_run/T7233.hs b/testsuite/tests/numeric/should_run/T7233.hs
new file mode 100644 (file)
index 0000000..5c0cee1
--- /dev/null
@@ -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/testsuite/tests/numeric/should_run/T7233.stdout b/testsuite/tests/numeric/should_run/T7233.stdout
new file mode 100644 (file)
index 0000000..24b71d8
--- /dev/null
@@ -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]
index 9244ac7..ff19507 100644 (file)
@@ -63,3 +63,5 @@ test('T7014',
      extra_clean(['T7014.simpl']),
      run_command,
      ['$MAKE -s --no-print-directory T7014'])
+
+test('T7233', normal, compile_and_run, [''])