From 32c019a28234e73305a3f4dbae19c6156f669c71 Mon Sep 17 00:00:00 2001 From: zealotchen Date: Fri, 12 Apr 2024 17:40:22 +0800 Subject: [PATCH] feat(dom): fix dom manager unit test --- dom/src/dom/dom_manager_unittests.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dom/src/dom/dom_manager_unittests.cc b/dom/src/dom/dom_manager_unittests.cc index 094566a0236..f6987b3dba7 100644 --- a/dom/src/dom/dom_manager_unittests.cc +++ b/dom/src/dom/dom_manager_unittests.cc @@ -134,7 +134,7 @@ TEST(DomManagerTest, CreateDomNodes) { std::shared_ptr root_node = manager->GetNode(10); root_node->SetDomManager(manager); std::vector> infos = ParserFile("create_node.json", manager); - manager->CreateDomNodes(std::move(infos)); + manager->CreateDomNodes(std::move(infos), false); ASSERT_EQ(root_node->GetChildren().size(), 1); auto child = root_node->GetChildren(); @@ -156,7 +156,7 @@ TEST(DomManagerTest, UpdateDomNodes) { std::shared_ptr root_node = manager->GetNode(10); root_node->SetDomManager(manager); std::vector> infos = ParserFile("create_node.json", manager); - manager->CreateDomNodes(std::move(infos)); + manager->CreateDomNodes(std::move(infos), false); std::string json = "[[{\"id\":59,\"pId\":61,\"name\":\"Text\",\"props\":{\"numberOfLines\":1,\"text\":\"本地调试\"," "\"style\":{\"color\":4280558628,\"fontSize\":26}}},{}]]"; @@ -174,7 +174,7 @@ TEST(DomManagerTest, DeleteDomNodes) { std::shared_ptr root_node = manager->GetNode(10); root_node->SetDomManager(manager); std::vector> infos = ParserFile("create_node.json", manager); - manager->CreateDomNodes(std::move(infos)); + manager->CreateDomNodes(std::move(infos), false); std::string json = "[[{\"id\":63,\"pId\":10,\"name\":\"View\"},{}]]"; std::vector> delete_nodes = ParserJson(json, manager);