From: Janto D. <jf...@jf...> - 2003-01-30 23:38:05
|
| On 2003.01.31, Janto Dreijer <jf...@jf...> wrote: | > Is there a reason why the order of the parameters to assertEquals are | > (expected, actual) and not (actual, expected)? | [...] | > It doesn't have the kind of dataflow I think in: left to right. | | When you do Test-First Programming, it does follow the flow in which you | think: test, then code. Expected, then actual. | | -- Dossy Ehhh, I find it difficult to think that way when it comes to a single line of code. If it's easier for you to scale the TestFirst methodology (even to writing the tests themselves) then I guess I can't argue with you. ...except if you're lying and actually *do* find it hard :-) The problem I have is I can only expect something if there is a context to expect it in: I need to refer to the function before I can talk about the returned value. I guess I'm still in the paradigm of "tests are there to exercise functions" instead of them being a design guide. Thanks for disagreeing. Janto |