Fix misc-misplaced-const warnings in Yoga tests (#1677)

Summary:
Pull Request resolved: https://github.com/facebook/yoga/pull/1677

We have Clang Tidy warnings enabled internally, that will flag `const YG*Ref` as misleading, as a const pointer to non-const, instead of non-const pointer to const.

Let's remove all the misleading const in existing tests, and generated tests.

Reviewed By: joevilches

Differential Revision: D59335968

fbshipit-source-id: c66af878904ba7900f8ffcd99162968d90f8e5c7
This commit is contained in:
Nick Gerleman
2024-07-03 17:30:10 -07:00
committed by Facebook GitHub Bot
parent e4fe14ab3e
commit 5009f5c1ac
44 changed files with 2785 additions and 2797 deletions

View File

@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* clang-format off
* @generated SignedSource<<399e1b13d86b9e83530955c954462beb>>
* @generated SignedSource<<e3f7431374baac61d52853a9bbf348f0>>
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGRoundingTest.html
*/
@@ -14,23 +14,23 @@
#include "../util/TestUtil.h"
TEST(YogaTest, rounding_flex_basis_flex_grow_row_width_of_100) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 100);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeInsertChild(root, root_child2, 2);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
@@ -83,31 +83,31 @@ TEST(YogaTest, rounding_flex_basis_flex_grow_row_width_of_100) {
}
TEST(YogaTest, rounding_flex_basis_flex_grow_row_prime_number_width) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 113);
YGNodeStyleSetHeight(root, 100);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeInsertChild(root, root_child2, 2);
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child3, 1);
YGNodeInsertChild(root, root_child3, 3);
const YGNodeRef root_child4 = YGNodeNewWithConfig(config);
YGNodeRef root_child4 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child4, 1);
YGNodeInsertChild(root, root_child4, 4);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
@@ -180,24 +180,24 @@ TEST(YogaTest, rounding_flex_basis_flex_grow_row_prime_number_width) {
}
TEST(YogaTest, rounding_flex_basis_flex_shrink_row) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 101);
YGNodeStyleSetHeight(root, 100);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexShrink(root_child0, 1);
YGNodeStyleSetFlexBasis(root_child0, 100);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexBasis(root_child1, 25);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexBasis(root_child2, 25);
YGNodeInsertChild(root, root_child2, 2);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
@@ -250,25 +250,25 @@ TEST(YogaTest, rounding_flex_basis_flex_shrink_row) {
}
TEST(YogaTest, rounding_flex_basis_overrides_main_size) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 113);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetFlexBasis(root_child0, 50);
YGNodeStyleSetHeight(root_child0, 20);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetHeight(root_child1, 10);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeStyleSetHeight(root_child2, 10);
YGNodeInsertChild(root, root_child2, 2);
@@ -322,25 +322,25 @@ TEST(YogaTest, rounding_flex_basis_overrides_main_size) {
}
TEST(YogaTest, rounding_total_fractial) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 87.4f);
YGNodeStyleSetHeight(root, 113.4f);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 0.7f);
YGNodeStyleSetFlexBasis(root_child0, 50.3f);
YGNodeStyleSetHeight(root_child0, 20.3f);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1.6f);
YGNodeStyleSetHeight(root_child1, 10);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1.1f);
YGNodeStyleSetHeight(root_child2, 10.7f);
YGNodeInsertChild(root, root_child2, 2);
@@ -394,39 +394,39 @@ TEST(YogaTest, rounding_total_fractial) {
}
TEST(YogaTest, rounding_total_fractial_nested) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 87.4f);
YGNodeStyleSetHeight(root, 113.4f);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 0.7f);
YGNodeStyleSetFlexBasis(root_child0, 50.3f);
YGNodeStyleSetHeight(root_child0, 20.3f);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
YGNodeStyleSetFlexBasis(root_child0_child0, 0.3f);
YGNodeStyleSetPosition(root_child0_child0, YGEdgeBottom, 13.3f);
YGNodeStyleSetHeight(root_child0_child0, 9.9f);
YGNodeInsertChild(root_child0, root_child0_child0, 0);
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0_child1, 4);
YGNodeStyleSetFlexBasis(root_child0_child1, 0.3f);
YGNodeStyleSetPosition(root_child0_child1, YGEdgeTop, 13.3f);
YGNodeStyleSetHeight(root_child0_child1, 1.1f);
YGNodeInsertChild(root_child0, root_child0_child1, 1);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1.6f);
YGNodeStyleSetHeight(root_child1, 10);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1.1f);
YGNodeStyleSetHeight(root_child2, 10.7f);
YGNodeInsertChild(root, root_child2, 2);
@@ -500,25 +500,25 @@ TEST(YogaTest, rounding_total_fractial_nested) {
}
TEST(YogaTest, rounding_fractial_input_1) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 113.4f);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetFlexBasis(root_child0, 50);
YGNodeStyleSetHeight(root_child0, 20);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetHeight(root_child1, 10);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeStyleSetHeight(root_child2, 10);
YGNodeInsertChild(root, root_child2, 2);
@@ -572,25 +572,25 @@ TEST(YogaTest, rounding_fractial_input_1) {
}
TEST(YogaTest, rounding_fractial_input_2) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 113.6f);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetFlexBasis(root_child0, 50);
YGNodeStyleSetHeight(root_child0, 20);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetHeight(root_child1, 10);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeStyleSetHeight(root_child2, 10);
YGNodeInsertChild(root, root_child2, 2);
@@ -644,26 +644,26 @@ TEST(YogaTest, rounding_fractial_input_2) {
}
TEST(YogaTest, rounding_fractial_input_3) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetPosition(root, YGEdgeTop, 0.3f);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 113.4f);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetFlexBasis(root_child0, 50);
YGNodeStyleSetHeight(root_child0, 20);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetHeight(root_child1, 10);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeStyleSetHeight(root_child2, 10);
YGNodeInsertChild(root, root_child2, 2);
@@ -717,26 +717,26 @@ TEST(YogaTest, rounding_fractial_input_3) {
}
TEST(YogaTest, rounding_fractial_input_4) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetPosition(root, YGEdgeTop, 0.7f);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 113.4f);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetFlexBasis(root_child0, 50);
YGNodeStyleSetHeight(root_child0, 20);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetHeight(root_child1, 10);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeStyleSetHeight(root_child2, 10);
YGNodeInsertChild(root, root_child2, 2);
@@ -790,29 +790,29 @@ TEST(YogaTest, rounding_fractial_input_4) {
}
TEST(YogaTest, rounding_inner_node_controversy_horizontal) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 320);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetHeight(root_child0, 10);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetHeight(root_child1, 10);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1_child0, 1);
YGNodeStyleSetHeight(root_child1_child0, 10);
YGNodeInsertChild(root_child1, root_child1_child0, 0);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeStyleSetHeight(root_child2, 10);
YGNodeInsertChild(root, root_child2, 2);
@@ -876,28 +876,28 @@ TEST(YogaTest, rounding_inner_node_controversy_horizontal) {
}
TEST(YogaTest, rounding_inner_node_controversy_vertical) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetHeight(root, 320);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetWidth(root_child0, 10);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetWidth(root_child1, 10);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1_child0, 1);
YGNodeStyleSetWidth(root_child1_child0, 10);
YGNodeInsertChild(root_child1, root_child1_child0, 0);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeStyleSetWidth(root_child2, 10);
YGNodeInsertChild(root, root_child2, 2);
@@ -961,45 +961,45 @@ TEST(YogaTest, rounding_inner_node_controversy_vertical) {
}
TEST(YogaTest, rounding_inner_node_controversy_combined) {
const YGConfigRef config = YGConfigNew();
YGConfigRef config = YGConfigNew();
const YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeRef root = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
YGNodeStyleSetWidth(root, 640);
YGNodeStyleSetHeight(root, 320);
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child0, 1);
YGNodeStyleSetHeightPercent(root_child0, 100);
YGNodeInsertChild(root, root_child0, 0);
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1, 1);
YGNodeStyleSetHeightPercent(root_child1, 100);
YGNodeInsertChild(root, root_child1, 1);
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1_child0, 1);
YGNodeStyleSetWidthPercent(root_child1_child0, 100);
YGNodeInsertChild(root_child1, root_child1_child0, 0);
const YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1_child1, 1);
YGNodeStyleSetWidthPercent(root_child1_child1, 100);
YGNodeInsertChild(root_child1, root_child1_child1, 1);
const YGNodeRef root_child1_child1_child0 = YGNodeNewWithConfig(config);
YGNodeRef root_child1_child1_child0 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1_child1_child0, 1);
YGNodeStyleSetWidthPercent(root_child1_child1_child0, 100);
YGNodeInsertChild(root_child1_child1, root_child1_child1_child0, 0);
const YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child1_child2, 1);
YGNodeStyleSetWidthPercent(root_child1_child2, 100);
YGNodeInsertChild(root_child1, root_child1_child2, 2);
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
YGNodeStyleSetFlexGrow(root_child2, 1);
YGNodeStyleSetHeightPercent(root_child2, 100);
YGNodeInsertChild(root, root_child2, 2);