Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Place error marker on correct line for custom assertions

#16

When I create custom assertions by creating a method named assertXXX or by extending FEST-assert's GenericAssert class, the error marker shows up inside the custom assertion method. As many tests will be using the same custom assert, this is not very helpful.

There seems to be support for some sort of custom assertion detection, as failed tests in FEST-assert places the error marker on the desired line. How can I get my own custom asserts to do the same?

Reported by Johannes Brodwall · November 2nd, 2009 @ 10:37 AM

State: new
Milestone: none
Assigned to: benrady (at gmail) benrady (at gmail)

Activity

  1. benrady (at gmail)
    benrady (at gmail)

    Right now, assertions are placed the most recent line in the failure stack trace that doesn't appear in a known test library package (currently junit and jdave are the only tools we've had to filter like that).

    If there are other packages that you'd like to see filtered, or another filtering mechanism that would work for you, please let us know.

    November 5th, 2009 @ 03:24 AM

  2. Johannes Brodwall
    Johannes Brodwall

    The test packages that I use are org.hamcrest., org.fest.assertions. and org.mockito.. In addition, it would be good to filter on assert, which is at least the pattern I use for custom assert.

    November 5th, 2009 @ 01:13 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.