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.

Collapse ParameterizedAssertionErrors and their cause

#20

The problem markers for failing jUnit theories don't have a terribly helpful message, because the real failure is hidden in the cause of the org.junit.experimental.theories.internal.ParameterizedAssertionError. The purpose of the PEA class is to give hints to which data-point that caused the theory to fail. This information is useful as well, so I suggest that the problem marker message should the concatenation of the PEA message, a new-line and then the message from the cause.

Here is an example that demonstrates the problem:

@RunWith(Theories.class)
public class TheoryExample {
  @DataPoint public static String msg = "this should not be hidden";
  
  @Theory public void
  shouldFailWith(String message) {
    throw new RuntimeException(message);
  }
}

Reported by ffff · November 29th, 2009 @ 01:47 AM

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

Activity

  1. ffff
    ffff
    • Tag set to error_markers

    November 29th, 2009 @ 01:59 AM

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.