Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Tests for issue 310 (misleading hover on inner signature) #311

Merged
merged 3 commits into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/data/GotoHover.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ documented :: Monad m => Either Int (m a)
documented = Left 7518

listOfInt = [ 8391 :: Int, 6268 ]

outer :: Bool
outer = undefined where

inner :: Char
inner = undefined
4 changes: 4 additions & 0 deletions test/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,8 @@ findDefinitionAndHoverTests = let
chrL36 = Position 36 25 ; litC = [ExpectHoverText ["'t'"]]
txtL8 = Position 8 14 ; litT = [ExpectHoverText ["\"dfgv\""]]
lstL43 = Position 43 12 ; litL = [ExpectHoverText ["[ 8391 :: Int, 6268 ]"]]
outL45 = Position 45 3 ; outSig = [ExpectHoverText ["outer", "Bool"], mkR 46 0 46 5]
innL48 = Position 48 5 ; innSig = [ExpectHoverText ["inner", "Char"], mkR 49 2 49 7]
in
mkFindTests
-- def hover look expect
Expand Down Expand Up @@ -1132,6 +1134,8 @@ findDefinitionAndHoverTests = let
, test no broken txtL8 litT "literal Text in hover info #274"
, test no broken lstL43 litL "literal List in hover info #274"
, test no broken docL41 constr "type constraint in hover info #283"
, test broken broken outL45 outSig "top-level signature #310"
, test broken broken innL48 innSig "inner signature #310"
]
where yes, broken :: (TestTree -> Maybe TestTree)
yes = Just -- test should run and pass
Expand Down