Skip to content

Commit cf9cbeb

Browse files
Move tactics tests to be standalone (#1425)
* Move tactic tests to be standalone * Cleanup AutoTupleSpec * Move from tasty to hspec Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 7817a10 commit cf9cbeb

File tree

73 files changed

+181
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+181
-135
lines changed

haskell-language-server.cabal

-3
Original file line numberDiff line numberDiff line change
@@ -458,12 +458,9 @@ test-suite func-test
458458
Rename
459459
Symbol
460460
TypeDefinition
461-
Tactic
462461
Splice
463462
HaddockComments
464463
Ide.Plugin.Splice.Types
465-
Ide.Plugin.Tactic.FeatureSet
466-
Ide.Plugin.Tactic.TestTypes
467464
Ide.Plugin.Eval.Types
468465

469466
default-extensions: OverloadedStrings

plugins/hls-tactics-plugin/hls-tactics-plugin.cabal

+44-6
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,64 @@ library
7878
default-language: Haskell2010
7979
default-extensions: DataKinds, TypeOperators
8080

81+
82+
executable test-server
83+
default-language: Haskell2010
84+
build-depends:
85+
, base
86+
, data-default
87+
, ghcide
88+
, hls-tactics-plugin
89+
, hls-plugin-api
90+
, shake
91+
main-is: Server.hs
92+
hs-source-dirs: test
93+
ghc-options:
94+
"-with-rtsopts=-I0 -A128M"
95+
-threaded -Wall -Wno-name-shadowing -Wredundant-constraints
96+
8197
test-suite tests
8298
type: exitcode-stdio-1.0
8399
main-is: Main.hs
84100
other-modules:
85101
AutoTupleSpec
102+
GoldenSpec
86103
UnificationSpec
87104
hs-source-dirs:
88105
test
89106
ghc-options: -Wall -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N
90107
build-depends:
91108
QuickCheck
109+
, aeson
92110
, base
111+
, bytestring
93112
, checkers
113+
, containers
114+
, data-default
115+
, deepseq
116+
, directory
117+
, filepath
118+
, ghc
119+
, ghcide >= 0.7.5.0
120+
, hie-bios
121+
, hls-plugin-api
122+
, hls-tactics-plugin
94123
, hspec
124+
, hspec-expectations
125+
, lens
126+
, lsp-test
127+
, lsp-types
128+
, megaparsec
95129
, mtl
96-
, hls-tactics-plugin
97-
, hls-plugin-api
98-
, hie-bios
99-
, ghc
100-
, containers
101-
build-tool-depends: hspec-discover:hspec-discover
130+
, tasty
131+
, tasty-ant-xml >=1.1.6
132+
, tasty-expected-failure
133+
, tasty-golden
134+
, tasty-hunit
135+
, tasty-rerun
136+
, text
137+
build-tool-depends:
138+
hspec-discover:hspec-discover
139+
, hls-tactics-plugin:test-server -any
102140
default-language: Haskell2010
103141

plugins/hls-tactics-plugin/test/AutoTupleSpec.hs

+11-17
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,17 @@
22

33
module AutoTupleSpec where
44

5-
import Data.Either (isRight)
6-
import qualified Data.Map as M
7-
import Ide.Plugin.Tactic.Debug
8-
import Ide.Plugin.Tactic.Judgements (mkFirstJudgement)
9-
import Ide.Plugin.Tactic.Machinery
10-
import Ide.Plugin.Tactic.Tactics (auto')
11-
import Ide.Plugin.Tactic.Types
12-
import OccName (mkVarOcc)
13-
import Test.Hspec
14-
import Test.QuickCheck
15-
import Type (mkTyVarTy)
16-
import TysPrim (alphaTyVars)
17-
import TysWiredIn (mkBoxedTupleTy)
18-
19-
20-
instance Show Type where
21-
show = unsafeRender
5+
import Data.Either (isRight)
6+
import Ide.Plugin.Tactic.Judgements (mkFirstJudgement)
7+
import Ide.Plugin.Tactic.Machinery
8+
import Ide.Plugin.Tactic.Tactics (auto')
9+
import Ide.Plugin.Tactic.Types
10+
import OccName (mkVarOcc)
11+
import Test.Hspec
12+
import Test.QuickCheck
13+
import Type (mkTyVarTy)
14+
import TysPrim (alphaTyVars)
15+
import TysWiredIn (mkBoxedTupleTy)
2216

2317

2418
spec :: Spec

0 commit comments

Comments
 (0)