diff --git a/tests/YGStyleTest.cpp b/tests/YGStyleTest.cpp index 65747337..bc1d13fc 100644 --- a/tests/YGStyleTest.cpp +++ b/tests/YGStyleTest.cpp @@ -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));