harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Loenko <mloe...@gmail.com>
Subject Re: [classlib] Unit and performance testing
Date Wed, 25 Jan 2006 10:04:38 GMT
Well if we need just a single stacktrace per test it would work.

Consider an example: we need to make several attempts
and fail only if all of them fail. For example if we want try to
create an object
whose constructor takes a name of a security algorithm as an argument.
We do not know before which algorithms are installed in the user environment,
so we go through the list of algorithm names we are aware of and try to create
the object, catch exception, log it, and fail when all attempts are


On 1/25/06, Thorbjørn Ravn Andersen <thunderaxiom@gmail.com> wrote:
> Mikhail Loenko wrote:
> > fail() is not always convinient, for example, how would you print
> >
> >stack trace to fail()? Meanwhile stacktrace is most often enough
> >
> >
> If you need a stacktrace, why not just throw a RuntimeException at that
> point?  JUnit will then include the stack trace in the report.
> --
>  Thorbjørn

View raw message