summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>2013-11-19 16:08:16 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2013-11-22 15:50:53 +0000
commite38b994e6922f5b8b9f5f2186f77452dde59008a (patch)
tree40a5daea11ea1b1caff942e13f9288d93c1585cf /testsuite/tests/numeric
parent0d10c874035fe11e16379afd58a6585bf5595870 (diff)
downloadhaskell-e38b994e6922f5b8b9f5f2186f77452dde59008a.tar.gz
Test #8542
Diffstat (limited to 'testsuite/tests/numeric')
-rw-r--r--testsuite/tests/numeric/should_compile/T8542.hs9
-rw-r--r--testsuite/tests/numeric/should_compile/T8542.stderr8
-rw-r--r--testsuite/tests/numeric/should_compile/all.T1
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/numeric/should_compile/T8542.hs b/testsuite/tests/numeric/should_compile/T8542.hs
new file mode 100644
index 0000000000..438072bdc1
--- /dev/null
+++ b/testsuite/tests/numeric/should_compile/T8542.hs
@@ -0,0 +1,9 @@
+module T8542 where
+
+import GHC.Int
+
+x :: Int8
+x = -128
+
+y :: Int8
+y = 128
diff --git a/testsuite/tests/numeric/should_compile/T8542.stderr b/testsuite/tests/numeric/should_compile/T8542.stderr
new file mode 100644
index 0000000000..9037797b51
--- /dev/null
+++ b/testsuite/tests/numeric/should_compile/T8542.stderr
@@ -0,0 +1,8 @@
+
+T8542.hs:6:6: Warning:
+ Literal 128 of type Int8 overflows
+ If you are attempting to write a negative literal, use NegativeLiterals
+
+T8542.hs:9:5: Warning:
+ Literal 128 of type Int8 overflows
+ If you are attempting to write a negative literal, use NegativeLiterals
diff --git a/testsuite/tests/numeric/should_compile/all.T b/testsuite/tests/numeric/should_compile/all.T
index 01071c93e6..246642f263 100644
--- a/testsuite/tests/numeric/should_compile/all.T
+++ b/testsuite/tests/numeric/should_compile/all.T
@@ -1,3 +1,4 @@
test('T7116', normal, run_command, ['$MAKE -s --no-print-directory T7116'])
test('T7895', normal, compile, [''])
test('T7881', normal, compile, [''])
+test('T8542', normal, compile, [''])