ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre-John Mas <andrejohn....@gmail.com>
Subject Re: cannot find symbol: Assume.assumeFalse() - bad junit 4.11 jar in repo?
Date Tue, 27 Aug 2013 22:16:34 GMT
Hi,

Not a problem in the repo - sorry for this. Feeling a little red in the face here.

Looks like I jumped the gun. I suspected it was probably an environment issue
and I didn't dig enough. It turns out I had an old version in my Java extensions
folder, which on removing resolved the issue.

Andre

On 28-Aug-2013, at 00:05, Andre-John Mas wrote:

> Hi,
> 
> I am building Ant from source for the first time, using the SVN tree, at revision 1517854.
> 
> When I try to build the project I get the following error:
> 
> compile-tests:
>    [javac] Compiling 9 source files to /Users/ajmas/Development/third-party/ant/ant-core/build/testcases
>    [javac] /Users/ajmas/Development/third-party/ant/ant-core/src/tests/junit/org/example/junit/JUnit4Skippable.java:43:
cannot find symbol
>    [javac] symbol  : method assumeFalse(java.lang.String,boolean)
>    [javac] location: class org.junit.Assume
>    [javac]         Assume.assumeFalse("This test will be ignored", true);
>    [javac]               ^
>    [javac] /Users/ajmas/Development/third-party/ant/ant-core/src/tests/junit/org/example/junit/JUnit4Skippable.java:55:
cannot find symbol
>    [javac] symbol  : method assumeFalse(boolean)
>    [javac] location: class org.junit.Assume
>    [javac]         Assume.assumeFalse(true);
>    [javac]               ^
>    [javac] 2 errors
> 
> Running: javap -classpath lib/optional/junit-4.11.jar org.junit.Assume, I get:
> 
> Compiled from "Assume.java"
> public class org.junit.Assume extends java.lang.Object{
>    public org.junit.Assume();
>    public static void assumeTrue(boolean);
>    public static void assumeNotNull(java.lang.Object[]);
>    public static void assumeThat(java.lang.Object, org.hamcrest.Matcher);
>    public static void assumeNoException(java.lang.Throwable);
> }
> 
> Looking at the junit 4.11 at https://github.com/junit-team/junit it shows that method
should be there.
> 
> Just to be sure I download junit 4.11 from:
> 
> http://search.maven.org/#search|gav|1|g%3A%22junit%22%20AND%20a%3A%22junit%22
> 
> and this shows the expected contents:
> 
> public class org.junit.Assume extends java.lang.Object{
>    public org.junit.Assume();
>    public static void assumeTrue(boolean);
>    public static void assumeFalse(boolean);
>    public static void assumeTrue(java.lang.String, boolean);
>    public static void assumeFalse(java.lang.String, boolean);
>    public static void assumeNotNull(java.lang.Object[]);
>    public static void assumeThat(java.lang.Object, org.hamcrest.Matcher);
>    public static void assumeThat(java.lang.String, java.lang.Object, org.hamcrest.Matcher);
>    public static void assumeNoException(java.lang.Throwable);
>    public static void assumeNoException(java.lang.String, java.lang.Throwable);
> }
> 
> It looks like the junit jar in the repo needs updating?
> 
> Andre
> 
> 


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


Mime
View raw message