commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rall <...@finemaltcoding.com>
Subject Re: [lang] test classes for commons.lang.exception package
Date Sat, 09 Mar 2002 17:46:12 GMT
Daniel Rall <dlr@finemaltcoding.com> writes:

> "Steven Caswell" <stevencaswell@yahoo.com> writes:
>
>> Hi Dan.  I ran ant test.exception and everything works fine. Is there
>> something else I can do to help resolve the problem?
>
> I changed the failure case to use assertEquals() instead of
> assertTrue():
>
> test.exception:
> Running exception package tests ...
> ...F..
> Time: 0.074
> There was 1 failure:
> 1) testNestableDelegetePrintStackTrace(org.apache.commons.lang.exception.NestableDelegateTestCase)junit.framework.AssertionFailedError:
stack trace substring(954,1022) == rethrown as ThrowableNestedNestable partial stack trace
place-holder expected:<rethrown as ThrowableNestedNestable partial stack trace place-holder>
but was:<
> rethrown as ThrowableNestedNestable partial stack trace place-holde>
> 	at org.apache.commons.lang.exception.NestableDelegateTestCase.testNestableDelegetePrintStackTrace(NestableDelegateTestCase.java)

I figured it out.  Your test case was Windows-centric, always assuming
that line separators were of length 2.  I corrected this by using the
system property line.separator and getting the length of that.

- Dan

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message