Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 67285 invoked from network); 21 Apr 2008 16:09:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Apr 2008 16:09:52 -0000 Received: (qmail 69186 invoked by uid 500); 21 Apr 2008 16:09:53 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 69173 invoked by uid 500); 21 Apr 2008 16:09:53 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 69162 invoked by uid 99); 21 Apr 2008 16:09:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Apr 2008 09:09:53 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.roguewave.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Apr 2008 16:09:09 +0000 Received: from exchmail01.Blue.Roguewave.Com (exchmail01.blue.roguewave.com [10.22.129.22]) by moroha.roguewave.com (8.13.6/8.13.6) with ESMTP id m3LG9LoW008412 for ; Mon, 21 Apr 2008 16:09:21 GMT X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: Convention for defining/calling type-based test cases Date: Mon, 21 Apr 2008 10:09:05 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Convention for defining/calling type-based test cases Thread-Index: AcijygaBpBEEZKn9SsO8PF/nUtvmEg== From: "Eric Lemings" To: X-Virus-Checked: Checked by ClamAV on apache.org =20 I've noticed a lot of test employing the following convention: =20 template < typename T > test_case_X (T /*unused*/) { ... } =20 static void run_test () { test_case_X (char ()); } =20 The type argument is typically only used for implicit binding and unused with the test case function itself. So couldn't the test case function be written without the argument and the type specified explicitly at the point of call? Example: template < typename T > test_case_X () { ... } static void run_test () { test_case_X (); } This makes it a little more evident that the test case function only tests the type itself and not instances of the type. Brad.