From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20834 invoked by alias); 29 Apr 2004 05:09:08 -0000 Mailing-List: contact mauve-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sources.redhat.com Received: (qmail 20827 invoked from network); 29 Apr 2004 05:09:06 -0000 Received: from unknown (HELO ms-smtp-01-eri0.southeast.rr.com) (24.25.9.100) by sources.redhat.com with SMTP; 29 Apr 2004 05:09:06 -0000 Received: from [10.0.0.2] (rdu57-9-048.nc.rr.com [66.57.9.48]) by ms-smtp-01-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id i3T58tSm001283; Thu, 29 Apr 2004 01:08:55 -0400 (EDT) Subject: Re: Eclipse and Classpath From: "C. Brian Jones" Reply-To: cbj@gnu.org To: Archie Cobbs Cc: David P Grove , Jeff Sturm , GNU Classpath Project , mauve-discuss@sources.redhat.com, Michael Koch In-Reply-To: <200404282250.i3SMoiuV003364@arch20m.dellroad.org> References: <200404282250.i3SMoiuV003364@arch20m.dellroad.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-+3s/sod4nXC34/JG2y0g" Message-Id: <1083215334.3175.104.camel@lyta.haphazard.org> Mime-Version: 1.0 Date: Thu, 29 Apr 2004 05:09:00 -0000 X-Virus-Scanned: Symantec AntiVirus Scan Engine X-SW-Source: 2004-q2/txt/msg00055.txt.bz2 --=-+3s/sod4nXC34/JG2y0g Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Content-length: 1750 On Wed, 2004-04-28 at 18:50, Archie Cobbs wrote: > David P Grove wrote: > > > IIRC the biggest problem with using JUnit is that it depends of rathe= r=20 > > > advanced JVM features; like reflection. > >=20 > > Sorry if this is an ignorant question, but is this really an issue? I'= d=20 > > always assumed (without actually checking) that most (all?) of the VMs= =20 > > being used by classpath developers implement reflection. If this is th= e=20 > > case, then maybe making reflection a pre-req for being able to run mauv= e=20 > > wouldn't be an issue. It's hard to run very much Java code these days= =20 > > without running into some use of reflection by the application. >=20 > I inferred the problem to be that reflection is one of the things > we want to test, so we shouldn't be relying on it for the test itself. > Of course, if reflection doesn't work, then the test will probably > still fail :-) But it may make it harder to track down the real problem. >=20 > All in all, it's probably not a major deal... Perhaps there could be > a small set of basic reflection tests that didn't use JUnit too. Junit does not require reflection if used in a particular manner. See http://junit.sourceforge.net/doc/testinfected/testing.htm. But it's probably easier all around if reflection is allowed. JUnit supports two ways of running single tests:=20 * static * dynamic In the static way you override the runTest method inherited from TestCase and call the desired test case. A convenient way to do this is with an anonymous inner class. Note that each test must be given a name, so you can identify it if it fails.=20 TestCase test=3D new MoneyTest("simple add") { public void runTest() { testSimpleAdd(); } }; --=-+3s/sod4nXC34/JG2y0g Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part Content-length: 189 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQBAkI3mcEcmdY33uzYRAkHBAKCbmEB53Bp0RypoOeoE6jIkTpF70gCfQHpV AwM5as0SZS6Za+5sw5ScZ+M= =AIyP -----END PGP SIGNATURE----- --=-+3s/sod4nXC34/JG2y0g--