Skip to content

Commit 506fae7

Browse files
committed
REBASEME: Make "broken" tests explicit
1 parent 50d4b0a commit 506fae7

File tree

1 file changed

+48
-46
lines changed

1 file changed

+48
-46
lines changed

ghcide/test/exe/FindDefinitionAndHoverTests.hs

Lines changed: 48 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,18 @@ tests = let
150150
eitL40 = Position 44 28 ; kindE = [ExpectHoverText [":: Type -> Type -> Type\n"]]
151151
intL40 = Position 44 34 ; kindI = [ExpectHoverText [":: Type\n"]]
152152
-- TODO: Kind signature of type variables should be `Type -> Type`
153-
tvrL40 = Position 44 37 ; kindV = [ExpectHoverText ["m"]]
153+
tvrL40 = Position 44 37 ; kindV = [ExpectHoverText ["m"]]; kindV' = [ExpectHoverText [":: * -> *\n"]]
154154
-- TODO: Hover of integer literal should be `7518`
155-
intL41 = Position 45 20 ; litI = [ExpectHoverText ["_ :: Int"]]
155+
intL41 = Position 45 20 ; litI = [ExpectHoverText ["_ :: Int"]]; litI' = [ExpectHoverText ["7518"]]
156156
-- TODO: Hover info of char literal should be `'f'`
157-
chrL36 = Position 41 24 ; litC = [ExpectHoverText ["_ :: Char"]]
157+
chrL36 = Position 41 24 ; litC = [ExpectHoverText ["_ :: Char"]]; litC' = [ExpectHoverText ["'f'"]]
158158
-- TODO: Hover info of Text literal should be `"dfgy"`
159-
txtL8 = Position 12 14 ; litT = [ExpectHoverText ["_ :: Text"]]
159+
txtL8 = Position 12 14 ; litT = [ExpectHoverText ["_ :: Text"]]; litT' = [ExpectHoverText ["\"dfgy\""]]
160160
-- TODO: Hover info of List literal should be `[8391 :: Int, 6268]`
161-
lstL43 = Position 47 12 ; litL = [ExpectHoverText ["[Int]"]]
161+
lstL43 = Position 47 12 ; litL = [ExpectHoverText ["[Int]"]]; litL' = [ExpectHoverText ["[8391 :: Int, 6268]"]]
162162
outL45 = Position 49 3 ; outSig = [ExpectHoverText ["outer", "Bool"], mkR 50 0 50 5]
163163
-- TODO: Hover info of local function signature should be `inner :: Bool`
164-
innL48 = Position 52 5 ; innSig = [ExpectHoverText ["inner"], mkR 53 2 53 7]
164+
innL48 = Position 52 5 ; innSig = [ExpectHoverText ["inner"], mkR 53 2 53 7]; innSig' = [ExpectHoverText ["inner", "Char"], mkR 49 2 49 7]
165165
holeL60 = Position 62 7 ; hleInfo = [ExpectHoverText ["_ ::"]]
166166
holeL65 = Position 65 8 ; hleInfo2 = [ExpectHoverText ["_ :: a -> Maybe a"]]
167167
cccL17 = Position 17 16 ; docLink = [ExpectHoverTextRegex "\\*Defined in 'GHC.Types'\\* \\*\\(ghc-prim-[0-9.]+\\)\\*\n\n"]
@@ -174,46 +174,46 @@ tests = let
174174
mkFindTests
175175
-- def hover look expect
176176
[ -- It suggests either going to the constructor or to the field
177-
test yes yes fffL4 fff "field in record definition"
178-
, test yes yes fffL8 fff' "field in record construction #1102"
179-
, test yes yes fffL14 fff' "field name used as accessor" -- https://github.com/haskell/ghcide/pull/120 in Calculate.hs
180-
, test yes yes aaaL14 aaa "top-level name" -- https://github.com/haskell/ghcide/pull/120
181-
, test yes yes dcL7 tcDC "data constructor record #1029"
182-
, test yes yes dcL12 tcDC "data constructor plain" -- https://github.com/haskell/ghcide/pull/121
183-
, test yes yes tcL6 tcData "type constructor #1028" -- https://github.com/haskell/ghcide/pull/147
184-
, test yes yes xtcL5 xtc "type constructor external #717,1028"
185-
, test yes yes xvL20 xvMsg "value external package #717" -- https://github.com/haskell/ghcide/pull/120
186-
, test yes yes vvL16 vv "plain parameter" -- https://github.com/haskell/ghcide/pull/120
187-
, test yes yes aL18 apmp "pattern match name" -- https://github.com/haskell/ghcide/pull/120
188-
, test yes yes opL16 op "top-level operator #713" -- https://github.com/haskell/ghcide/pull/120
189-
, test yes yes opL18 opp "parameter operator" -- https://github.com/haskell/ghcide/pull/120
190-
, test yes yes b'L19 bp "name in backticks" -- https://github.com/haskell/ghcide/pull/120
191-
, test yes yes clL23 cls "class in instance declaration #1027"
192-
, test yes yes clL25 cls "class in signature #1027" -- https://github.com/haskell/ghcide/pull/147
193-
, test yes yes eclL15 ecls "external class in signature #717,1027"
194-
, test yes yes dnbL29 dnb "do-notation bind #1073"
195-
, test yes yes dnbL30 dnb "do-notation lookup"
196-
, test yes yes lcbL33 lcb "listcomp bind #1073"
197-
, test yes yes lclL33 lcb "listcomp lookup"
198-
, test yes yes mclL36 mcl "top-level fn 1st clause"
199-
, test yes yes mclL37 mcl "top-level fn 2nd clause #1030"
200-
, test yes yes spaceL37 space "top-level fn on space #1002"
201-
, test no yes docL41 doc "documentation #1129"
202-
, test no yes eitL40 kindE "kind of Either #1017"
203-
, test no yes intL40 kindI "kind of Int #1017"
204-
, test no yes tvrL40 kindV "kind of (* -> *) type variable #1017"
205-
, test no yes intL41 litI "literal Int in hover info #1016"
206-
, test no yes chrL36 litC "literal Char in hover info #1016"
207-
, test no yes txtL8 litT "literal Text in hover info #1016"
208-
, test no yes lstL43 litL "literal List in hover info #1016"
209-
, test yes yes cmtL68 lackOfdEq "no Core symbols #3280"
210-
, test no yes docL41 constr "type constraint in hover info #1012"
211-
, test no yes outL45 outSig "top-level signature #767"
212-
, test yes yes innL48 innSig "inner signature #767"
213-
, test no yes holeL60 hleInfo "hole without internal name #831"
214-
, test no yes holeL65 hleInfo2 "hole with variable"
215-
, test no yes cccL17 docLink "Haddock html links"
216-
, testM yes yes imported importedSig "Imported symbol"
177+
test (broken fff') yes fffL4 fff "field in record definition"
178+
, test yes yes fffL8 fff' "field in record construction #1102"
179+
, test yes yes fffL14 fff' "field name used as accessor" -- https://github.com/haskell/ghcide/pull/120 in Calculate.hs
180+
, test yes yes aaaL14 aaa "top-level name" -- https://github.com/haskell/ghcide/pull/120
181+
, test yes yes dcL7 tcDC "data constructor record #1029"
182+
, test yes yes dcL12 tcDC "data constructor plain" -- https://github.com/haskell/ghcide/pull/121
183+
, test yes yes tcL6 tcData "type constructor #1028" -- https://github.com/haskell/ghcide/pull/147
184+
, test yes yes xtcL5 xtc "type constructor external #717,1028"
185+
, test yes yes xvL20 xvMsg "value external package #717" -- https://github.com/haskell/ghcide/pull/120
186+
, test yes yes vvL16 vv "plain parameter" -- https://github.com/haskell/ghcide/pull/120
187+
, test yes yes aL18 apmp "pattern match name" -- https://github.com/haskell/ghcide/pull/120
188+
, test yes yes opL16 op "top-level operator #713" -- https://github.com/haskell/ghcide/pull/120
189+
, test yes yes opL18 opp "parameter operator" -- https://github.com/haskell/ghcide/pull/120
190+
, test yes yes b'L19 bp "name in backticks" -- https://github.com/haskell/ghcide/pull/120
191+
, test yes yes clL23 cls "class in instance declaration #1027"
192+
, test yes yes clL25 cls "class in signature #1027" -- https://github.com/haskell/ghcide/pull/147
193+
, test yes yes eclL15 ecls "external class in signature #717,1027"
194+
, test yes yes dnbL29 dnb "do-notation bind #1073"
195+
, test yes yes dnbL30 dnb "do-notation lookup"
196+
, test yes yes lcbL33 lcb "listcomp bind #1073"
197+
, test yes yes lclL33 lcb "listcomp lookup"
198+
, test yes yes mclL36 mcl "top-level fn 1st clause"
199+
, test yes yes mclL37 mcl "top-level fn 2nd clause #1030"
200+
, test yes yes spaceL37 space "top-level fn on space #1002"
201+
, test no yes docL41 doc "documentation #1129"
202+
, test no yes eitL40 kindE "kind of Either #1017"
203+
, test no yes intL40 kindI "kind of Int #1017"
204+
, test no (broken kindV') tvrL40 kindV "kind of (* -> *) type variable #1017"
205+
, test no (broken litI') intL41 litI "literal Int in hover info #1016"
206+
, test no (broken litC') chrL36 litC "literal Char in hover info #1016"
207+
, test no (broken litT') txtL8 litT "literal Text in hover info #1016"
208+
, test no (broken litL') lstL43 litL "literal List in hover info #1016"
209+
, test yes yes cmtL68 lackOfdEq "no Core symbols #3280"
210+
, test no yes docL41 constr "type constraint in hover info #1012"
211+
, test no yes outL45 outSig "top-level signature #767"
212+
, test yes (broken innSig') innL48 innSig "inner signature #767"
213+
, test no yes holeL60 hleInfo "hole without internal name #831"
214+
, test no yes holeL65 hleInfo2 "hole with variable"
215+
, test no yes cccL17 docLink "Haddock html links"
216+
, testM yes yes imported importedSig "Imported symbol"
217217
, if isWindows then
218218
-- Flaky on Windows: https://github.com/haskell/haskell-language-server/issues/2997
219219
testM no yes reexported reexportedSig "Imported symbol (reexported)"
@@ -226,6 +226,8 @@ tests = let
226226
yes = Just -- test should run and pass
227227
no = const Nothing -- don't run this test at all
228228
--skip = const Nothing -- unreliable, don't run
229+
broken :: [Expect] -> TestTree -> Maybe TestTree
230+
broken _ = yes
229231

230232
checkFileCompiles :: FilePath -> Session () -> TestTree
231233
checkFileCompiles fp diag =

0 commit comments

Comments
 (0)