@@ -34,20 +34,19 @@ tests = testGroup "GADT"
34
34
, runTest " ConstructorContext" " ConstructorContext" 2 0 2 38
35
35
, runTest " Context" " Context" 2 0 4 41
36
36
, 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"
39
39
]
40
40
41
- gadtPragmaTest :: TestName -> Bool -> TestTree
42
- gadtPragmaTest title hasGADT = testCase title
41
+ gadtPragmaTest :: TestName -> TestTree
42
+ gadtPragmaTest title = testCase title
43
43
$ withCanonicalTempDir
44
44
$ \ dir -> runSessionWithServer def gadtPlugin dir $ do
45
45
doc <- createDoc " A.hs" " haskell" (T. unlines [" module A where" , " data Foo = Bar" ])
46
46
_ <- waitForProgressDone
47
47
(act: _) <- findGADTAction <$> getCodeActions doc (Range (Position 1 0 ) (Position 1 1 ))
48
48
executeCodeAction act
49
49
let expected = T. unlines $
50
- [" {-# LANGUAGE GADTs #-}" | hasGADT] ++
51
50
[" module A where" , " data Foo where" , " Bar :: Foo" ]
52
51
contents <- skipManyTill anyMessage (getDocumentEdit doc)
53
52
liftIO $ contents @?= expected
0 commit comments