所以我试图按照suggested structure of a Haskell project,我组织我的测试有几个问题。组织Haskell测试
为了简单起见,让我们开始:
src/Clue/Cards.hs # defines Clue.Cards module
testsuite/tests/Clue/Cards.hs # tests Clue.Cards module
原因之一,我不知道什么名字的testsuite/tests/Clue/Cards.hs
包含测试代码的模块,和另一个,我不知道如何编译我的测试代码,这样我可以链接到我的源:
% ghc -c testsuite/tests/Clue/Cards.hs -L src
testsuite/tests/Clue/Cards.hs:5:0:
Failed to load interface for `Clue.Cards':
Use -v to see a list of the files searched for.
+1提到快照框架,在这方面组织得非常好。 – 2011-01-14 12:33:05
很酷。我使用这个项目作为学习Haskell生态系统的一种方式(我认为任何人都不愿意执行Clue/Cluedo的规则),而且我还没有解决cabal问题,所以这是一个很好的开始。裤子。我会弄清楚如何使用cabal,然后绕回到测试。 – rampion 2011-01-14 13:05:52