W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: CfC: WebApps testing process; deadline April 20

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Mon, 18 Apr 2011 18:38:09 -0400
Message-ID: <BANLkTi=_QFxwX+GJJq3DiKH-aHbsq7_Czg@mail.gmail.com>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:44 GMT