Open parsonsmatt opened 7 years ago
Working on some tests for various functions. Is it better to derive an Eq instance for Test to check functions which return a Test, or to apply some other function that returns a different type and check equality on that?
I don't understand what you mean. Could you clarify?
Yes, sorry. Suppose we want a test for mkTask. The problem is the Task type does not have Eq typeclass so we either need to add that to check a == b
, or we can instead check f a = f b
for some appropriate function f.
I'm just wondering if there is any reason not to give Task the Eq typeclass, or what generally is the best practice in such a situation.
Oh, I see what you mean. I think deriving Eq
for the Task
type makes perfect sense here.
Alright, I've got coveralls setup, and we're around 75% coverage for the whole project. I want to get this up to 90% before I close this :smile:
There's a ton of
String -> String
crap going on in here. Going to need more tests to make sure it's right.