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
@@ -6,15 +6,16 @@
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <yoga/Yoga.h>
|
||||
#include <yoga/YGNode.h>
|
||||
#include <iostream>
|
||||
|
||||
TEST(YogaTest, copy_style_same) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
const YGNodeRef node1 = YGNodeNew();
|
||||
ASSERT_FALSE(YGNodeIsDirty(node0));
|
||||
ASSERT_FALSE(node0->isDirty());
|
||||
|
||||
YGNodeCopyStyle(node0, node1);
|
||||
ASSERT_FALSE(YGNodeIsDirty(node0));
|
||||
ASSERT_FALSE(node0->isDirty());
|
||||
|
||||
YGNodeFree(node0);
|
||||
YGNodeFree(node1);
|
||||
@@ -22,7 +23,7 @@ TEST(YogaTest, copy_style_same) {
|
||||
|
||||
TEST(YogaTest, copy_style_modified) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
ASSERT_FALSE(YGNodeIsDirty(node0));
|
||||
ASSERT_FALSE(node0->isDirty());
|
||||
ASSERT_EQ(YGFlexDirectionColumn, YGNodeStyleGetFlexDirection(node0));
|
||||
ASSERT_FALSE(YGNodeStyleGetMaxHeight(node0).unit != YGUnitUndefined);
|
||||
|
||||
@@ -31,7 +32,7 @@ TEST(YogaTest, copy_style_modified) {
|
||||
YGNodeStyleSetMaxHeight(node1, 10);
|
||||
|
||||
YGNodeCopyStyle(node0, node1);
|
||||
ASSERT_TRUE(YGNodeIsDirty(node0));
|
||||
ASSERT_TRUE(node0->isDirty());
|
||||
ASSERT_EQ(YGFlexDirectionRow, YGNodeStyleGetFlexDirection(node0));
|
||||
ASSERT_FLOAT_EQ(10, YGNodeStyleGetMaxHeight(node0).value);
|
||||
|
||||
@@ -44,14 +45,14 @@ TEST(YogaTest, copy_style_modified_same) {
|
||||
YGNodeStyleSetFlexDirection(node0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxHeight(node0, 10);
|
||||
YGNodeCalculateLayout(node0, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
ASSERT_FALSE(YGNodeIsDirty(node0));
|
||||
ASSERT_FALSE(node0->isDirty());
|
||||
|
||||
const YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(node1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxHeight(node1, 10);
|
||||
|
||||
YGNodeCopyStyle(node0, node1);
|
||||
ASSERT_FALSE(YGNodeIsDirty(node0));
|
||||
ASSERT_FALSE(node0->isDirty());
|
||||
|
||||
YGNodeFree(node0);
|
||||
YGNodeFree(node1);
|
||||
|
Reference in New Issue
Block a user