使用cabal和hasnell中的HUnit运行测试的问题('builds-depends'失败。)

时间:2015-09-29 00:35:22

标签: haskell cabal

我尝试使用cabal和HUnit运行我的第一个haskell程序。当我收到错误时,我的.cabal似乎有问题:

λ cabal test
.\haskell.cabal has been changed. Re-configuring with most recently used
options. If this fails, please run configure manually.
cabal: haskell.cabal:21: Parse of field 'build-depends' failed.

这是.cabal文件

name:                haskell
version:             0.1.0.0
synopsis:            fibonacci functions
category:            Testing

build-type:          Simple
cabal-version:       >=1.10


executable haskell
  main-is:             Main.hs

  build-depends:       base >=4.8 && <4.9
  hs-source-dirs:      src

  default-language:    Haskell2010

test-suite Tests
  build-depends:  Test.HUnit
  hs-source-dirs: test
  main-is: tests.hs
  Type: exitcode-stdio-1.0

测试文件:

import Test.HUnit
test1 = TestCase (assert True)

1 个答案:

答案 0 :(得分:2)

这是问题所在:

build-depends:  Test.HUnit

也许您想要build-depends: hunit

相关问题