Skip to content

Commit 342eea7

Browse files
committed
Update some tests and avoid mentioning GHC 9.2
1 parent af64de7 commit 342eea7

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

plugins/hls-gadt-plugin/test/Main.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,19 @@ tests = testGroup "GADT"
3434
, runTest "ConstructorContext" "ConstructorContext" 2 0 2 38
3535
, runTest "Context" "Context" 2 0 4 41
3636
, runTest "Pragma" "Pragma" 2 0 3 29
37-
, runTest "SingleDerivingGHC92" "SingleDerivingGHC92" 2 0 3 14
38-
, gadtPragmaTest "ghc-9.2 don't need to insert GADTs pragma" False
37+
, runTest "SingleDeriving" "SingleDeriving" 2 0 3 14
38+
, gadtPragmaTest "no need to insert GADTs pragma"
3939
]
4040

41-
gadtPragmaTest :: TestName -> Bool -> TestTree
42-
gadtPragmaTest title hasGADT = testCase title
41+
gadtPragmaTest :: TestName -> TestTree
42+
gadtPragmaTest title = testCase title
4343
$ withCanonicalTempDir
4444
$ \dir -> runSessionWithServer def gadtPlugin dir $ do
4545
doc <- createDoc "A.hs" "haskell" (T.unlines ["module A where", "data Foo = Bar"])
4646
_ <- waitForProgressDone
4747
(act:_) <- findGADTAction <$> getCodeActions doc (Range (Position 1 0) (Position 1 1))
4848
executeCodeAction act
4949
let expected = T.unlines $
50-
["{-# LANGUAGE GADTs #-}" | hasGADT] ++
5150
["module A where", "data Foo where", " Bar :: Foo"]
5251
contents <- skipManyTill anyMessage (getDocumentEdit doc)
5352
liftIO $ contents @?= expected

plugins/hls-gadt-plugin/test/testdata/SingleDeriving.expected.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module SingleDeriving where
22

33
data Foo a b where
44
Bar :: b -> a -> Foo a b
5-
deriving Eq
5+
deriving (Eq)

plugins/hls-gadt-plugin/test/testdata/SingleDerivingGHC92.expected.hs

Lines changed: 0 additions & 5 deletions
This file was deleted.

plugins/hls-gadt-plugin/test/testdata/SingleDerivingGHC92.hs

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)