My first ATF test

Julio Merino jmmv at freebsd.org
Sun Mar 2 20:40:20 UTC 2014


On Tue, Feb 25, 2014 at 10:59 PM, Alan Somers <asomers at freebsd.org> wrote:
>
> The atf-c-api(3) man page doesn't recommend one or the other, and its
> examples show it both ways.  My personal habit is to put the constant
> first.  It's been ingrained by both googletest and Ruby's test/unit,
> which both have a clear policy.  Personally, I would say that if
> you're editing an existing file, try to keep with its preexisting
> style.  Otherwise, I don't think it matters.

It doesn't matter as you say and keeping consistency is good.

However, I've also come to prefer putting the constant first nowadays
given that this what pretty much all other testing libraries do.

The inconsistencies come from the past.  They should be fixed to
prefer check(expected,actual).


More information about the freebsd-testing mailing list