- From: Aryeh Gregor <Simetrical+w3c@gmail.com>
- Date: Mon, 18 Apr 2011 18:38:09 -0400
- To: Garrett Smith <dhtmlkitchen@gmail.com>
- Cc: Arthur Barstow <art.barstow@nokia.com>, public-webapps <public-webapps@w3.org>
On Mon, Apr 18, 2011 at 4:52 PM, Garrett Smith <dhtmlkitchen@gmail.com> wrote: > A test with 0 assertions could be used to test exceptions but only if > the testing framework provides for "@throws" annotation (my > TestRunner.js does). testharness.js has an assert_throws() function that can be used in cases where an exception is expected. You could still sensibly have a test with zero assertions if all you're testing is that something does *not* throw an exception, though. I've done that in some of my test suites, where I needed to do some setup for groups of tests, wanted exceptions thrown during setup to not interfere with unrelated tests, and wanted such exceptions to be reported as failures.
Received on Monday, 18 April 2011 23:01:44 UTC