Ticket #7162: 7162-testsuite.patch

File 7162-testsuite.patch, 1.5 KB (added by afarmer, 3 years ago)

test for 7162

  • new file tests/simplCore/should_compile/T7162.hs

    From fa4314c5b1f49c71ee8a6f81ee9a51dd61a9425a Mon Sep 17 00:00:00 2001
    From: Andrew Farmer <[email protected]>
    Date: Thu, 4 Oct 2012 16:53:55 -0500
    Subject: [PATCH] Test for #7162: RULES that never fire automatically
    
    ---
     tests/simplCore/should_compile/T7162.hs |    9 +++++++++
     tests/simplCore/should_compile/all.T    |    1 +
     2 files changed, 10 insertions(+)
     create mode 100644 tests/simplCore/should_compile/T7162.hs
     create mode 100644 tests/simplCore/should_compile/T7162.stderr
    
    diff --git a/tests/simplCore/should_compile/T7162.hs b/tests/simplCore/should_compile/T7162.hs
    new file mode 100644
    index 0000000..e09b921
    - +  
     1import Data.Char 
     2 
     3{-# RULES "map-loop" [~] forall f . map' f = map' (id . f) #-} 
     4 
     5{-# NOINLINE map' #-} 
     6map' f [] = [] 
     7map' f (x:xs) = f x : map' f xs 
     8 
     9main = print (map' toUpper "Hello, World") 
  • tests/simplCore/should_compile/all.T

    diff --git a/tests/simplCore/should_compile/T7162.stderr b/tests/simplCore/should_compile/T7162.stderr
    new file mode 100644
    index 0000000..e69de29
    diff --git a/tests/simplCore/should_compile/all.T b/tests/simplCore/should_compile/all.T
    index 973342a..b695bee 100644
    a b test('spec003', normal, compile, ['']) 
    3535 
    3636test('rule1', normal, compile, ['']) 
    3737test('rule2', only_ways(['optasm']), compile, ['-dsuppress-uniques']) 
     38test('T7162', normal, compile, ['']) 
    3839 
    3940test('dfun-loop', normal, compile, ['']) 
    4041test('strict-float', normal, compile, [''])