Skip to content

Commit ed044ce

Browse files
committed
outline tests
1 parent 9cd79b3 commit ed044ce

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ghcide/test/exe/FindDefinitionAndHoverTests.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ tests = let
159159
holeL65 = Position 65 8 ; hleInfo2 = [ExpectHoverText ["_ :: a -> Maybe a"]]
160160
cccL17 = Position 17 16 ; docLink = [ExpectHoverTextRegex "\\*Defined in 'GHC.Types'\\* \\*\\(ghc-prim-[0-9.]+\\)\\*\n\n"]
161161
imported = Position 56 13 ; importedSig = getDocUri "Foo.hs" >>= \foo -> return [ExpectHoverText ["foo", "Foo", "Haddock"], mkL foo 5 0 5 3]
162-
reexported = Position 55 14 ; reexportedSig = getDocUri "Bar.hs" >>= \bar -> return [ExpectHoverText ["Bar", "Bar", "Haddock"], mkL bar 3 (if ghcVersion >= GHC94 then 5 else 0) 3 (if ghcVersion >= GHC94 then 8 else 14)]
162+
reexported = Position 55 14 ; reexportedSig = getDocUri "Bar.hs" >>= \bar -> return [ExpectHoverText ["Bar", "Bar", "Haddock"], mkL bar 3 (if ghcVersion >= GHC94 && ghcVersion < GHC910 then 5 else 0) 3 (if ghcVersion >= GHC94 && ghcVersion < GHC910 then 8 else 14)]
163163
thLocL57 = Position 59 10 ; thLoc = [ExpectHoverText ["Identity"]]
164164
cmtL68 = Position 67 0 ; lackOfdEq = [ExpectHoverExcludeText ["$dEq"]]
165165
import310 = Position 3 10; pkgTxt = [ExpectHoverText ["Data.Text\n\ntext-"]]

ghcide/test/exe/OutlineTests.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Config
77
import Control.Monad.IO.Class (liftIO)
88
import Data.Text (Text)
99
import qualified Data.Text as T
10+
import Development.IDE.GHC.Compat (GhcVersion (..), ghcVersion)
1011
import Language.LSP.Protocol.Types hiding (SemanticTokenAbsolute (..),
1112
SemanticTokenRelative (..),
1213
SemanticTokensEdit (..), mkRange)
@@ -55,11 +56,11 @@ tests =
5556
[ docSymbolD "A a" "type family" SymbolKind_Function (R 1 0 1 15),
5657
docSymbol "A ()" SymbolKind_Interface (R 2 0 2 23)
5758
],
58-
testSymbolsA "data family" ["{-# language TypeFamilies #-}", "data family A"] [docSymbolD "A" "data family" SymbolKind_Function (R 1 0 1 11)],
59+
testSymbolsA "data family" ["{-# language TypeFamilies #-}", "data family A"] [docSymbolD "A" "data family" SymbolKind_Function (R 1 0 1 (if ghcVersion >= GHC910 then 13 else 11))],
5960
testSymbolsA
6061
"data family instance "
6162
["{-# language TypeFamilies #-}", "data family A a", "data instance A () = A ()"]
62-
[ docSymbolD "A a" "data family" SymbolKind_Function (R 1 0 1 11),
63+
[ docSymbolD "A a" "data family" SymbolKind_Function (R 1 0 1 (if ghcVersion >= GHC910 then 15 else 11)),
6364
docSymbol "A ()" SymbolKind_Interface (R 2 0 2 25)
6465
],
6566
testSymbolsA "constant" ["a = ()"] [docSymbol "a" SymbolKind_Function (R 0 0 0 6)],

0 commit comments

Comments
 (0)