[tor-dev] First test "report"

Steven Murdoch Steven.Murdoch at cl.cam.ac.uk
Sun Feb 12 14:41:14 UTC 2012

On 12 Feb 2012, at 03:28, Nick Mathewson wrote:
>> 2. In comparison assertions, the general convention seems to be to place the
>> expected value first ("test_eq(0, functioncall(...))" rather than
>> "test_eq(functioncall(...), 0)"). I have modified the assertions not
>> following that convention, so they all look the same.
> Hm.  I don't think we actually had a convention on this one.

It's not so important with tinytest because the output messages don't distinguish between expected and actual. In test frameworks where it does matter (e.g. JUnit) expected usually comes first in my experience. So I think the proposed convention is a good one and could be useful should we wish to change error messages to indicate the test failure message to say what was expected. I have found this feature of JUnit helpful, although by no means critical.


More information about the tor-dev mailing list