shubhj / instinct

Automatically exported from code.google.com/p/instinct
0 stars 0 forks source link

AssertException.assertThrows false positive #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
subject.assertThrows(AssertionError.class, new Runnable() {
    public void run() {
        // don't throw
    }
});

What is the expected output? What do you see instead?

Expect an AssertionError, but nothing is thrown.

In fact, the assertThrows method detects nothing is thrown, but then throws 
an AssertionError, which then renders the assert successful.

Original issue reported on code.google.com by jem.maw...@gmail.com on 8 Mar 2010 at 3:04