Wednesday October 01, 2003
Testing the Test Suite
's test suite uses a set of YAML
files, each of which contains a schema, one or more documents and a list of expected results (PASS, FAIL, etc). For the most part I've written these files by hand, although some contain output from XML Spy
or text copied from the XML Schema spec.
It occured to me that I didn't know for certain whether these tests were correct. So I added a test script which runs them against the Xerces/C++ schema validator, if it's installed. This turned up a number of errors in my understanding of the spec which would have been very hard to find otherwise.
Lesson: don't just test your code, test your tests too!