hunit Questions

1

I have recently been trying to use travis CI with stack and i have been running in to some issues. my .travis.yml file is located in my repo which is here: (I used the guide on the stack website) ...
Traci asked 11/8, 2016 at 18:45

1

Solved

I have written a file parser using the Parsec library. I would like to write a high-level unit test using the Tasty testing framework to ensure that the parser correctly parses some given files. I...

1

Solved

If I have test/Test.hs with 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...
Elaina asked 2/10, 2015 at 18:28

2

Solved

I've been fighting with Cabal for a good portion of a day trying to make its automated testing features work with HUnit. I've read the documentation here and here, and I have my Test-Suite section ...
Voodooism asked 8/8, 2012 at 23:17

1

I'm trying to test a small function (or rather, IO Action) that takes a command line argument and outputs it to the screen. My original (untestable) function is: -- In Library.hs module Library wh...
Contemplative asked 2/12, 2014 at 18:45

1

Solved

I am trying to make some unit tests in Haskell and this is basically what I have done in my code: module Test where import Test.HUnit test = TestList [TestLabel "running all the tests!" $ TestList...
Morrell asked 1/11, 2014 at 11:45

2

Solved

I have a bunch of functions like: method1, method2, method3. For all of them there are HUnit test functions like: testMethod1, testMethod2, testMethod3. testMethod1 = TestCase $ assertEqual "test...
Gillmore asked 5/4, 2012 at 21:54

2

Solved

Are there any extensions to HUnit or QuickCheck that allow a continuous integration system like Bamboo to do detailed reporting of test results? So far, my best idea is to simply trigger the test...
Kenosis asked 10/7, 2011 at 21:46

2

Solved

I want to be able to make sure a function will throw an error when it receives and invalid value. For example, let says I have a function pos that only returns a positive number: pos :: Int -> ...
Heresiarch asked 12/11, 2012 at 19:27

2

Solved

What is Haskell's syntax for importing modules in another directory? I'm getting started with Haskell and want to practice writing simple functions TDD style with HUnit. I'm having trouble figurin...
Titanesque asked 17/2, 2011 at 21:9

1

Solved

I'm new to Haskell and I'm trying to structure a program under test. I have decided to use HUnit and Cabal. From what I have seen a well strucutred project looks the following: src/ AppName/ A...
Platysma asked 25/11, 2012 at 3:43

1

I currently have the following test code: testUpdate :: Test testUpdate = testCase "update does change artist" $ do (created, Just revised, parents) <- mbTest $ do Just editor <- fmap enti...
Caseate asked 2/11, 2012 at 14:17

1

Solved

When i google for how to integrate unit tests with cabal files, i either find http://www.haskell.org/haskellwiki/How_to_write_a_Haskell_program which does not seem to describe the integration of ...
Strapless asked 22/7, 2011 at 8:9

1

Solved

I have a function in a module that looks something like this: module MyLibrary (throwIfNegative) where throwIfNegative :: Integral i => i -> String throwIfNegative n | n < 0 = error "neg...
Tjader asked 17/4, 2011 at 23:23
1

© 2022 - 2024 — McMap. All rights reserved.