Revert D48712710: C++ Cleanup 3/N: Reorganize YGNode
Differential Revision: D48712710 Original commit changeset: d28eae38469a Original Phabricator Diff: D48712710 fbshipit-source-id: 7a10b071edcf045ce98bbf8f9deca0d0e2e80a14
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6ca56e87ce
commit
ea7f61a3db
@@ -7,11 +7,10 @@
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <yoga/Yoga.h>
|
||||
#include <yoga/node/Node.h>
|
||||
#include <yoga/YGNode.h>
|
||||
|
||||
#include "util/TestUtil.h"
|
||||
|
||||
using namespace facebook;
|
||||
using facebook::yoga::test::TestUtil;
|
||||
|
||||
TEST(YogaTest, cloning_shared_root) {
|
||||
@@ -274,10 +273,9 @@ TEST(YogaTest, mixed_shared_and_owned_children) {
|
||||
YGNodeInsertChild(root1, root1_child0, 0);
|
||||
YGNodeInsertChild(root1, root1_child2, 1);
|
||||
|
||||
auto children = static_cast<yoga::Node*>(root1)->getChildren();
|
||||
children.insert(children.begin() + 1, static_cast<yoga::Node*>(root0_child0));
|
||||
static_cast<yoga::Node*>(root1)->setChildren(children);
|
||||
|
||||
auto children = root1->getChildren();
|
||||
children.insert(children.begin() + 1, root0_child0);
|
||||
root1->setChildren(children);
|
||||
auto secondChild = YGNodeGetChild(root1, 1);
|
||||
ASSERT_EQ(secondChild, YGNodeGetChild(root0, 0));
|
||||
ASSERT_EQ(YGNodeGetChild(secondChild, 0), YGNodeGetChild(root0_child0, 0));
|
||||
|
Reference in New Issue
Block a user