(This is part 2 of "Basic XML Namespace support")
I did not modify the existing tests but instead built a
suite of cppunit tests for consideration.
I think these are easier to understand and extend than
the existing tests because
- individual tests are separated clearly.
- entire blocks of tests can be #ifdef'd out, eg in the
case of namespace tests
- easier to spot the location of the error.
Try intentionally breaking the code and you'll see where
the tests break much more clearly.
** important ** I added the tests in a directory 'test'
and have attached a separate zip file containing them.
Lee, I know you said you don't want cppunit for now, and
thats fine. However, I've included it for two reasons. (1)
I feel the case in favour of a move like this is compelling.
(2) I needed to test my changes in a way that I think is
best, and I had trouble figuring out the best way to
extend the existing test program.
I also think it is time to separate files into different
directories. In my opinion it would be ideal (in future) to
have an include, src, test and testdata dirs. But this is
for the future - right now I figure its a good time to put
tests into the test dir.
To compile, you will need Cppunit 1.9.2 (NOT 1.8) and
(for MSVC) you will need to define the environment
variable COTS_DIR_CPPUNIT (eg for me:
COTS_DIR_CPPUNIT=D:\COTS\cppunit-1.9.12)
If this patch is too far removed from what you want the
library to become then thats fine; I need these tests for
my own work anyway.
Zip file