Series of posts on testing Haskell code

I’ve been using both QuickCheck and HUnit to make sure that the functions in dataenc both have the expected properties and follow the specifications. This morning I stumbled on a series of posts by Matthew Podwysocki on Functional Programming Unit Testing (part 1, part 2, part 3, part 4, part). I think I really could …

Continue reading ‘Series of posts on testing Haskell code’ »

Share

Useful thing when adopting test-framework after already using HUnit

I found test-framework today. In adopting it with my already existing unit tests I found this function to be rather useful: import Test.HUnit import qualified Test.Framework.Providers.API as TFAPI   unitTest2TFTest :: Test -> [TFAPI.Test] unitTest2TFTest t = let unitTest2TFTest’ desc (TestCase a) = [testCase desc a] unitTest2TFTest’ desc (TestLabel s t) = unitTest2TFTest’ (desc ++ …

Continue reading ‘Useful thing when adopting test-framework after already using HUnit’ »

Share

Google Treasure Hunt, check!

I personally found the first one to be the trickiest, quite a bit of thinking with a colleague before we saw Pascal’s triangle in the problem. I was a bit worried that things would get trickier from there on. It surely didn’t. The second, summing certain lines taken from files matching certain glob patterns, was …

Continue reading ‘Google Treasure Hunt, check!’ »

Share