summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2016-12-07 23:24:22 +0200
committerAlan Zimmerman <alan.zimm@gmail.com>2016-12-07 23:24:22 +0200
commit58d78dc0c522327858aa2fdce647a95c575ae7ee (patch)
treefeed8b2dec15e060cff4bf6ca4a6b4b1bf0c3d54 /testsuite
parent499e43824bda967546ebf95ee33ec1f84a114a7c (diff)
downloadhaskell-58d78dc0c522327858aa2fdce647a95c575ae7ee.tar.gz
Fix pretty printer test to nog generate stdout
It was doing a dump to stdout, which is not repeatable across platforms.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/printer/Ppr012.hs2
-rw-r--r--testsuite/tests/printer/Ppr012.stderr3
-rw-r--r--testsuite/tests/printer/Ppr012.stdout186
-rw-r--r--testsuite/tests/printer/all.T1
4 files changed, 3 insertions, 189 deletions
diff --git a/testsuite/tests/printer/Ppr012.hs b/testsuite/tests/printer/Ppr012.hs
index b34b1470f4..04828cf343 100644
--- a/testsuite/tests/printer/Ppr012.hs
+++ b/testsuite/tests/printer/Ppr012.hs
@@ -1,5 +1,3 @@
-{-# OPTIONS -O -ddump-stranal #-}
-
module Dead1(foo) where
foo :: Int -> Int
diff --git a/testsuite/tests/printer/Ppr012.stderr b/testsuite/tests/printer/Ppr012.stderr
index 5dd1384f3c..39084566b6 100644
--- a/testsuite/tests/printer/Ppr012.stderr
+++ b/testsuite/tests/printer/Ppr012.stderr
@@ -1,8 +1,9 @@
-Ppr012.hs:14:1: warning: [-Winline-rule-shadowing]
+Ppr012.hs:12:1: warning: [-Winline-rule-shadowing]
Rule "bar/foo" may never fire because ‘foo’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘foo’
Ppr012.ppr.hs:11:11: warning: [-Winline-rule-shadowing]
Rule "bar/foo" may never fire because ‘foo’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘foo’
+
diff --git a/testsuite/tests/printer/Ppr012.stdout b/testsuite/tests/printer/Ppr012.stdout
deleted file mode 100644
index b4e01eb8a3..0000000000
--- a/testsuite/tests/printer/Ppr012.stdout
+++ /dev/null
@@ -1,186 +0,0 @@
-
-==================== Demand analysis ====================
-Result size of Demand analysis
- = {terms: 19, types: 8, coercions: 0}
-
--- RHS size: {terms: 2, types: 0, coercions: 0}
-$trModule_sK3 :: GHC.Types.TrName
-[LclId,
- Str=m1,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
-$trModule_sK3 = GHC.Types.TrNameS "main"#
-
--- RHS size: {terms: 2, types: 0, coercions: 0}
-$trModule_sK4 :: GHC.Types.TrName
-[LclId,
- Str=m1,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
-$trModule_sK4 = GHC.Types.TrNameS "Dead1"#
-
--- RHS size: {terms: 3, types: 0, coercions: 0}
-Dead1.$trModule :: GHC.Types.Module
-[LclIdX,
- Str=m,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
-Dead1.$trModule = GHC.Types.Module $trModule_sK3 $trModule_sK4
-
--- RHS size: {terms: 8, types: 3, coercions: 0}
-foo :: Int -> Int
-[LclIdX,
- Arity=1,
- Str=<S(S),1*U(U)>m,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [20] 21 20}]
-foo =
- \ (n_axW [Dmd=<S(S),1*U(U)>] :: Int) ->
- case n_axW of { GHC.Types.I# x_aKq [Dmd=<S,U>] ->
- GHC.Types.I# (GHC.Prim.+# x_aKq 1#)
- }
-
-
-
-
-==================== Demand analysis ====================
-Result size of Demand analysis
- = {terms: 19, types: 8, coercions: 0}
-
--- RHS size: {terms: 2, types: 0, coercions: 0}
-$trModule_sK3 :: GHC.Types.TrName
-[LclId,
- Str=m1,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
-$trModule_sK3 = GHC.Types.TrNameS "main"#
-
--- RHS size: {terms: 2, types: 0, coercions: 0}
-$trModule_sK4 :: GHC.Types.TrName
-[LclId,
- Str=m1,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
-$trModule_sK4 = GHC.Types.TrNameS "Dead1"#
-
--- RHS size: {terms: 3, types: 0, coercions: 0}
-Dead1.$trModule :: GHC.Types.Module
-[LclIdX,
- Str=m,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
-Dead1.$trModule = GHC.Types.Module $trModule_sK3 $trModule_sK4
-
--- RHS size: {terms: 8, types: 3, coercions: 0}
-foo :: Int -> Int
-[LclIdX,
- Arity=1,
- Str=<S(S),1*U(U)>m,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True,
- Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= \ (n_axW [Occ=Once!] :: Int) ->
- case n_axW of { GHC.Types.I# x_aKq [Occ=Once] ->
- GHC.Types.I# (GHC.Prim.+# x_aKq 1#)
- }}]
-foo =
- \ (n_axW [Dmd=<S(S),1*U(U)>] :: Int) ->
- case n_axW of { GHC.Types.I# x_aKq [Dmd=<S,U>] ->
- GHC.Types.I# (GHC.Prim.+# x_aKq 1#)
- }
-
-
-
-
-==================== Demand analysis ====================
-Result size of Demand analysis
- = {terms: 19, types: 8, coercions: 0}
-
--- RHS size: {terms: 2, types: 0, coercions: 0}
-$trModule_s1vS :: GHC.Types.TrName
-[LclId,
- Str=m1,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
-$trModule_s1vS = GHC.Types.TrNameS "main"#
-
--- RHS size: {terms: 2, types: 0, coercions: 0}
-$trModule_s1vT :: GHC.Types.TrName
-[LclId,
- Str=m1,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
-$trModule_s1vT = GHC.Types.TrNameS "Dead1"#
-
--- RHS size: {terms: 3, types: 0, coercions: 0}
-Dead1.$trModule :: GHC.Types.Module
-[LclIdX,
- Str=m,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
-Dead1.$trModule = GHC.Types.Module $trModule_s1vS $trModule_s1vT
-
--- RHS size: {terms: 8, types: 3, coercions: 0}
-foo :: Int -> Int
-[LclIdX,
- Arity=1,
- Str=<S(S),1*U(U)>m,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [20] 21 20}]
-foo =
- \ (n_a1jL [Dmd=<S(S),1*U(U)>] :: Int) ->
- case n_a1jL of { GHC.Types.I# x_a1wf [Dmd=<S,U>] ->
- GHC.Types.I# (GHC.Prim.+# x_a1wf 1#)
- }
-
-
-
-
-==================== Demand analysis ====================
-Result size of Demand analysis
- = {terms: 19, types: 8, coercions: 0}
-
--- RHS size: {terms: 2, types: 0, coercions: 0}
-$trModule_s1vS :: GHC.Types.TrName
-[LclId,
- Str=m1,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
-$trModule_s1vS = GHC.Types.TrNameS "main"#
-
--- RHS size: {terms: 2, types: 0, coercions: 0}
-$trModule_s1vT :: GHC.Types.TrName
-[LclId,
- Str=m1,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 20}]
-$trModule_s1vT = GHC.Types.TrNameS "Dead1"#
-
--- RHS size: {terms: 3, types: 0, coercions: 0}
-Dead1.$trModule :: GHC.Types.Module
-[LclIdX,
- Str=m,
- Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
-Dead1.$trModule = GHC.Types.Module $trModule_s1vS $trModule_s1vT
-
--- RHS size: {terms: 8, types: 3, coercions: 0}
-foo :: Int -> Int
-[LclIdX,
- Arity=1,
- Str=<S(S),1*U(U)>m,
- Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
- WorkFree=True, Expandable=True,
- Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
- Tmpl= \ (n_a1jL [Occ=Once!] :: Int) ->
- case n_a1jL of { GHC.Types.I# x_a1wf [Occ=Once] ->
- GHC.Types.I# (GHC.Prim.+# x_a1wf 1#)
- }}]
-foo =
- \ (n_a1jL [Dmd=<S(S),1*U(U)>] :: Int) ->
- case n_a1jL of { GHC.Types.I# x_a1wf [Dmd=<S,U>] ->
- GHC.Types.I# (GHC.Prim.+# x_a1wf 1#)
- }
-
-
-
diff --git a/testsuite/tests/printer/all.T b/testsuite/tests/printer/all.T
index c39656e892..8a795f5ae1 100644
--- a/testsuite/tests/printer/all.T
+++ b/testsuite/tests/printer/all.T
@@ -9,6 +9,7 @@ test('Ppr008', normal, run_command, ['$MAKE -s --no-print-directory ppr008'])
test('Ppr009', normal, run_command, ['$MAKE -s --no-print-directory ppr009'])
test('Ppr010', normal, run_command, ['$MAKE -s --no-print-directory ppr010'])
test('Ppr011', normal, run_command, ['$MAKE -s --no-print-directory ppr011'])
+#test('Ppr012', ignore_stdout, run_command, ['$MAKE -s --no-print-directory ppr012'])
test('Ppr012', normal, run_command, ['$MAKE -s --no-print-directory ppr012'])
test('Ppr013', normal, run_command, ['$MAKE -s --no-print-directory ppr013'])
test('Ppr014', normal, run_command, ['$MAKE -s --no-print-directory ppr014'])