Re: Repository layout

On Mon, Jun 4, 2012 at 7:35 PM, Robin Berjon <robin@berjon.com> wrote:
> On Jun 4, 2012, at 18:14 , James Graham wrote:
>> Yes, but it can *also* mean that you break the test, if you aren't very careful. Consider a test that does document.getElementsByTagName("link")[0], for example.
>
> While that is indeed within the realm of possible things, I would like to point out that it is a somewhat contrived example, and easy to fix at that. You would be breaking a broken test.

Not if the test is actually testing getElementsByTagName.  The same
goes for all kinds of other DOM features -- any DOM test is likely to
make some type of change to the DOM and then look at the results.  If
you change around the initial DOM of the test file, you could well
change the results.  This is only a problem for DOM/HTML tests, of
course, but it is a potential problem.  And granted that it will only
affect a small percentage of tests -- but if the test framework is
adding and removing these headers all the time as people change
metadata, it's only a matter of time until it breaks one.  Better to
avoid it and keep the metadata separate.

This is leaving aside the fact that it's quite nontrivial to
automatically inject an HTML tag in a fashion that's guaranteed to
parse correctly but also doesn't reserialize the file (which will
create lots of spurious diffs).

Received on Tuesday, 5 June 2012 08:32:34 UTC