You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Adam Hardy <ad...@cyberspaceroad.com> on 2003/02/13 17:35:54 UTC
running junit on ant source
I'm doing some mods to two of the ant source classes, and I'm following
the guidelines from the ant docs about running tests under junit and
creating new tests.
I'm new to junit today actually and I'm using "ant run-tests" in the ant
home directory to make sure all the junit tests that come with the
source code work.
I get this failure on the first testcase junit comes to and I don't know
what it means. Is it obvious to anyone what's wrong here? I presume the
problem lies with my set-up, because according to junit, I should get
more info when a test fails - I presume that the "null" here would
normally be a line or 2 about what failed:
[junit] Testcase:
testLineContains(org.apache.tools.ant.filters.LineContainsTest): FAILED
[junit] null
[junit] junit.framework.AssertionFailedError
Thanks if you can help,
Adam
Re: running junit on ant source
Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 13 Feb 2003, Adam Hardy <ad...@cyberspaceroad.com> wrote:
> I get this failure on the first testcase junit comes to and I don't
> know what it means.
It means that the test has failed 8-)
More seriously, I suspect something in your setup is different from
the way Ant's testsuite expects it to be.
> Is it obvious to anyone what's wrong here?
Not from the small snippet you post.
> because according to junit, I should get more info when a test fails
> - I presume that the "null" here would normally be a line or 2 about
> what failed:
No, the "null" probably means that an assertTrue(condition) has
failed. Somewhere since JUnit 3.7 or 3.8 it will print null as a
message when you use the one-arg version of assertTrue.
Can you post the full stack-trace (probably to the dev list) as well
as details on you setup?
Stefan