• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "core/fxcrt/xml/cfx_xmldocument.h"
6 #include "core/fxcrt/xml/cfx_xmlelement.h"
7 #include "core/fxcrt/xml/cfx_xmlinstruction.h"
8 #include "testing/gtest/include/gtest/gtest.h"
9 
TEST(CFX_XMLDocumentTest,Root)10 TEST(CFX_XMLDocumentTest, Root) {
11   CFX_XMLDocument doc;
12   EXPECT_TRUE(doc.GetRoot() != nullptr);
13 }
14 
TEST(CFX_XMLDocumentTest,CreateNode)15 TEST(CFX_XMLDocumentTest, CreateNode) {
16   CFX_XMLDocument doc;
17   auto* node = doc.CreateNode<CFX_XMLElement>(L"elem");
18 
19   ASSERT_EQ(CFX_XMLNode::Type::kElement, node->GetType());
20   EXPECT_EQ(L"elem", node->GetName());
21 }
22