Skip to content

Commit 1d73ef5

Browse files
committed
revert
1 parent 36651b4 commit 1d73ef5

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

ghcide/test/exe/DiagnosticTests.hs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ import Development.IDE.Test (diagnostic,
1616
expectDiagnostics,
1717
expectDiagnosticsWithTags,
1818
expectNoMoreDiagnostics,
19-
flushMessages, waitForAction,
20-
waitForBuildQueue,
21-
waitForTypecheck)
19+
flushMessages, waitForAction)
2220
import Development.IDE.Types.Location
2321
import qualified Language.LSP.Protocol.Lens as L
2422
import Language.LSP.Protocol.Message
@@ -36,8 +34,6 @@ import Control.Lens ((^.))
3634
import Control.Monad.Extra (whenJust)
3735
import Development.IDE.Plugin.Test (WaitForIdeRuleResult (..))
3836
import System.Time.Extra
39-
import Test.Hls (waitForKickDone,
40-
waitForKickStart)
4137
import Test.Tasty
4238
import Test.Tasty.HUnit
4339
import TestUtils
@@ -112,8 +108,7 @@ tests = testGroup "diagnostics"
112108
, "foo :: Int -> String"
113109
, "foo a = _ a"
114110
]
115-
s <- createDoc "Testing.hs" "haskell" content
116-
-- waitForTypecheck s
111+
_ <- createDoc "Testing.hs" "haskell" content
117112
expectDiagnostics
118113
[ ( "Testing.hs"
119114
, [(DiagnosticSeverity_Error, (2, 8), "Found hole: _ :: Int -> String")]
@@ -137,7 +132,6 @@ tests = testGroup "diagnostics"
137132
deferralTest title binding msg = testSessionWait title $ do
138133
_ <- createDoc "A.hs" "haskell" $ sourceA binding
139134
_ <- createDoc "B.hs" "haskell" sourceB
140-
liftIO $ sleep 1
141135
expectDiagnostics $ expectedDs msg
142136
in
143137
[ deferralTest "type error" "True" "Couldn't match expected type"
@@ -271,9 +265,6 @@ tests = testGroup "diagnostics"
271265
_ <- createDoc "ModuleA.hs-boot" "haskell" contentAboot
272266
_ <- createDoc "ModuleB.hs" "haskell" contentB
273267
_ <- createDoc "ModuleB.hs-boot" "haskell" contentBboot
274-
-- waitForKickStart
275-
-- waitForKickDone
276-
liftIO $ sleep 1
277268
expectDiagnostics [("ModuleB.hs", [(DiagnosticSeverity_Warning, (3,0), "Top-level binding")])]
278269
, testSessionWait "correct reference used with hs-boot" $ do
279270
let contentB = T.unlines
@@ -488,7 +479,7 @@ tests = testGroup "diagnostics"
488479
adoc <- createDoc aPath "haskell" aSource
489480
changeDoc adoc [TextDocumentContentChangeEvent . InR . TextDocumentContentChangeWholeDocument $
490481
T.unlines ["module A where", "import B", "x :: Bool", "x = y"]]
491-
waitForBuildQueue
482+
492483
expectDiagnostics
493484
[ ( "P.hs",
494485
[ (DiagnosticSeverity_Error, (4, 6), "Couldn't match expected type 'Int' with actual type 'Bool'"),

0 commit comments

Comments
 (0)