update styletest

This commit is contained in:
Lukas Woehrl
2016-12-19 19:41:50 +01:00
parent a6bdf6abf1
commit fae6b6352f

View File

@@ -26,16 +26,16 @@ TEST(YogaTest, copy_style_modified) {
const YGNodeRef node0 = YGNodeNew();
ASSERT_FALSE(YGNodeIsDirty(node0));
ASSERT_EQ(YGFlexDirectionColumn, YGNodeStyleGetFlexDirection(node0));
ASSERT_TRUE(YGFloatIsUndefined(YGNodeStyleGetMaxHeight(node0)));
ASSERT_FALSE(YGNodeStyleGetMaxHeight(node0).defined);
const YGNodeRef node1 = YGNodeNew();
YGNodeStyleSetFlexDirection(node1, YGFlexDirectionRow);
YGNodeStyleSetMaxHeight(node1, 10);
YGNodeStyleSetMaxHeight(node1, YGPx(10));
YGNodeCopyStyle(node0, node1);
ASSERT_TRUE(YGNodeIsDirty(node0));
ASSERT_EQ(YGFlexDirectionRow, YGNodeStyleGetFlexDirection(node0));
ASSERT_FLOAT_EQ(10, YGNodeStyleGetMaxHeight(node0));
ASSERT_FLOAT_EQ(10, YGNodeStyleGetMaxHeight(node0).value);
YGNodeFree(node0);
YGNodeFree(node1);
@@ -44,13 +44,13 @@ TEST(YogaTest, copy_style_modified) {
TEST(YogaTest, copy_style_modified_same) {
const YGNodeRef node0 = YGNodeNew();
YGNodeStyleSetFlexDirection(node0, YGFlexDirectionRow);
YGNodeStyleSetMaxHeight(node0, 10);
YGNodeStyleSetMaxHeight(node0, YGPx(10));
YGNodeCalculateLayout(node0, YGUndefined, YGUndefined, YGDirectionLTR);
ASSERT_FALSE(YGNodeIsDirty(node0));
const YGNodeRef node1 = YGNodeNew();
YGNodeStyleSetFlexDirection(node1, YGFlexDirectionRow);
YGNodeStyleSetMaxHeight(node1, 10);
YGNodeStyleSetMaxHeight(node1, YGPx(10));
YGNodeCopyStyle(node0, node1);
ASSERT_FALSE(YGNodeIsDirty(node0));