ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <>
Subject Re: svn commit: r381780 - in /ant/core/trunk: WHATSNEW docs/manual/OptionalTasks/junit.html src/main/org/apache/tools/ant/taskdefs/optional/junit/ src/main/org/apache/tools/ant/taskdefs/optional/junit/
Date Wed, 01 Mar 2006 16:29:41 GMT
Stefan Bodewig wrote:
> I haven't looked into the implemenation of JUnit4TestAdapter so I
> have to ask you 8-)

Sure, was expecting some questions here...

> Even if I have JUnit 4 on my CLASSPATH I can still use JUnit 3 style
> of tests (no annotations, naming conventions instead).


> Will this patch still allow me to run those tests?  Or will wrapping the tests
> in a JUnit4TestAdapter force me to use annotations?

No, you can still use the 3-compatible tests as before.

You do need to be running JDK 5+ since the JUnit team decided to compile 
even the compatibility classes with -source 1.5 and against JDK 5 
classes like StringBuilder, which Ant can't work around. I will however 
patch JUnitTestRunner a tiny bit to be able to run JUnit 3 tests on JDK 
1.4 if your classpath contains JUnit 3 _before_ JUnit 4. Not very much 
help but could make transition a bit easier for some folks: just include 
both versions of JUnit on your classpath in order, and you will be able 
to run JUnit 3 tests always, and 4 tests under JDK 5+.


--  x22801*i)%2B1

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message