如果我有test/Test.hs与 module Main where
import Test.HUnit
test1 :: Test
test1 = TestCase $ assertEqual "Should be one" 1 5
test2 :: Test
test2 = TestCase $ assertEqual "Shold both be zero" 0 0
m
命令cabal install正常工作,cabal configure --enable-tests也正常工作。然而,当我运行cabal build -j它不会编译: Building MoodleLatex-0.1.0.0...
Preprocessing executable 'moddlelat' for MoodleLatex-0.1.0.0...
Preprocessing test
我试图创建一个使用HUnit一个测试套件我哈斯克尔/惊天动地包,我得到以下错误,当我运行的阴谋测试: [email protected]:~/backup/projects/apollo$ cabal test
Re-configuring with test suites enabled. If this fails, please run configure
manually.
Reso
我最近一直在尝试使用travis CI与堆栈,我有 一直在运行一些问题。 我.travis.yml文件位于我的回购是在这里: (我使用的堆栈网站上的指南) 我的配置文件的快照如下: sudo: false
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack
b
如何测试Control.Monad.Except(两个后卫结果)像一个函数: foo :: Double -> Double -> Except String Double
foo x y
| x < -10.0 = throwError "Invalid parameter"
| otherwise = pure $ x + y
使用hunit?