diff --git a/csharp/tests/Facebook.Yoga/YGPercentageTest.cs b/csharp/tests/Facebook.Yoga/YGPercentageTest.cs
index 8c176f49..cca4e2ed 100644
--- a/csharp/tests/Facebook.Yoga/YGPercentageTest.cs
+++ b/csharp/tests/Facebook.Yoga/YGPercentageTest.cs
@@ -1059,5 +1059,92 @@ namespace Facebook.Yoga
Assert.AreEqual(100f, root_child2.LayoutHeight);
}
+ [Test]
+ public void Test_percentage_container_in_wrapping_container()
+ {
+ YogaConfig config = new YogaConfig();
+ config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.MinFlexFix, true);
+
+ YogaNode root = new YogaNode(config);
+ root.JustifyContent = YogaJustify.Center;
+ root.AlignItems = YogaAlign.Center;
+ root.Width = 200;
+ root.Height = 200;
+
+ YogaNode root_child0 = new YogaNode(config);
+ root.Insert(0, root_child0);
+
+ YogaNode root_child0_child0 = new YogaNode(config);
+ root_child0_child0.FlexDirection = YogaFlexDirection.Row;
+ root_child0_child0.JustifyContent = YogaJustify.Center;
+ root_child0_child0.Width = 100.Percent();
+ root_child0.Insert(0, root_child0_child0);
+
+ YogaNode root_child0_child0_child0 = new YogaNode(config);
+ root_child0_child0_child0.Width = 50;
+ root_child0_child0_child0.Height = 50;
+ root_child0_child0.Insert(0, root_child0_child0_child0);
+
+ YogaNode root_child0_child0_child1 = new YogaNode(config);
+ root_child0_child0_child1.Width = 50;
+ root_child0_child0_child1.Height = 50;
+ root_child0_child0.Insert(1, root_child0_child0_child1);
+ root.StyleDirection = YogaDirection.LTR;
+ root.CalculateLayout();
+
+ Assert.AreEqual(0f, root.LayoutX);
+ Assert.AreEqual(0f, root.LayoutY);
+ Assert.AreEqual(200f, root.LayoutWidth);
+ Assert.AreEqual(200f, root.LayoutHeight);
+
+ Assert.AreEqual(50f, root_child0.LayoutX);
+ Assert.AreEqual(75f, root_child0.LayoutY);
+ Assert.AreEqual(100f, root_child0.LayoutWidth);
+ Assert.AreEqual(50f, root_child0.LayoutHeight);
+
+ Assert.AreEqual(0f, root_child0_child0.LayoutX);
+ Assert.AreEqual(0f, root_child0_child0.LayoutY);
+ Assert.AreEqual(100f, root_child0_child0.LayoutWidth);
+ Assert.AreEqual(50f, root_child0_child0.LayoutHeight);
+
+ Assert.AreEqual(0f, root_child0_child0_child0.LayoutX);
+ Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
+ Assert.AreEqual(50f, root_child0_child0_child0.LayoutWidth);
+ Assert.AreEqual(50f, root_child0_child0_child0.LayoutHeight);
+
+ Assert.AreEqual(50f, root_child0_child0_child1.LayoutX);
+ Assert.AreEqual(0f, root_child0_child0_child1.LayoutY);
+ Assert.AreEqual(50f, root_child0_child0_child1.LayoutWidth);
+ Assert.AreEqual(50f, root_child0_child0_child1.LayoutHeight);
+
+ root.StyleDirection = YogaDirection.RTL;
+ root.CalculateLayout();
+
+ Assert.AreEqual(0f, root.LayoutX);
+ Assert.AreEqual(0f, root.LayoutY);
+ Assert.AreEqual(200f, root.LayoutWidth);
+ Assert.AreEqual(200f, root.LayoutHeight);
+
+ Assert.AreEqual(50f, root_child0.LayoutX);
+ Assert.AreEqual(75f, root_child0.LayoutY);
+ Assert.AreEqual(100f, root_child0.LayoutWidth);
+ Assert.AreEqual(50f, root_child0.LayoutHeight);
+
+ Assert.AreEqual(0f, root_child0_child0.LayoutX);
+ Assert.AreEqual(0f, root_child0_child0.LayoutY);
+ Assert.AreEqual(100f, root_child0_child0.LayoutWidth);
+ Assert.AreEqual(50f, root_child0_child0.LayoutHeight);
+
+ Assert.AreEqual(50f, root_child0_child0_child0.LayoutX);
+ Assert.AreEqual(0f, root_child0_child0_child0.LayoutY);
+ Assert.AreEqual(50f, root_child0_child0_child0.LayoutWidth);
+ Assert.AreEqual(50f, root_child0_child0_child0.LayoutHeight);
+
+ Assert.AreEqual(0f, root_child0_child0_child1.LayoutX);
+ Assert.AreEqual(0f, root_child0_child0_child1.LayoutY);
+ Assert.AreEqual(50f, root_child0_child0_child1.LayoutWidth);
+ Assert.AreEqual(50f, root_child0_child0_child1.LayoutHeight);
+ }
+
}
}
diff --git a/gentest/fixtures/YGPercentageTest.html b/gentest/fixtures/YGPercentageTest.html
index d86b04e7..05c33fee 100644
--- a/gentest/fixtures/YGPercentageTest.html
+++ b/gentest/fixtures/YGPercentageTest.html
@@ -85,9 +85,18 @@
-
-
+
+
+
\ No newline at end of file
+
+
diff --git a/java/tests/com/facebook/yoga/YGPercentageTest.java b/java/tests/com/facebook/yoga/YGPercentageTest.java
index 47b51622..f7780c1f 100644
--- a/java/tests/com/facebook/yoga/YGPercentageTest.java
+++ b/java/tests/com/facebook/yoga/YGPercentageTest.java
@@ -1040,4 +1040,90 @@ public class YGPercentageTest {
assertEquals(100f, root_child2.getLayoutHeight(), 0.0f);
}
+ @Test
+ public void test_percentage_container_in_wrapping_container() {
+ YogaConfig config = new YogaConfig();
+ config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_FLEX_FIX, true);
+
+ final YogaNode root = new YogaNode(config);
+ root.setJustifyContent(YogaJustify.CENTER);
+ root.setAlignItems(YogaAlign.CENTER);
+ root.setWidth(200f);
+ root.setHeight(200f);
+
+ final YogaNode root_child0 = new YogaNode(config);
+ root.addChildAt(root_child0, 0);
+
+ final YogaNode root_child0_child0 = new YogaNode(config);
+ root_child0_child0.setFlexDirection(YogaFlexDirection.ROW);
+ root_child0_child0.setJustifyContent(YogaJustify.CENTER);
+ root_child0_child0.setWidthPercent(100f);
+ root_child0.addChildAt(root_child0_child0, 0);
+
+ final YogaNode root_child0_child0_child0 = new YogaNode(config);
+ root_child0_child0_child0.setWidth(50f);
+ root_child0_child0_child0.setHeight(50f);
+ root_child0_child0.addChildAt(root_child0_child0_child0, 0);
+
+ final YogaNode root_child0_child0_child1 = new YogaNode(config);
+ root_child0_child0_child1.setWidth(50f);
+ root_child0_child0_child1.setHeight(50f);
+ root_child0_child0.addChildAt(root_child0_child0_child1, 1);
+ root.setDirection(YogaDirection.LTR);
+ root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
+
+ assertEquals(0f, root.getLayoutX(), 0.0f);
+ assertEquals(0f, root.getLayoutY(), 0.0f);
+ assertEquals(200f, root.getLayoutWidth(), 0.0f);
+ assertEquals(200f, root.getLayoutHeight(), 0.0f);
+
+ assertEquals(50f, root_child0.getLayoutX(), 0.0f);
+ assertEquals(75f, root_child0.getLayoutY(), 0.0f);
+ assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
+ assertEquals(50f, root_child0.getLayoutHeight(), 0.0f);
+
+ assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f);
+ assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f);
+ assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
+ assertEquals(50f, root_child0_child0.getLayoutHeight(), 0.0f);
+
+ assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
+ assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
+ assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
+ assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
+
+ assertEquals(50f, root_child0_child0_child1.getLayoutX(), 0.0f);
+ assertEquals(0f, root_child0_child0_child1.getLayoutY(), 0.0f);
+ assertEquals(50f, root_child0_child0_child1.getLayoutWidth(), 0.0f);
+ assertEquals(50f, root_child0_child0_child1.getLayoutHeight(), 0.0f);
+
+ root.setDirection(YogaDirection.RTL);
+ root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
+
+ assertEquals(0f, root.getLayoutX(), 0.0f);
+ assertEquals(0f, root.getLayoutY(), 0.0f);
+ assertEquals(200f, root.getLayoutWidth(), 0.0f);
+ assertEquals(200f, root.getLayoutHeight(), 0.0f);
+
+ assertEquals(50f, root_child0.getLayoutX(), 0.0f);
+ assertEquals(75f, root_child0.getLayoutY(), 0.0f);
+ assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
+ assertEquals(50f, root_child0.getLayoutHeight(), 0.0f);
+
+ assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f);
+ assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f);
+ assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
+ assertEquals(50f, root_child0_child0.getLayoutHeight(), 0.0f);
+
+ assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
+ assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
+ assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
+ assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
+
+ assertEquals(0f, root_child0_child0_child1.getLayoutX(), 0.0f);
+ assertEquals(0f, root_child0_child0_child1.getLayoutY(), 0.0f);
+ assertEquals(50f, root_child0_child0_child1.getLayoutWidth(), 0.0f);
+ assertEquals(50f, root_child0_child0_child1.getLayoutHeight(), 0.0f);
+ }
+
}
diff --git a/javascript/tests/Facebook.Yoga/YGPercentageTest.js b/javascript/tests/Facebook.Yoga/YGPercentageTest.js
index 22fb9d28..29c5053c 100644
--- a/javascript/tests/Facebook.Yoga/YGPercentageTest.js
+++ b/javascript/tests/Facebook.Yoga/YGPercentageTest.js
@@ -1083,3 +1083,92 @@ it("percent_within_flex_grow", function () {
}
}
});
+it("percentage_container_in_wrapping_container", function () {
+ Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_MIN_FLEX_FIX, true);
+
+ try {
+ var root = Yoga.Node.create(config);
+ root.setJustifyContent(Yoga.JUSTIFY_CENTER);
+ root.setAlignItems(Yoga.ALIGN_CENTER);
+ root.setWidth(200);
+ root.setHeight(200);
+
+ var root_child0 = Yoga.Node.create(config);
+ root.insertChild(root_child0, 0);
+
+ var root_child0_child0 = Yoga.Node.create(config);
+ root_child0_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
+ root_child0_child0.setJustifyContent(Yoga.JUSTIFY_CENTER);
+ root_child0_child0.setWidth("100%");
+ root_child0.insertChild(root_child0_child0, 0);
+
+ var root_child0_child0_child0 = Yoga.Node.create(config);
+ root_child0_child0_child0.setWidth(50);
+ root_child0_child0_child0.setHeight(50);
+ root_child0_child0.insertChild(root_child0_child0_child0, 0);
+
+ var root_child0_child0_child1 = Yoga.Node.create(config);
+ root_child0_child0_child1.setWidth(50);
+ root_child0_child0_child1.setHeight(50);
+ root_child0_child0.insertChild(root_child0_child0_child1, 1);
+ root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
+
+ console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
+ console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
+ console.assert(200 === root.getComputedWidth(), "200 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
+ console.assert(200 === root.getComputedHeight(), "200 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
+
+ console.assert(50 === root_child0.getComputedLeft(), "50 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
+ console.assert(75 === root_child0.getComputedTop(), "75 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
+ console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
+ console.assert(50 === root_child0.getComputedHeight(), "50 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
+
+ console.assert(0 === root_child0_child0.getComputedLeft(), "0 === root_child0_child0.getComputedLeft() (" + root_child0_child0.getComputedLeft() + ")");
+ console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
+ console.assert(100 === root_child0_child0.getComputedWidth(), "100 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
+ console.assert(50 === root_child0_child0.getComputedHeight(), "50 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
+
+ console.assert(0 === root_child0_child0_child0.getComputedLeft(), "0 === root_child0_child0_child0.getComputedLeft() (" + root_child0_child0_child0.getComputedLeft() + ")");
+ console.assert(0 === root_child0_child0_child0.getComputedTop(), "0 === root_child0_child0_child0.getComputedTop() (" + root_child0_child0_child0.getComputedTop() + ")");
+ console.assert(50 === root_child0_child0_child0.getComputedWidth(), "50 === root_child0_child0_child0.getComputedWidth() (" + root_child0_child0_child0.getComputedWidth() + ")");
+ console.assert(50 === root_child0_child0_child0.getComputedHeight(), "50 === root_child0_child0_child0.getComputedHeight() (" + root_child0_child0_child0.getComputedHeight() + ")");
+
+ console.assert(50 === root_child0_child0_child1.getComputedLeft(), "50 === root_child0_child0_child1.getComputedLeft() (" + root_child0_child0_child1.getComputedLeft() + ")");
+ console.assert(0 === root_child0_child0_child1.getComputedTop(), "0 === root_child0_child0_child1.getComputedTop() (" + root_child0_child0_child1.getComputedTop() + ")");
+ console.assert(50 === root_child0_child0_child1.getComputedWidth(), "50 === root_child0_child0_child1.getComputedWidth() (" + root_child0_child0_child1.getComputedWidth() + ")");
+ console.assert(50 === root_child0_child0_child1.getComputedHeight(), "50 === root_child0_child0_child1.getComputedHeight() (" + root_child0_child0_child1.getComputedHeight() + ")");
+
+ root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
+
+ console.assert(0 === root.getComputedLeft(), "0 === root.getComputedLeft() (" + root.getComputedLeft() + ")");
+ console.assert(0 === root.getComputedTop(), "0 === root.getComputedTop() (" + root.getComputedTop() + ")");
+ console.assert(200 === root.getComputedWidth(), "200 === root.getComputedWidth() (" + root.getComputedWidth() + ")");
+ console.assert(200 === root.getComputedHeight(), "200 === root.getComputedHeight() (" + root.getComputedHeight() + ")");
+
+ console.assert(50 === root_child0.getComputedLeft(), "50 === root_child0.getComputedLeft() (" + root_child0.getComputedLeft() + ")");
+ console.assert(75 === root_child0.getComputedTop(), "75 === root_child0.getComputedTop() (" + root_child0.getComputedTop() + ")");
+ console.assert(100 === root_child0.getComputedWidth(), "100 === root_child0.getComputedWidth() (" + root_child0.getComputedWidth() + ")");
+ console.assert(50 === root_child0.getComputedHeight(), "50 === root_child0.getComputedHeight() (" + root_child0.getComputedHeight() + ")");
+
+ console.assert(0 === root_child0_child0.getComputedLeft(), "0 === root_child0_child0.getComputedLeft() (" + root_child0_child0.getComputedLeft() + ")");
+ console.assert(0 === root_child0_child0.getComputedTop(), "0 === root_child0_child0.getComputedTop() (" + root_child0_child0.getComputedTop() + ")");
+ console.assert(100 === root_child0_child0.getComputedWidth(), "100 === root_child0_child0.getComputedWidth() (" + root_child0_child0.getComputedWidth() + ")");
+ console.assert(50 === root_child0_child0.getComputedHeight(), "50 === root_child0_child0.getComputedHeight() (" + root_child0_child0.getComputedHeight() + ")");
+
+ console.assert(50 === root_child0_child0_child0.getComputedLeft(), "50 === root_child0_child0_child0.getComputedLeft() (" + root_child0_child0_child0.getComputedLeft() + ")");
+ console.assert(0 === root_child0_child0_child0.getComputedTop(), "0 === root_child0_child0_child0.getComputedTop() (" + root_child0_child0_child0.getComputedTop() + ")");
+ console.assert(50 === root_child0_child0_child0.getComputedWidth(), "50 === root_child0_child0_child0.getComputedWidth() (" + root_child0_child0_child0.getComputedWidth() + ")");
+ console.assert(50 === root_child0_child0_child0.getComputedHeight(), "50 === root_child0_child0_child0.getComputedHeight() (" + root_child0_child0_child0.getComputedHeight() + ")");
+
+ console.assert(0 === root_child0_child0_child1.getComputedLeft(), "0 === root_child0_child0_child1.getComputedLeft() (" + root_child0_child0_child1.getComputedLeft() + ")");
+ console.assert(0 === root_child0_child0_child1.getComputedTop(), "0 === root_child0_child0_child1.getComputedTop() (" + root_child0_child0_child1.getComputedTop() + ")");
+ console.assert(50 === root_child0_child0_child1.getComputedWidth(), "50 === root_child0_child0_child1.getComputedWidth() (" + root_child0_child0_child1.getComputedWidth() + ")");
+ console.assert(50 === root_child0_child0_child1.getComputedHeight(), "50 === root_child0_child0_child1.getComputedHeight() (" + root_child0_child0_child1.getComputedHeight() + ")");
+ } finally {
+ if (typeof root !== "undefined") {
+ root.freeRecursive();
+ }
+
+ Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_MIN_FLEX_FIX, false);
+ }
+});
diff --git a/tests/YGPercentageTest.cpp b/tests/YGPercentageTest.cpp
index d4e5bf04..6d326320 100644
--- a/tests/YGPercentageTest.cpp
+++ b/tests/YGPercentageTest.cpp
@@ -1053,3 +1053,90 @@ TEST(YogaTest, percent_within_flex_grow) {
YGConfigFree(config);
}
+
+TEST(YogaTest, percentage_container_in_wrapping_container) {
+ const YGConfigRef config = YGConfigNew();
+ YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureMinFlexFix, true);
+
+ const YGNodeRef root = YGNodeNewWithConfig(config);
+ YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
+ YGNodeStyleSetAlignItems(root, YGAlignCenter);
+ YGNodeStyleSetWidth(root, 200);
+ YGNodeStyleSetHeight(root, 200);
+
+ const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
+ YGNodeInsertChild(root, root_child0, 0);
+
+ const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
+ YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow);
+ YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter);
+ YGNodeStyleSetWidthPercent(root_child0_child0, 100);
+ YGNodeInsertChild(root_child0, root_child0_child0, 0);
+
+ const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
+ YGNodeStyleSetWidth(root_child0_child0_child0, 50);
+ YGNodeStyleSetHeight(root_child0_child0_child0, 50);
+ YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
+
+ const YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config);
+ YGNodeStyleSetWidth(root_child0_child0_child1, 50);
+ YGNodeStyleSetHeight(root_child0_child0_child1, 50);
+ YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1);
+ YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
+
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root));
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root));
+ ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root));
+ ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root));
+
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0));
+ ASSERT_FLOAT_EQ(75, YGNodeLayoutGetTop(root_child0));
+ ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0));
+
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0));
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0));
+ ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0));
+
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child0));
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0));
+
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child1));
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child1));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child1));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child1));
+
+ YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
+
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root));
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root));
+ ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root));
+ ASSERT_FLOAT_EQ(200, YGNodeLayoutGetHeight(root));
+
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0));
+ ASSERT_FLOAT_EQ(75, YGNodeLayoutGetTop(root_child0));
+ ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0));
+
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0));
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0));
+ ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0_child0));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0));
+
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetLeft(root_child0_child0_child0));
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child0));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child0));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child0));
+
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0_child1));
+ ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0_child1));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetWidth(root_child0_child0_child1));
+ ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0_child0_child1));
+
+ YGNodeFreeRecursive(root);
+
+ YGConfigFree(config);
+}