}
void assertEquals(DOMDocument* expectedDOM, XMLObject* xmlObject, bool canMarshall=true) {
- assertEquals("Marshalled DOM was not the same as the expected DOM", expectedDOM, xmlObject, canMarshall);
- // Test a clone operation before destroying the original.
xmlObject->releaseThisAndChildrenDOM();
- delete xmlObject->clone();
+ auto_ptr<XMLObject> cloned(xmlObject->clone());
+ assertEquals("Marshalled DOM was not the same as the expected DOM", expectedDOM, cloned.get(), canMarshall);
delete xmlObject;
}