Skip to content

Commit

Permalink
Don't use CPP in refactor plugin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wz1000 committed Jan 18, 2024
1 parent 78e2308 commit 3c89823
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 0 additions & 2 deletions plugins/hls-refactor-plugin/hls-refactor-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ test-suite tests
, hls-test-utils == 2.6.0.0
, lens
, lsp-types
-- for MIN_VERSION_ghc
, ghc
, text
, hls-plugin-api
, parser-combinators
Expand Down
17 changes: 6 additions & 11 deletions plugins/hls-refactor-plugin/test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE GADTs #-}
Expand Down Expand Up @@ -701,11 +700,9 @@ typeWildCardActionTests = testGroup "type wildcard actions"
[ "func :: _"
, "func x y = x + y"
]
#if MIN_VERSION_ghc(9,7,0)
[ "func :: a -> a -> a" -- 9.8 has a different suggestion
#else
[ "func :: Integer -> Integer -> Integer"
#endif
[ if ghcVersion >= GHC98
then "func :: a -> a -> a" -- 9.8 has a different suggestion
else "func :: Integer -> Integer -> Integer"
, "func x y = x + y"
]
, testUseTypeSignature "type in parentheses"
Expand Down Expand Up @@ -733,11 +730,9 @@ typeWildCardActionTests = testGroup "type wildcard actions"
[ "func::_"
, "func x y = x + y"
]
#if MIN_VERSION_ghc(9,7,0)
[ "func::a -> a -> a" -- 9.8 has a different suggestion
#else
[ "func::Integer -> Integer -> Integer"
#endif
[ if ghcVersion >= GHC98
then "func::a -> a -> a" -- 9.8 has a different suggestion
else "func::Integer -> Integer -> Integer"
, "func x y = x + y"
]
, testGroup "add parens if hole is part of bigger type"
Expand Down

0 comments on commit 3c89823

Please sign in to comment.