| JezUK Ltd - The Coffee Grounds - December 2010 |
| << November 2010 | January 2011 >> |
Over the past few days, I've been working on Arabica's DOM conformance. Until now, it's been based entirely on my reading or not of the relevant W3C Recommendations. I've always been pretty confident is was correct, but a recent bit of undirected Googling reminded me of the W3C DOM Conformance Test Suites and I thought "why not".
The W3C tests are defined in XML and then transformed to code using XSLT. It comes with stylesheets to generated Java JUnit tests and Javascript JSUnit tests. Monkeying up something to generated Arabica-style CppUnit code only took a few minutes, and getting that code compiling and running only took a little bit longer than that. Embarrasingly, some of the existing DOM code didn't compile and nobody had ever noticed. Interrogating a doctype for its entities just isn't that common, I guess.
With that done, and to my relief, nearly all of the 500 odd tests in the Level 1 Core suite passed first time. Most of those that didn't relied on loading an external DTD, and those that remained were primarily around the behaviour of entity references and child nodes of attributes. Good to have it all fixed though.
Thanks to those who put these tests together. It must have really rather tedious, but all the tests I've looked at in any detail have been good and sensible.
Will move onto Level 2 Core in due course, but got a hankering to wrestle some more of Arabica's XSLT engine to the floor.
If you're trying to use the Clang C++ compiler on Maverick and you're getting link failures like
undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::seekoff(long, std::_Ios_Seekdir, std::_Ios_Openmode)you're just going to have to patch it and build it yourself. It's actually pretty easy, it just takes a few minutes.
llvm::Triple::Linux
// Ubuntu 10.10 "Maverick Meerkat" -- gcc-4.4.5
AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.4",
"i686-linux-gnu", "", "64", triple);
With any luck Clang will be patched up in pretty short order, thus rendering this a historical curiosity.
undefined reference to `std::basic_streambufin one of my builds. Other things using wide streams are linking ok, so I'm not entirely sure what I'm doing differently in this one. Wide streams are probably a minority interest though so, in lieu of a proper fix, what I've described above is still worth a go. [added 22nd Dec 2010]>::pbackfail(int)' undefined reference to `std::basic_streambuf >::overflow(int)'
| << November 2010 | January 2011 >> |