summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_compile
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rename/should_compile')
-rw-r--r--testsuite/tests/rename/should_compile/T15798a.hs12
-rw-r--r--testsuite/tests/rename/should_compile/T15798a.stderr3
-rw-r--r--testsuite/tests/rename/should_compile/T15798b.hs9
-rw-r--r--testsuite/tests/rename/should_compile/T15798b.stderr4
-rw-r--r--testsuite/tests/rename/should_compile/T15798c.hs6
-rw-r--r--testsuite/tests/rename/should_compile/T15798c.stderr4
-rw-r--r--testsuite/tests/rename/should_compile/all.T4
7 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/T15798a.hs b/testsuite/tests/rename/should_compile/T15798a.hs
new file mode 100644
index 0000000000..d34e55bdab
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T15798a.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE DerivingStrategies #-}
+
+{-# OPTIONS_GHC -Wmissing-deriving-strategies #-}
+
+module T15798a () where
+
+data Foo a = Foo a
+ deriving stock (Eq)
+
+data Bar a = Bar a
+ deriving (Eq, Show)
+ deriving stock (Ord)
diff --git a/testsuite/tests/rename/should_compile/T15798a.stderr b/testsuite/tests/rename/should_compile/T15798a.stderr
new file mode 100644
index 0000000000..6832205228
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T15798a.stderr
@@ -0,0 +1,3 @@
+
+T15798a.hs:11:3: warning: [-Wmissing-deriving-strategies]
+ No deriving strategy specified. Did you want stock, newtype, or anyclass?
diff --git a/testsuite/tests/rename/should_compile/T15798b.hs b/testsuite/tests/rename/should_compile/T15798b.hs
new file mode 100644
index 0000000000..8504d6fee1
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T15798b.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE StandaloneDeriving #-}
+
+{-# OPTIONS_GHC -Wmissing-deriving-strategies #-}
+
+module T15798b () where
+
+data Foo a = Foo a
+
+deriving instance Eq a => Eq (Foo a)
diff --git a/testsuite/tests/rename/should_compile/T15798b.stderr b/testsuite/tests/rename/should_compile/T15798b.stderr
new file mode 100644
index 0000000000..de1b09ee48
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T15798b.stderr
@@ -0,0 +1,4 @@
+
+T15798b.hs:9:19: warning: [-Wmissing-deriving-strategies]
+ No deriving strategy specified. Did you want stock, newtype, or anyclass?
+ Use DerivingStrategies to specify a strategy.
diff --git a/testsuite/tests/rename/should_compile/T15798c.hs b/testsuite/tests/rename/should_compile/T15798c.hs
new file mode 100644
index 0000000000..f3048eded5
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T15798c.hs
@@ -0,0 +1,6 @@
+{-# OPTIONS_GHC -Wmissing-deriving-strategies #-}
+
+module T15798c () where
+
+data Foo a = Foo a
+ deriving (Eq)
diff --git a/testsuite/tests/rename/should_compile/T15798c.stderr b/testsuite/tests/rename/should_compile/T15798c.stderr
new file mode 100644
index 0000000000..868266aa3a
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T15798c.stderr
@@ -0,0 +1,4 @@
+
+T15798c.hs:6:3: warning: [-Wmissing-deriving-strategies]
+ No deriving strategy specified. Did you want stock, newtype, or anyclass?
+ Use DerivingStrategies to specify a strategy.
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index b6c06c151c..0bcd25ccf1 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -163,3 +163,7 @@ test('T14747', [], multimod_compile, ['T14747', '-v0'])
test('T15149', [], multimod_compile, ['T15149', '-v0'])
test('T13064', normal, compile, [''])
test('T15994', [], run_command, ['$MAKE -s --no-print-directory T15994'])
+test('T15798a', normal, compile, [''])
+test('T15798b', normal, compile, [''])
+test('T15798c', normal, compile, [''])
+