ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: svn commit: r381780 - in /ant/core/trunk: WHATSNEW docs/manual/OptionalTasks/junit.html src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitVersionHelper.java
Date Wed, 01 Mar 2006 05:00:21 GMT
On Tue, 28 Feb 2006, <jglick@apache.org> wrote:

> +                Class junit4TestAdapterClass = null;
> +                // Note that checking for JDK 5 directly won't work; under JDK 4, this
will already have failed.
> +                try {
> +                    if (loader == null) {
> +                        junit4TestAdapterClass = Class.forName("junit.framework.JUnit4TestAdapter");
> +                    } else {
> +                        junit4TestAdapterClass = Class.forName("junit.framework.JUnit4TestAdapter",
true, loader);
> +                    }
> +                } catch (ClassNotFoundException e) {
> +                    // OK, fall back to JUnit 3.
> +                }
> +                junit4 = junit4TestAdapterClass != null;
> +

I haven't looked into the implemenation of JUnit4TestAdapter so I
have to ask you 8-)

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?

If JUnit would build in Gump (somebody seems to have forgotten to
check in a file) we'd already know since Gump will provide JUnit 4
to allmost all builds while most of them (including Ant) still use
JUnit 3 style tests.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message