parsonsmatt / kale

A quick, easy, and declarative task runner for Haskell code to destroy your boiler plate!
BSD 3-Clause "New" or "Revised" License
33 stars 5 forks source link

Write more tests! #2

Open parsonsmatt opened 7 years ago

parsonsmatt commented 7 years ago

There's a ton of String -> String crap going on in here. Going to need more tests to make sure it's right.

naddleman commented 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?

parsonsmatt commented 7 years ago

I don't understand what you mean. Could you clarify?

naddleman commented 7 years ago

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.

parsonsmatt commented 7 years ago

Oh, I see what you mean. I think deriving Eq for the Task type makes perfect sense here.

parsonsmatt commented 6 years ago

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: