Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
soulomoon committed May 10, 2024
1 parent 36651b4 commit 1d73ef5
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions ghcide/test/exe/DiagnosticTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ import Development.IDE.Test (diagnostic,
expectDiagnostics,
expectDiagnosticsWithTags,
expectNoMoreDiagnostics,
flushMessages, waitForAction,
waitForBuildQueue,
waitForTypecheck)
flushMessages, waitForAction)
import Development.IDE.Types.Location
import qualified Language.LSP.Protocol.Lens as L
import Language.LSP.Protocol.Message
Expand All @@ -36,8 +34,6 @@ import Control.Lens ((^.))
import Control.Monad.Extra (whenJust)
import Development.IDE.Plugin.Test (WaitForIdeRuleResult (..))
import System.Time.Extra
import Test.Hls (waitForKickDone,
waitForKickStart)
import Test.Tasty
import Test.Tasty.HUnit
import TestUtils
Expand Down Expand Up @@ -112,8 +108,7 @@ tests = testGroup "diagnostics"
, "foo :: Int -> String"
, "foo a = _ a"
]
s <- createDoc "Testing.hs" "haskell" content
-- waitForTypecheck s
_ <- createDoc "Testing.hs" "haskell" content
expectDiagnostics
[ ( "Testing.hs"
, [(DiagnosticSeverity_Error, (2, 8), "Found hole: _ :: Int -> String")]
Expand All @@ -137,7 +132,6 @@ tests = testGroup "diagnostics"
deferralTest title binding msg = testSessionWait title $ do
_ <- createDoc "A.hs" "haskell" $ sourceA binding
_ <- createDoc "B.hs" "haskell" sourceB
liftIO $ sleep 1
expectDiagnostics $ expectedDs msg
in
[ deferralTest "type error" "True" "Couldn't match expected type"
Expand Down Expand Up @@ -271,9 +265,6 @@ tests = testGroup "diagnostics"
_ <- createDoc "ModuleA.hs-boot" "haskell" contentAboot
_ <- createDoc "ModuleB.hs" "haskell" contentB
_ <- createDoc "ModuleB.hs-boot" "haskell" contentBboot
-- waitForKickStart
-- waitForKickDone
liftIO $ sleep 1
expectDiagnostics [("ModuleB.hs", [(DiagnosticSeverity_Warning, (3,0), "Top-level binding")])]
, testSessionWait "correct reference used with hs-boot" $ do
let contentB = T.unlines
Expand Down Expand Up @@ -488,7 +479,7 @@ tests = testGroup "diagnostics"
adoc <- createDoc aPath "haskell" aSource
changeDoc adoc [TextDocumentContentChangeEvent . InR . TextDocumentContentChangeWholeDocument $
T.unlines ["module A where", "import B", "x :: Bool", "x = y"]]
waitForBuildQueue

expectDiagnostics
[ ( "P.hs",
[ (DiagnosticSeverity_Error, (4, 6), "Couldn't match expected type 'Int' with actual type 'Bool'"),
Expand Down

0 comments on commit 1d73ef5

Please sign in to comment.