Closed rtfeldman closed 9 years ago
I'm a bit conflicted on this one. Thing is I've made Check.Test
to mirror the regular Check
module which does actual
then expected
whereas elm-test does it the other way round. The reason I chose this order is cuz with the DSL it reads nicer
claim
"Some claim"
`that`
actualStatement
`is`
expectedStatement
`for`
someInvestigator
So, in a sense, I'm worried that as soon as I do this, someone would be confused as to why the order is not the same in both modules.
I may also be worried about nothing. How confusing is this? Can I instead offer a DSL or additional functions to sweeten this?
That reasoning makes sense. :smiley:
It's honestly not a huge deal to me one way or the other, as personally I'm using partial application to pre-populate the run count and seed, and I just flip the arguments while I'm at it...just thought I'd bring it up in case the ordering had been chosen arbitrarily and there was only an upside to changing it.
Check.Test.test
currently takesactual
and thenexpected
, in that order.However, if you get a failure, the output will of course list "Expected: " followed by "got:"
It would be nice if Expected consistently came first, both in argument order and in error message. The alternative is having to remember on a case-by-case basis which comes first for which part of the API.