[commit: testsuite] master: Add a test for #1133 (0eab86e)
Ian Lynagh
igloo at earth.li
Tue Jan 22 19:58:13 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/0eab86e6b7d01b5968d3a9a87784dd38ccb18446
>---------------------------------------------------------------
commit 0eab86e6b7d01b5968d3a9a87784dd38ccb18446
Author: Ian Lynagh <ian at well-typed.com>
Date: Tue Jan 22 18:58:50 2013 +0000
Add a test for #1133
>---------------------------------------------------------------
tests/deriving/should_compile/Makefile | 6 ++++++
tests/deriving/should_compile/T1133.hs | 8 ++++++++
tests/deriving/should_compile/T1133.hs-boot | 4 ++++
tests/deriving/should_compile/all.T | 4 ++++
4 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/tests/deriving/should_compile/Makefile b/tests/deriving/should_compile/Makefile
index 9101fbd..666f7a7 100644
--- a/tests/deriving/should_compile/Makefile
+++ b/tests/deriving/should_compile/Makefile
@@ -1,3 +1,9 @@
TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
+
+.PHONY: T1133
+T1133:
+ $(TEST_HC) $(TEST_HC_OPTS) -c T1133.hs-boot
+ $(TEST_HC) $(TEST_HC_OPTS) -c T1133.hs
+
diff --git a/tests/deriving/should_compile/T1133.hs b/tests/deriving/should_compile/T1133.hs
new file mode 100644
index 0000000..5d471d1
--- /dev/null
+++ b/tests/deriving/should_compile/T1133.hs
@@ -0,0 +1,8 @@
+
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+
+module T1133 where
+
+import {-# SOURCE #-} T1133
+
+newtype X = X Int deriving Enum
diff --git a/tests/deriving/should_compile/T1133.hs-boot b/tests/deriving/should_compile/T1133.hs-boot
new file mode 100644
index 0000000..520a2c0
--- /dev/null
+++ b/tests/deriving/should_compile/T1133.hs-boot
@@ -0,0 +1,4 @@
+
+module T1133 where
+
+newtype X = X Int
diff --git a/tests/deriving/should_compile/all.T b/tests/deriving/should_compile/all.T
index 11a10b6..6fbe383 100644
--- a/tests/deriving/should_compile/all.T
+++ b/tests/deriving/should_compile/all.T
@@ -31,3 +31,7 @@ test('drv-functor1', normal, compile, [''])
test('drv-functor2', normal, compile, [''])
test('drv-foldable-traversable1', normal, compile, [''])
test('T6031', extra_clean(['T6031a.o', 'T6031a.hi']), multimod_compile, ['T6031', '-v0'])
+test('T1133',
+ extra_clean(['T1133.o-boot', 'T1133.hi-boot']),
+ run_command,
+ ['$MAKE --no-print-directory -s T1133'])
More information about the ghc-commits
mailing list