Skip to content

Commit 0a518f7

Browse files
authored
Merge pull request #442 from michaelpj/mpj/move-tests
Move tests to lsp-types as appropriate
2 parents aa90284 + 8d69bab commit 0a518f7

13 files changed

+45
-42
lines changed

lsp-types/lsp-types.cabal

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,34 @@ library
9393
default-language: Haskell2010
9494
default-extensions: StrictData
9595

96+
test-suite lsp-types-test
97+
type: exitcode-stdio-1.0
98+
hs-source-dirs: test
99+
main-is: Main.hs
100+
other-modules: Spec
101+
CapabilitiesSpec
102+
JsonSpec
103+
MethodSpec
104+
ServerCapabilitiesSpec
105+
SemanticTokensSpec
106+
TypesSpec
107+
URIFilePathSpec
108+
WorkspaceEditSpec
109+
build-depends: base
110+
, QuickCheck
111+
-- for instance Arbitrary Value
112+
, aeson >= 2.0.3.0
113+
, filepath
114+
, hspec
115+
, lsp-types
116+
, lens >= 4.15.2
117+
, network-uri
118+
, quickcheck-instances
119+
, text
120+
build-tool-depends: hspec-discover:hspec-discover
121+
ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall
122+
default-language: Haskell2010
123+
96124
source-repository head
97125
type: git
98126
location: https://github.com/haskell/lsp
File renamed without changes.
File renamed without changes.

lsp-types/test/Main.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module Main where
2+
3+
import Test.Hspec.Runner
4+
import qualified Spec
5+
6+
main :: IO ()
7+
main = hspec Spec.spec
File renamed without changes.
File renamed without changes.

lsp-types/test/Spec.hs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-}
2+
{-
3+
4+
See https://github.com/hspec/hspec/tree/master/hspec-discover#readme
5+
to understand this module
6+
7+
Or http://hspec.github.io/hspec-discover.html
8+
9+
-}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)