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.

Tests succeed when a new Error() is thrown

#34

Problem:
runtime errors (throw new Error()) in tested methods are ignored by infinitest. Tests are reported as succeeding even though they don't.

Expected Behavior:
Uncaught exceptions -- including runtime errors -- should cause tests to blow up.

Steps to reproduce:
Try creating these two classes. Infinitest will say the test passes, while Eclipse's junit test runner shows the failure.

public class ClassToTest {

public void doTestWithError() {
    throw new Error();
}

}

public class TestHarness {

@Test
public void testThatErrorsAreHandled() {
    (new ClassToTest()).doTestWithError();
}

}

Reported by roufamatic · January 27th, 2010 @ 06:31 PM

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

Activity

No comments yet.

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.