diff options
Diffstat (limited to 'core/fxcrt/xml/cfx_xmlelement_unittest.cpp')
-rw-r--r-- | core/fxcrt/xml/cfx_xmlelement_unittest.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fxcrt/xml/cfx_xmlelement_unittest.cpp b/core/fxcrt/xml/cfx_xmlelement_unittest.cpp index 1e53ef3dd7..dfc60a10c3 100644 --- a/core/fxcrt/xml/cfx_xmlelement_unittest.cpp +++ b/core/fxcrt/xml/cfx_xmlelement_unittest.cpp @@ -73,7 +73,6 @@ TEST(CFX_XMLElementTest, Attributes) { TEST(CFX_XMLElementTest, Clone) { CFX_XMLDocument doc; - CFX_XMLElement node(L"test:node"); node.SetAttribute(L"first", L"one"); node.SetAttribute(L"second", L"two"); @@ -87,10 +86,9 @@ TEST(CFX_XMLElementTest, Clone) { CFX_XMLNode* clone = node.Clone(&doc); EXPECT_TRUE(clone != nullptr); - ASSERT_EQ(FX_XMLNODE_Element, clone->GetType()); - CFX_XMLElement* inst = static_cast<CFX_XMLElement*>(clone); + CFX_XMLElement* inst = ToXMLElement(clone); EXPECT_EQ(L"test:node", inst->GetName()); EXPECT_EQ(L"node", inst->GetLocalTagName()); EXPECT_EQ(L"test", inst->GetNamespacePrefix()); |