Issue 51 in instinct: AssertException.assertThrows false positive

0 views
Skip to first unread message

inst...@googlecode.com

unread,
Mar 7, 2010, 10:05:06 PM3/7/10
to instin...@googlegroups.com
Status: Started
Owner: jem.mawson
Labels: Type-Defect Priority-Medium

New issue 51 by jem.mawson: AssertException.assertThrows false positive
http://code.google.com/p/instinct/issues/detail?id=51

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.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply all
Reply to author
Forward
0 new messages