f48916d0fb
Expect.throws calls its first argument, f, with no arguments. If f isn't callable in this way, the act of calling would throw, and this throw would be considered as makeing the Expect.throws succeeede. Now we check the argument first, and call it outside the try/catch if it's not callable. This was already caught in checked mode, but we shouldn't accept a false positive in unchecked mode either. R=zerny@google.com Review URL: https://codereview.chromium.org//692463002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41392 260f80e4-7a28-3924-810f-c04153c831b5