Michael G Schwern wrote:

[...]

This is what I morphed it into.

/Users/schwern/tmp/during....NOK 1 # Failed test (/Users/schwern/tmp/during.t at line 5)
# got: '23'
# expected: '42'
/Users/schwern/tmp/during....NOK 2 # Failed test "this is a really long name and its pretty long you see"
# (/Users/schwern/tmp/during.t at line 6)
# got: '42'
# expected: '23'



I'm pretty happy with that but I'd like feedback. I've attached the patch so folks can play around with it. Let me know what you think.

This is just a general comment on visual design that's been on my mind a long time, so make of it what you will.


More than once I have been tripped up by the testinterface. I interpret the output the first line being what I've _got_ to test, and the second line being the result. After all, the test was written first, and the code was run afterwards.

So I parse the first line' as 'what I've _got_ in the test', and by then it's game over. The second line my brain skips past the first eight letters and interprets the rest as 'what came back'. Needless to say, the more tired I am, the more likely I am to make this mistake.

So what I *really* think about Perl's test reporting is that the results are shown in the wrong order, and that it would also be better to use a less ambiguous word than 'got'. 'actual' would be nice.

#   Failed test "this is a really long name and its pretty long you see"
#   (/Users/schwern/tmp/during.t at line 6)
#     expected: '23'
#       actual: '42'

Or received. Or anything. My grade three teacher drummed into my head that there is always an alternative to 'got'.

I also understand that I'm no doubt in a minority of one on this issue, and that everyone else's brain is wired the other way, and that in any event, even if my argument has some merit, it is far too late in the game to do anything about it. Maybe in Perl 6, I dunno.

Thank-you for listening to my rant,
David



Reply via email to