Skip to content

Commit 745f400

Browse files
author
Andrew Cady
committed
fix build of the tests
1 parent 130d691 commit 745f400

File tree

3 files changed

+47
-10
lines changed

3 files changed

+47
-10
lines changed

ble.cabal

+30-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ cabal-version: 1.12
44
--
55
-- see: https://github.com/sol/hpack
66
--
7-
-- hash: 2eaf7b48d485892509d025b3573af73d212bf5d4cf8b7188580eaf6e00ddd6a6
7+
-- hash: e84816ecce58303c3c92194095e508043f72b435f98d5d844393572a38db85b6
88

99
name: ble
1010
version: 0.4.2
@@ -189,13 +189,41 @@ executable readme
189189
cpp-options: -DDBusMock
190190
default-language: Haskell2010
191191

192+
test-suite doctest
193+
type: exitcode-stdio-1.0
194+
main-is: Doctest.hs
195+
hs-source-dirs:
196+
test
197+
default-extensions: AutoDeriveTypeable ConstraintKinds DataKinds DefaultSignatures DeriveFoldable DeriveFunctor DeriveGeneric DeriveTraversable FlexibleContexts FlexibleInstances FunctionalDependencies GADTs KindSignatures MultiParamTypeClasses OverloadedStrings RankNTypes ScopedTypeVariables TypeFamilies TypeOperators
198+
ghc-options: -Wall -main-is Doctest
199+
build-depends:
200+
Glob >=0.7 && <0.8
201+
, base >=4.8 && <4.10
202+
, bytestring >=0.10 && <0.11
203+
, cereal >=0.4 && <0.6
204+
, containers >=0.5 && <0.6
205+
, d-bus >=0.1.5 && <0.2
206+
, data-default-class >=0.0 && <0.2
207+
, doctest >=0.9 && <0.12
208+
, filepath
209+
, microlens >=0.4 && <0.5
210+
, microlens-ghc >=0.4 && <0.5
211+
, mtl >=2.2 && <2.3
212+
, random >=1 && <2
213+
, text >=1 && <2
214+
, transformers >=0.4 && <0.6
215+
, uuid >=1 && <2
216+
, yaml ==0.8.*
217+
if flag(hasDBus)
218+
cpp-options: -DDBusMock
219+
default-language: Haskell2010
220+
192221
test-suite spec
193222
type: exitcode-stdio-1.0
194223
main-is: Main.hs
195224
other-modules:
196225
Bluetooth.TypesSpec
197226
BluetoothSpec
198-
Doctest
199227
Mock
200228
Spec
201229
Paths_ble

package.yaml

+16-7
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,29 @@ tests:
9696
spec:
9797
main: Main.hs
9898
source-dirs: test
99+
other-modules:
100+
- Bluetooth.TypesSpec
101+
- BluetoothSpec
102+
- Mock
103+
- Spec
104+
- Paths_ble
99105
dependencies:
100106
- ble
101107
- hspec > 2 && < 3
102108
- QuickCheck >= 2.8 && < 2.10
103109
- quickcheck-instances >= 0.3 && < 0.4
104110
- process >= 1.2 && < 1.5
105111
- hslogger
106-
# doctest:
107-
# main: Doctest.hs
108-
# source-dirs: test
109-
# dependencies:
110-
# - doctest >= 0.9 && < 0.12
111-
# - Glob >= 0.7 && < 0.8
112-
# - yaml == 0.8.*
112+
doctest:
113+
main: Doctest.hs
114+
source-dirs: test
115+
ghc-options: -main-is Doctest
116+
other-modules: []
117+
dependencies:
118+
- doctest >= 0.9 && < 0.12
119+
- Glob >= 0.7 && < 0.8
120+
- yaml == 0.8.*
121+
- filepath
113122

114123
executables:
115124
readme:

test/Doctest.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Main (main) where
1+
module Doctest (main) where
22

33
-- Runs doctest on all files in "src" dir. Assumes:
44
-- (a) You are using hpack

0 commit comments

Comments
 (0)