Add code for non-covariant build.
[shibboleth/cpp-xmltooling.git] / xmltoolingtest / UnmarshallingTest.h
index 255168c..a00b655 100644 (file)
@@ -139,7 +139,7 @@ public:
         TS_ASSERT(sxObject.get()!=NULL);
 
         sxObject->releaseThisAndChildrenDOM();
-        auto_ptr<SimpleXMLObject> clonedObject(sxObject->clone());
+        auto_ptr<SimpleXMLObject> clonedObject(dynamic_cast<SimpleXMLObject*>(sxObject->clone()));
 
         VectorOf(SimpleXMLObject) kids=clonedObject->getSimpleXMLObjects();
         TSM_ASSERT_EQUALS("Number of child elements was not expected value", 3, kids.size());