Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f21e011

Browse files
Add tests for the 'Go to' links in the hover.
1 parent 7f91fad commit f21e011

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎ghcide-test/exe/FindDefinitionAndHoverTests.hs‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ tests = let
146146
fffL14 = Position 18 7 ;
147147
aL20 = Position 19 15
148148
aaaL14 = Position 18 20 ; aaa = [mkR 11 0 11 3]
149+
kkkL30 = Position 30 2 ; kkkType = [ExpectHoverTextRegex "Go to \\[MyClass\\]\\(.*GotoHover\\.hs#L26\\)"]
150+
bbbL16 = Position 16 7 ; bbbType = [ExpectHoverTextRegex "Go to \\[TypeConstructor\\]\\(.*GotoHover\\.hs#L8\\)"]
151+
aaaL11 = Position 11 1 ; aaaType = [ExpectHoverTextRegex "Go to \\[TypeConstructor\\]\\(.*GotoHover\\.hs#L8\\)"]
149152
dcL7 = Position 11 11 ; tcDC = [mkR 7 23 9 16]
150153
dcL12 = Position 16 11 ;
151154
xtcL5 = Position 9 11 ; xtc = [ExpectHoverText ["Int", "Defined in ", "GHC.Types", "ghc-prim"]]
@@ -243,6 +246,9 @@ tests = let
243246
testM yes yes reexported reexportedSig "Imported symbol reexported"
244247
, test no yes thLocL57 thLoc "TH Splice Hover"
245248
, test yes yes import310 pkgTxt "show package name and its version"
249+
, test no yes kkkL30 kkkType "hover shows 'Go to' link for class in constraint"
250+
, test no yes bbbL16 bbbType "hover shows 'Go to' link for data constructor's type"
251+
, test no yes aaaL11 aaaType "hover shows 'Go to' link for binding's underlying type"
246252
]
247253
where yes :: (TestTree -> Maybe TestTree)
248254
yes = Just -- test should run and pass

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /