on master help sign in
Add tests for #237: kinds in hover info (#275)
b9374aaJacek Generowicz
test/data/GotoHover.hs+2−1
@@ -38,4 +38,5 @@ multipleClause True = 't'
38multipleClause False = 'f'
38multipleClause False = 'f'
39
39
40-- | Recognizable docs: kpqz
40-- | Recognizable docs: kpqz
41−documented = True
41+documented :: Monad m => Either Int (m a)
42+documented = Left 3
test/exe/Main.hs+8−2
@@ -842,7 +842,10 @@ findDefinitionAndHoverTests = let
842 lclL33 = Position 33 22
842 lclL33 = Position 33 22
843 mclL36 = Position 36 1 ; mcl = [mkR 36 0 36 14]
843 mclL36 = Position 36 1 ; mcl = [mkR 36 0 36 14]
844 mclL37 = Position 37 1
844 mclL37 = Position 37 1
845− docL40 = Position 40 1 ; doc = [ExpectHoverText ["Recognizable docs: kpqz"]]
845+ docL41 = Position 41 1 ; doc = [ExpectHoverText ["Recognizable docs: kpqz"]]
846+ eitL40 = Position 40 28 ; kindE = [ExpectHoverText [":: * -> * -> *\n"]]
847+ intL40 = Position 40 34 ; kindI = [ExpectHoverText [":: *\n"]]
848+ tvrL40 = Position 40 37 ; kindV = [ExpectHoverText [":: * -> *\n"]]
846 in
849 in
847 mkFindTests
850 mkFindTests
848 -- def hover look expect
851 -- def hover look expect
@@ -869,7 +872,10 @@ findDefinitionAndHoverTests = let
869 , test yes yes lclL33 lcb "listcomp lookup"
872 , test yes yes lclL33 lcb "listcomp lookup"
870 , test yes yes mclL36 mcl "top-level fn 1st clause"
873 , test yes yes mclL36 mcl "top-level fn 1st clause"
871 , test yes yes mclL37 mcl "top-level fn 2nd clause #246"
874 , test yes yes mclL37 mcl "top-level fn 2nd clause #246"
872− , test no broken docL40 doc "documentation #7"
875+ , test no broken docL41 doc "documentation #7"
876+ , test no broken eitL40 kindE "kind of Either #273"
877+ , test no broken intL40 kindI "kind of Int #273"
878+ , test no broken tvrL40 kindV "kind of (* -> *) type variable #273"
873 ]
879 ]
874 where yes, broken :: (TestTree -> Maybe TestTree)
880 where yes, broken :: (TestTree -> Maybe TestTree)
875 yes = Just -- test should run and pass
881 yes = Just -- test should run and pass