@@ -16,9 +16,7 @@ import Development.IDE.Test (diagnostic,
16
16
expectDiagnostics ,
17
17
expectDiagnosticsWithTags ,
18
18
expectNoMoreDiagnostics ,
19
- flushMessages , waitForAction ,
20
- waitForBuildQueue ,
21
- waitForTypecheck )
19
+ flushMessages , waitForAction )
22
20
import Development.IDE.Types.Location
23
21
import qualified Language.LSP.Protocol.Lens as L
24
22
import Language.LSP.Protocol.Message
@@ -36,8 +34,6 @@ import Control.Lens ((^.))
36
34
import Control.Monad.Extra (whenJust )
37
35
import Development.IDE.Plugin.Test (WaitForIdeRuleResult (.. ))
38
36
import System.Time.Extra
39
- import Test.Hls (waitForKickDone ,
40
- waitForKickStart )
41
37
import Test.Tasty
42
38
import Test.Tasty.HUnit
43
39
import TestUtils
@@ -112,8 +108,7 @@ tests = testGroup "diagnostics"
112
108
, " foo :: Int -> String"
113
109
, " foo a = _ a"
114
110
]
115
- s <- createDoc " Testing.hs" " haskell" content
116
- -- waitForTypecheck s
111
+ _ <- createDoc " Testing.hs" " haskell" content
117
112
expectDiagnostics
118
113
[ ( " Testing.hs"
119
114
, [(DiagnosticSeverity_Error , (2 , 8 ), " Found hole: _ :: Int -> String" )]
@@ -137,7 +132,6 @@ tests = testGroup "diagnostics"
137
132
deferralTest title binding msg = testSessionWait title $ do
138
133
_ <- createDoc " A.hs" " haskell" $ sourceA binding
139
134
_ <- createDoc " B.hs" " haskell" sourceB
140
- liftIO $ sleep 1
141
135
expectDiagnostics $ expectedDs msg
142
136
in
143
137
[ deferralTest " type error" " True" " Couldn't match expected type"
@@ -271,9 +265,6 @@ tests = testGroup "diagnostics"
271
265
_ <- createDoc " ModuleA.hs-boot" " haskell" contentAboot
272
266
_ <- createDoc " ModuleB.hs" " haskell" contentB
273
267
_ <- createDoc " ModuleB.hs-boot" " haskell" contentBboot
274
- -- waitForKickStart
275
- -- waitForKickDone
276
- liftIO $ sleep 1
277
268
expectDiagnostics [(" ModuleB.hs" , [(DiagnosticSeverity_Warning , (3 ,0 ), " Top-level binding" )])]
278
269
, testSessionWait " correct reference used with hs-boot" $ do
279
270
let contentB = T. unlines
@@ -488,7 +479,7 @@ tests = testGroup "diagnostics"
488
479
adoc <- createDoc aPath " haskell" aSource
489
480
changeDoc adoc [TextDocumentContentChangeEvent . InR . TextDocumentContentChangeWholeDocument $
490
481
T. unlines [" module A where" , " import B" , " x :: Bool" , " x = y" ]]
491
- waitForBuildQueue
482
+
492
483
expectDiagnostics
493
484
[ ( " P.hs" ,
494
485
[ (DiagnosticSeverity_Error , (4 , 6 ), " Couldn't match expected type 'Int' with actual type 'Bool'" ),
0 commit comments