Single test per file or not?

Geoffrey Sneddon gsneddon at opera.com
Sat Jul 30 11:25:36 PDT 2011


On 27/07/11 13:02, David Bruant wrote:
> [+Rick Waldron, because he had a discussion on this topic with Dave
> Fugate on Twitter iirc]
>
> Le 27/07/2011 13:28, Geoffrey Sneddon a écrit :
>> While the current test262 runner makes the assumption that there is
>> only one test per file (see the implementation of
>> ES5Harness.registerTest), the WebWorker-based demo MS showed off a
>> while back allowed multiple tests per file. Seeming both are, as I
>> understand it, by the same group of people, this is an interesting
>> change.
>>
>> Is it intended to allow multiple tests per file, or should there be
>> limits to one test per file (and hence only one call to
>> ES5Harness.registerTest)?
>>
> This is an interesting topic. Granularity.
> I have myself been a bit annoyed once or twice by this issue. Typically,
> I would run the tests, see one failing and trying to see what was wrong.
> I can't remember which, but sometimes, the test was testing several
> things at once and by doing so, it was harder to track down where the
> non-conformance came from. If i recall, a good share of Sputnik imported
> tests tend to do this.

This isn't really what I meant — test granularity affects how much one 
test tests, what I'm interested in is the number of tests within one 
file (so for the majority of tests, the number of calls to 
ES5Harness.registerTest).

(I do agree with everyone else here about test granularity, however.)

-- 
Geoffrey Sneddon — Opera Software
<http://gsnedders.com>
<http://opera.com>


More information about the test262-discuss mailing list