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

Commit

Permalink
Attempt to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpickering committed May 18, 2020
1 parent b2ddc1f commit 4b2325f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Development/IDE/Spans/AtPoint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ typeLocationsAtPoint getHieFile = querySpanInfoAt getTypeSpan
getTypeSpan SpanInfo { spaninfoType = Just t } =
case splitTyConApp_maybe t of
Nothing -> return Nothing
Just (getName -> name, _) -> nameToLocation getHieFile name
Just (getName -> name, _) ->
nameToLocation getHieFile name
getTypeSpan _ = return Nothing

locationsAtPoint
Expand Down
2 changes: 1 addition & 1 deletion test/data/Bar.hs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Bar (Bar) where
module Bar (Bar(..)) where

data Bar = Bar
2 changes: 1 addition & 1 deletion test/data/GotoHover.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{-# LANGUAGE OverloadedStrings #-}
{- HLINT ignore -}
module Testing ( module Testing ) where
import Data.Text (Text, pack)
import Foo (Bar, foo)



data TypeConstructor = DataConstructor
{ fff :: Text
, ggg :: Int }
Expand Down
4 changes: 2 additions & 2 deletions test/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1356,8 +1356,8 @@ findDefinitionAndHoverTests = let
, testGroup "hover" $ mapMaybe snd tests
, testGroup "type-definition" $ typeDefinitionTests ]

typeDefinitionTests = [ tst (getTypeDefinitions, checkDefs) dcL7 tcData "Saturated data con"
, tst (getTypeDefinitions, checkDefs) opL16 [ExpectNoDefinitions] "Polymorphic variable"]
typeDefinitionTests = [ tst (getTypeDefinitions, checkDefs) aaaL14 (pure tcData) "Saturated data con"
, tst (getTypeDefinitions, checkDefs) opL16 (pure [ExpectNoDefinitions]) "Polymorphic variable"]

test runDef runHover look expect = testM runDef runHover look (return expect)

Expand Down

0 comments on commit 4b2325f

Please sign in to comment.