on master help sign in
Add tests for #237: kinds in hover info (#275)
commitb9374aa346a5bd0f87e936f2d33659a021954a2b authorJacek Generowicz <jacg@my-post-office.net> dateWed 18 Dec 2019, 13:50 (7 years ago) parentbbb75c2
2 files changed+10−3
test/data/GotoHover.hs+2−1 test/exe/Main.hs+8−2
test/data/GotoHover.hs+2−1
@@ -38,4 +38,5 @@ multipleClause True = 't'
3838multipleClause False = 'f'
3939
4040-- | 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
842842 lclL33 = Position 33 22
843843 mclL36 = Position 36 1 ; mcl = [mkR 36 0 36 14]
844844 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"]]
846849 in
847850 mkFindTests
848851 -- def hover look expect
@@ -869,7 +872,10 @@ findDefinitionAndHoverTests = let
869872 , test yes yes lclL33 lcb "listcomp lookup"
870873 , test yes yes mclL36 mcl "top-level fn 1st clause"
871874 , 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"
873879 ]
874880 where yes, broken :: (TestTree -> Maybe TestTree)
875881 yes = Just -- test should run and pass