public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "C. Brian Jones" <cbj@gnu.org>
To: Archie Cobbs <archie@dellroad.org>
Cc: David P Grove <groved@us.ibm.com>,
	Jeff Sturm <jsturm@one-point.com>,
	GNU Classpath Project <classpath@gnu.org>,
	mauve-discuss@sources.redhat.com, Michael Koch <konqueror@gmx.de>
Subject: Re: Eclipse and Classpath
Date: Thu, 29 Apr 2004 05:09:00 -0000	[thread overview]
Message-ID: <1083215334.3175.104.camel@lyta.haphazard.org> (raw)
In-Reply-To: <200404282250.i3SMoiuV003364@arch20m.dellroad.org>

[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]

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 rather 
> > > advanced JVM features; like reflection.
> > 
> > Sorry if this is an ignorant question, but is this really an issue?  I'd 
> > always assumed (without actually checking) that most (all?) of the VMs 
> > being used by classpath developers implement reflection.  If this is the 
> > case, then maybe making reflection a pre-req for being able to run mauve 
> > wouldn't be an issue.  It's hard to run very much Java code these days 
> > without running into some use of reflection by the application.
> 
> 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.
> 
> 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: 
      * 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. 
TestCase test= new MoneyTest("simple add") {
    public void runTest() {
        testSimpleAdd();
    }
};

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-04-29  5:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OFD30D19BA.CBC8235A-ON85256E84.007C2292-85256E84.007C73EC@us.ibm.com>
2004-04-28 22:54 ` Archie Cobbs
2004-04-29  5:09   ` C. Brian Jones [this message]
     [not found] <Pine.LNX.4.44.0404241127510.5951-100000@ops2.one-point.com>
2004-04-28 20:02 ` Tom Tromey
2004-04-28 21:56   ` Thomas Zander
2004-04-30 23:22     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1083215334.3175.104.camel@lyta.haphazard.org \
    --to=cbj@gnu.org \
    --cc=archie@dellroad.org \
    --cc=classpath@gnu.org \
    --cc=groved@us.ibm.com \
    --cc=jsturm@one-point.com \
    --cc=konqueror@gmx.de \
    --cc=mauve-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).