Hi Nikolay,
2015-07-18 23:34 GMT+08:00 Nikolay Sivov bunglehead@gmail.com:
Do you mean an iteration like that? Have I tested all the included nodes?
In principle yes, but you're not testing anything in that patch, ownerDocument() is IXMLDOMNode property, you have to call it on 'node'. Also this document doesn't cover anything but elements I think, because childNodes() only iterates through immediate children, and grand-children are not included (I think, it's been a while since I looked into that). So I suggest adding a new document, with all kinds of nodes, and run a loop on it. Attribute nodes still need special handling.
Okay, so I write a recursive test for it. Could you have a check with it?
Also, we already have a helper function: test_get_ownerDocument() Should I use this?
Right, I missed that, please move new loop there.
I'm wondering how to combine the tests now. Can I just call test_null_owner in test_get_ownerDocument()? It seems easier.
Thanks