From owner-freebsd-testing@FreeBSD.ORG Sun Mar 2 20:40:20 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE6E9E66 for ; Sun, 2 Mar 2014 20:40:20 +0000 (UTC) Received: from mail-qg0-f48.google.com (mail-qg0-f48.google.com [209.85.192.48]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A7B3166F for ; Sun, 2 Mar 2014 20:40:20 +0000 (UTC) Received: by mail-qg0-f48.google.com with SMTP id a108so9011414qge.7 for ; Sun, 02 Mar 2014 12:40:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=UbIx1189pCQPTESEIrysqW93/gVVYEyOquaQTPh3vgs=; b=R2urmHVbFVSl9NR5kJt43IsDywtxTokRxPGYbpMXzih41+2MpTYCF/dvCehQNKAf5V 7RZZDqFb48rP1tmrQBEbkUDhZBYgHsmpFDC3mnriiKBuePOWSKu9z0n2UUypRRrJqvpQ BHlyUw10MNGbXaBZ6DGEGsVq8c7HNW9uK/Lwi89qXgpwL9DsXsGdZUHmZTm5+0uEq7um PgszPx2gInDpQ8ejWcPBob1m1aqLrMBWWj90SSZPwefif4rwPUtn9iJeyj5w/gLWnYFs tHLesXDek+/iSQf42O+SEwyq4LrzwGGeP3oWjKAbpJIjPJYc+8wKDTZ1Z62VN5KHYXqc FArw== X-Gm-Message-State: ALoCoQmIxAQVpYHDq5s/s8nm9AR99R10omYYL4p30GE8KzQ60iEc6Uy+nYiH0nJey/dDsz3WADv+ X-Received: by 10.224.7.10 with SMTP id b10mr19249323qab.50.1393792819555; Sun, 02 Mar 2014 12:40:19 -0800 (PST) MIME-Version: 1.0 Sender: jmmv@meroh.net Received: by 10.96.83.102 with HTTP; Sun, 2 Mar 2014 12:39:59 -0800 (PST) X-Originating-IP: [108.176.158.82] In-Reply-To: References: <20140225161129.GA59741@x2.osted.lan> <20140225183306.GA70295@x2.osted.lan> From: Julio Merino Date: Sun, 2 Mar 2014 15:39:59 -0500 X-Google-Sender-Auth: R-odbSfe005wJj2wX6u09fdeg3Y Message-ID: Subject: Re: My first ATF test To: Alan Somers Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-testing@freebsd.org" , Peter Holm X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2014 20:40:20 -0000 On Tue, Feb 25, 2014 at 10:59 PM, Alan Somers 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).