Set fourth file version digit to signify rebuild.
[shibboleth/cpp-opensaml.git] / samltest / internal.h
index f1abd88..2389848 100644 (file)
@@ -105,10 +105,9 @@ protected:
     }
 
     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;
     }