[imps] Parse errors in implementation tests

Henri Sivonen hsivonen at iki.fi
Fri Apr 9 03:37:58 PDT 2010

"Jim Evans" <james.h.evans.jr at gmail.com> wrote:

> I posted a question on the html5lib-discuss list about this, but I
> thought
> I'd cast a little wider net and ask here as well. I'm working on an
> open-source (MIT license) .NET (C#) implementation of an HTML5 parser,
> and
> am leveraging the html5lib unit tests, much as the validator.nu Java
> implementation does. I'm no expert in any of these languages, but it
> looks
> to me like there is no parse error validation in any of the Java,
> Python, or
> PHP implementations that also use these tests.

The validator.nu Java test harness for tokenizer tests does check that parse errors occur at the right spots. There's one test that fails because the parse error positioning relative to character token coalescing differs from the test case, so the test case assumes particular implementation details.

The validator.nu Java test harness for tree builder tests checks for zero errors vs. more than zero errors, but it doesn't check for the exact non-zero number of errors, because when I was implementing the tree builder, it seemed to me that the exact errors in some test cases were semibogus and in other cases it made usability sense to flatten multiple errors into one.

Henri Sivonen
hsivonen at iki.fi

More information about the Implementors mailing list