Ticket #8542: 0001-Test-8542.patch

File 0001-Test-8542.patch, 1.7 KB (added by monoidal, 22 months ago)
  • new file tests/numeric/should_compile/T8542.hs

    From 0fc539d5a09fe4471d4baa9ae6998f5a3a733d33 Mon Sep 17 00:00:00 2001
    From: Krzysztof Gogolewski <[email protected]>
    Date: Tue, 19 Nov 2013 16:08:16 +0100
    Subject: [PATCH] Test #8542
    
    ---
     tests/numeric/should_compile/T8542.hs     | 9 +++++++++
     tests/numeric/should_compile/T8542.stderr | 8 ++++++++
     tests/numeric/should_compile/all.T        | 1 +
     3 files changed, 18 insertions(+)
     create mode 100644 tests/numeric/should_compile/T8542.hs
     create mode 100644 tests/numeric/should_compile/T8542.stderr
    
    diff --git a/tests/numeric/should_compile/T8542.hs b/tests/numeric/should_compile/T8542.hs
    new file mode 100644
    index 0000000..438072b
    - +  
     1module T8542 where
     2
     3import GHC.Int
     4
     5x :: Int8
     6x = -128
     7
     8y :: Int8
     9y = 128
  • new file tests/numeric/should_compile/T8542.stderr

    diff --git a/tests/numeric/should_compile/T8542.stderr b/tests/numeric/should_compile/T8542.stderr
    new file mode 100644
    index 0000000..9037797
    - +  
     1
     2T8542.hs:6:6: Warning:
     3    Literal 128 of type Int8 overflows
     4    If you are attempting to write a negative literal, use NegativeLiterals
     5
     6T8542.hs:9:5: Warning:
     7    Literal 128 of type Int8 overflows
     8    If you are attempting to write a negative literal, use NegativeLiterals
  • tests/numeric/should_compile/all.T

    diff --git a/tests/numeric/should_compile/all.T b/tests/numeric/should_compile/all.T
    index 01071c9..246642f 100644
    a b  
    11test('T7116', normal, run_command, ['$MAKE -s --no-print-directory T7116'])
    22test('T7895', normal, compile, [''])
    33test('T7881', normal, compile, [''])
     4test('T8542', normal, compile, [''])