Ticket #7989: 0001-Test-Trac-7989.patch

File 0001-Test-Trac-7989.patch, 2.7 KB (added by akio, 10 months ago)

Patch to the test suite

  • new file tests/typecheck/should_fail/T7989.hs

    From 9060d785f47289882e3a6e6b587a0fe75d582c0d Mon Sep 17 00:00:00 2001
    From: Takano Akio <aljee@hyper.cx>
    Date: Mon, 17 Jun 2013 19:22:28 +0900
    Subject: [PATCH] Test Trac #7989
    
    ---
     tests/typecheck/should_fail/T7989.hs       |    6 ++++++
     tests/typecheck/should_fail/T7989.stderr   |    5 +++++
     tests/typecheck/should_fail/T7989_1.hs     |    4 ++++
     tests/typecheck/should_fail/T7989_1.stderr |    5 +++++
     tests/typecheck/should_fail/all.T          |    2 ++
     5 files changed, 22 insertions(+)
     create mode 100644 tests/typecheck/should_fail/T7989.hs
     create mode 100644 tests/typecheck/should_fail/T7989.stderr
     create mode 100644 tests/typecheck/should_fail/T7989_1.hs
     create mode 100644 tests/typecheck/should_fail/T7989_1.stderr
    
    diff --git a/tests/typecheck/should_fail/T7989.hs b/tests/typecheck/should_fail/T7989.hs
    new file mode 100644
    index 0000000..3ab341b
    - +  
     1module T7989 where 
     2 
     3data A = A {a0, a1 :: Int} 
     4data B = B {b0, b1 :: Int} 
     5 
     6f x = x { a0 = 3, a1 = 2, b0 = 4, b1 = 5 } 
  • new file tests/typecheck/should_fail/T7989.stderr

    diff --git a/tests/typecheck/should_fail/T7989.stderr b/tests/typecheck/should_fail/T7989.stderr
    new file mode 100644
    index 0000000..1fff0da
    - +  
     1 
     2T7989.hs:6:7: 
     3    No constructor has all these fields: ‛a0’, ‛b0’ 
     4    In the expression: x {a0 = 3, a1 = 2, b0 = 4, b1 = 5} 
     5    In an equation for ‛f’: f x = x {a0 = 3, a1 = 2, b0 = 4, b1 = 5} 
  • new file tests/typecheck/should_fail/T7989_1.hs

    diff --git a/tests/typecheck/should_fail/T7989_1.hs b/tests/typecheck/should_fail/T7989_1.hs
    new file mode 100644
    index 0000000..5d779df
    - +  
     1module T7989_1 where 
     2 
     3data T = A { x0,x1,y :: Int} | B { y,z :: Int } | C { z,x0,x1 :: Int} 
     4f a = a { x0=0, x1=0, y=0, z=0 } 
  • new file tests/typecheck/should_fail/T7989_1.stderr

    diff --git a/tests/typecheck/should_fail/T7989_1.stderr b/tests/typecheck/should_fail/T7989_1.stderr
    new file mode 100644
    index 0000000..6108441
    - +  
     1 
     2T7989_1.hs:4:7: 
     3    No constructor has all these fields: ‛x0’, ‛y’, ‛z’ 
     4    In the expression: a {x0 = 0, x1 = 0, y = 0, z = 0} 
     5    In an equation for ‛f’: f a = a {x0 = 0, x1 = 0, y = 0, z = 0} 
  • tests/typecheck/should_fail/all.T

    diff --git a/tests/typecheck/should_fail/all.T b/tests/typecheck/should_fail/all.T
    index 0f1f7b4..0eaf2c7 100644
    a b test('T7856', normal, compile_fail, ['']) 
    310310test('T7869', normal, compile_fail, ['']) 
    311311test('T7892', normal, compile_fail, ['']) 
    312312test('T7809', normal, compile_fail, ['']) 
     313test('T7989', normal, compile_fail, ['']) 
     314test('T7989_1', normal, compile_fail, [''])