Explaining tests through comments/assertion statements

Daniel Holbert has some great comments in his flexbox tests in the Mozilla tree,
which start with a phrase like "This test checks that ..." and then describe what he's
trying to test.
   http://mxr.mozilla.org/mozilla-central/source/layout/reftests/flexbox/flexbox-widget-flex-items-4.html?force=1

I've added it into the CSSWG template for the assert meta, to help people understand
what to put there and prompt them to write good assertions, since this is exactly
what that field is for.

   <meta name="assert" content="This test checks that ..."/>

(The CSSWG uses <meta> tags instead of HTML comments so that it can extract these
explanations and expose them in various test-analysis interfaces.)

~fantasai

Received on Saturday, 27 October 2012 14:43:51 UTC