Move configuration to new YGConfig and pass them down to CalculateLayout

Summary:
Move configuration to new ```YGConfig``` and pass them down to CalculateLayout. See #418 .

Adds ```YGConfigNew()``` + ```YGConfigFree```, and changed ```YGSetExperimentalFeatureEnabled``` to use the config.

New function for calculation is ```YGNodeCalculateLayoutWithConfig```.
Closes https://github.com/facebook/yoga/pull/432

Reviewed By: astreet

Differential Revision: D4611359

Pulled By: emilsjolander

fbshipit-source-id: a1332f0e1b21cec02129dd021ee57408449e10b0
This commit is contained in:
Lukas Wöhrl
2017-03-01 09:19:55 -08:00
committed by Facebook Github Bot
parent 8668e43f6d
commit 37c48257ae
89 changed files with 4536 additions and 3049 deletions

View File

@@ -13,11 +13,11 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("absolute_layout_width_height_start_top", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_START, 10);
root_child0.setPosition(Yoga.EDGE_TOP, 10);
@@ -55,11 +55,11 @@ it("absolute_layout_width_height_start_top", function () {
});
it("absolute_layout_width_height_end_bottom", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_END, 10);
root_child0.setPosition(Yoga.EDGE_BOTTOM, 10);
@@ -97,11 +97,11 @@ it("absolute_layout_width_height_end_bottom", function () {
});
it("absolute_layout_start_top_end_bottom", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_START, 10);
root_child0.setPosition(Yoga.EDGE_TOP, 10);
@@ -139,11 +139,11 @@ it("absolute_layout_start_top_end_bottom", function () {
});
it("absolute_layout_width_height_start_top_end_bottom", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_START, 10);
root_child0.setPosition(Yoga.EDGE_TOP, 10);
@@ -183,19 +183,19 @@ it("absolute_layout_width_height_start_top_end_bottom", function () {
});
it("do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setOverflow(Yoga.OVERFLOW_HIDDEN);
root.setWidth(50);
root.setHeight(50);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_START, 0);
root_child0.setPosition(Yoga.EDGE_TOP, 0);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(100);
root_child0_child0.setHeight(100);
root_child0.insertChild(root_child0_child0, 0);
@@ -240,7 +240,7 @@ it("do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent
});
it("absolute_layout_within_border", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setMargin(Yoga.EDGE_LEFT, 10);
root.setMargin(Yoga.EDGE_TOP, 10);
root.setMargin(Yoga.EDGE_RIGHT, 10);
@@ -256,7 +256,7 @@ it("absolute_layout_within_border", function () {
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_LEFT, 0);
root_child0.setPosition(Yoga.EDGE_TOP, 0);
@@ -264,7 +264,7 @@ it("absolute_layout_within_border", function () {
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child1.setPosition(Yoga.EDGE_RIGHT, 0);
root_child1.setPosition(Yoga.EDGE_BOTTOM, 0);
@@ -312,14 +312,14 @@ it("absolute_layout_within_border", function () {
});
it("absolute_layout_align_items_and_justify_content_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setFlexGrow(1);
root.setWidth(110);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setWidth(60);
root_child0.setHeight(40);
@@ -355,14 +355,14 @@ it("absolute_layout_align_items_and_justify_content_center", function () {
});
it("absolute_layout_align_items_and_justify_content_flex_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
root.setAlignItems(Yoga.ALIGN_FLEX_END);
root.setFlexGrow(1);
root.setWidth(110);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setWidth(60);
root_child0.setHeight(40);
@@ -398,13 +398,13 @@ it("absolute_layout_align_items_and_justify_content_flex_end", function () {
});
it("absolute_layout_justify_content_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setFlexGrow(1);
root.setWidth(110);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setWidth(60);
root_child0.setHeight(40);
@@ -440,13 +440,13 @@ it("absolute_layout_justify_content_center", function () {
});
it("absolute_layout_align_items_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setFlexGrow(1);
root.setWidth(110);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setWidth(60);
root_child0.setHeight(40);
@@ -482,12 +482,12 @@ it("absolute_layout_align_items_center", function () {
});
it("absolute_layout_align_items_center_on_child_only", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexGrow(1);
root.setWidth(110);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setAlignSelf(Yoga.ALIGN_CENTER);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setWidth(60);
@@ -524,14 +524,14 @@ it("absolute_layout_align_items_center_on_child_only", function () {
});
it("absolute_layout_align_items_and_justify_content_center_and_top_position", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setFlexGrow(1);
root.setWidth(110);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_TOP, 10);
root_child0.setWidth(60);
@@ -568,14 +568,14 @@ it("absolute_layout_align_items_and_justify_content_center_and_top_position", fu
});
it("absolute_layout_align_items_and_justify_content_center_and_bottom_position", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setFlexGrow(1);
root.setWidth(110);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_BOTTOM, 10);
root_child0.setWidth(60);
@@ -612,14 +612,14 @@ it("absolute_layout_align_items_and_justify_content_center_and_bottom_position",
});
it("absolute_layout_align_items_and_justify_content_center_and_left_position", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setFlexGrow(1);
root.setWidth(110);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_LEFT, 5);
root_child0.setWidth(60);
@@ -656,14 +656,14 @@ it("absolute_layout_align_items_and_justify_content_center_and_left_position", f
});
it("absolute_layout_align_items_and_justify_content_center_and_right_position", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setFlexGrow(1);
root.setWidth(110);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_RIGHT, 5);
root_child0.setWidth(60);

View File

@@ -13,33 +13,33 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("align_content_flex_start", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(130);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root_child3.setHeight(10);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root_child4.setHeight(10);
root.insertChild(root_child4, 4);
@@ -114,30 +114,30 @@ it("align_content_flex_start", function () {
});
it("align_content_flex_start_without_height_on_children", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root_child3.setHeight(10);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -211,36 +211,36 @@ it("align_content_flex_start_without_height_on_children", function () {
});
it("align_content_flex_start_with_flex", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
root.setHeight(120);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("0%");
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setFlexBasis("0%");
root_child1.setWidth(50);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setFlexGrow(1);
root_child3.setFlexShrink(1);
root_child3.setFlexBasis("0%");
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -314,33 +314,33 @@ it("align_content_flex_start_with_flex", function () {
});
it("align_content_flex_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignContent(Yoga.ALIGN_FLEX_END);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root_child3.setHeight(10);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root_child4.setHeight(10);
root.insertChild(root_child4, 4);
@@ -415,29 +415,29 @@ it("align_content_flex_end", function () {
});
it("align_content_stretch", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -511,34 +511,34 @@ it("align_content_stretch", function () {
});
it("align_content_spacebetween", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_SPACE_BETWEEN);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(130);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root_child3.setHeight(10);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root_child4.setHeight(10);
root.insertChild(root_child4, 4);
@@ -613,34 +613,34 @@ it("align_content_spacebetween", function () {
});
it("align_content_spacearound", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_SPACE_AROUND);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(140);
root.setHeight(120);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root_child3.setHeight(10);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root_child4.setHeight(10);
root.insertChild(root_child4, 4);
@@ -715,30 +715,30 @@ it("align_content_spacearound", function () {
});
it("align_content_stretch_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -812,36 +812,36 @@ it("align_content_stretch_row", function () {
});
it("align_content_stretch_row_with_children", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setFlexGrow(1);
root_child0_child0.setFlexShrink(1);
root_child0_child0.setFlexBasis("0%");
root_child0.insertChild(root_child0_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -925,36 +925,36 @@ it("align_content_stretch_row_with_children", function () {
});
it("align_content_stretch_row_with_flex", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setFlexShrink(1);
root_child1.setFlexBasis("0%");
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setFlexGrow(1);
root_child3.setFlexShrink(1);
root_child3.setFlexBasis("0%");
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -1028,35 +1028,35 @@ it("align_content_stretch_row_with_flex", function () {
});
it("align_content_stretch_row_with_flex_no_shrink", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setFlexShrink(1);
root_child1.setFlexBasis("0%");
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setFlexGrow(1);
root_child3.setFlexBasis("0%");
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -1130,18 +1130,18 @@ it("align_content_stretch_row_with_flex_no_shrink", function () {
});
it("align_content_stretch_row_with_margin", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setMargin(Yoga.EDGE_LEFT, 10);
root_child1.setMargin(Yoga.EDGE_TOP, 10);
root_child1.setMargin(Yoga.EDGE_RIGHT, 10);
@@ -1149,11 +1149,11 @@ it("align_content_stretch_row_with_margin", function () {
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setMargin(Yoga.EDGE_LEFT, 10);
root_child3.setMargin(Yoga.EDGE_TOP, 10);
root_child3.setMargin(Yoga.EDGE_RIGHT, 10);
@@ -1161,7 +1161,7 @@ it("align_content_stretch_row_with_margin", function () {
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -1235,18 +1235,18 @@ it("align_content_stretch_row_with_margin", function () {
});
it("align_content_stretch_row_with_padding", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setPadding(Yoga.EDGE_LEFT, 10);
root_child1.setPadding(Yoga.EDGE_TOP, 10);
root_child1.setPadding(Yoga.EDGE_RIGHT, 10);
@@ -1254,11 +1254,11 @@ it("align_content_stretch_row_with_padding", function () {
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setPadding(Yoga.EDGE_LEFT, 10);
root_child3.setPadding(Yoga.EDGE_TOP, 10);
root_child3.setPadding(Yoga.EDGE_RIGHT, 10);
@@ -1266,7 +1266,7 @@ it("align_content_stretch_row_with_padding", function () {
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -1340,18 +1340,18 @@ it("align_content_stretch_row_with_padding", function () {
});
it("align_content_stretch_row_with_single_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -1395,31 +1395,31 @@ it("align_content_stretch_row_with_single_row", function () {
});
it("align_content_stretch_row_with_fixed_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(60);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -1493,31 +1493,31 @@ it("align_content_stretch_row_with_fixed_height", function () {
});
it("align_content_stretch_row_with_max_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setMaxHeight(20);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -1591,31 +1591,31 @@ it("align_content_stretch_row_with_max_height", function () {
});
it("align_content_stretch_row_with_min_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setMinHeight(80);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -1689,38 +1689,38 @@ it("align_content_stretch_row_with_min_height", function () {
});
it("align_content_stretch_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
root.setHeight(150);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setFlexGrow(1);
root_child0_child0.setFlexShrink(1);
root_child0_child0.setFlexBasis("0%");
root_child0.insertChild(root_child0_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setFlexShrink(1);
root_child1.setFlexBasis("0%");
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setHeight(50);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setHeight(50);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setHeight(50);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -1804,10 +1804,10 @@ it("align_content_stretch_column", function () {
});
it("align_content_stretch_is_not_overriding_align_items", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignContent(Yoga.ALIGN_STRETCH);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child0.setAlignContent(Yoga.ALIGN_STRETCH);
root_child0.setAlignItems(Yoga.ALIGN_CENTER);
@@ -1815,7 +1815,7 @@ it("align_content_stretch_is_not_overriding_align_items", function () {
root_child0.setHeight(100);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setAlignContent(Yoga.ALIGN_STRETCH);
root_child0_child0.setWidth(10);
root_child0_child0.setHeight(10);

View File

@@ -13,11 +13,11 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("align_items_stretch", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -51,12 +51,12 @@ it("align_items_stretch", function () {
});
it("align_items_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
@@ -91,12 +91,12 @@ it("align_items_center", function () {
});
it("align_items_flex_start", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
@@ -131,12 +131,12 @@ it("align_items_flex_start", function () {
});
it("align_items_flex_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_FLEX_END);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
@@ -171,18 +171,18 @@ it("align_items_flex_end", function () {
});
it("align_baseline", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
@@ -227,23 +227,23 @@ it("align_baseline", function () {
});
it("align_baseline_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
@@ -298,40 +298,40 @@ it("align_baseline_child", function () {
});
it("align_baseline_child_multiline", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(60);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child1.setFlexWrap(Yoga.WRAP_WRAP);
root_child1.setWidth(50);
root_child1.setHeight(25);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(25);
root_child1_child0.setHeight(20);
root_child1.insertChild(root_child1_child0, 0);
var root_child1_child1 = Yoga.Node.create();
var root_child1_child1 = Yoga.Node.create(config);
root_child1_child1.setWidth(25);
root_child1_child1.setHeight(10);
root_child1.insertChild(root_child1_child1, 1);
var root_child1_child2 = Yoga.Node.create();
var root_child1_child2 = Yoga.Node.create(config);
root_child1_child2.setWidth(25);
root_child1_child2.setHeight(20);
root_child1.insertChild(root_child1_child2, 2);
var root_child1_child3 = Yoga.Node.create();
var root_child1_child3 = Yoga.Node.create(config);
root_child1_child3.setWidth(25);
root_child1_child3.setHeight(10);
root_child1.insertChild(root_child1_child3, 3);
@@ -416,41 +416,41 @@ it("align_baseline_child_multiline", function () {
});
it("align_baseline_child_multiline_override", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(60);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child1.setFlexWrap(Yoga.WRAP_WRAP);
root_child1.setWidth(50);
root_child1.setHeight(25);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(25);
root_child1_child0.setHeight(20);
root_child1.insertChild(root_child1_child0, 0);
var root_child1_child1 = Yoga.Node.create();
var root_child1_child1 = Yoga.Node.create(config);
root_child1_child1.setAlignSelf(Yoga.ALIGN_BASELINE);
root_child1_child1.setWidth(25);
root_child1_child1.setHeight(10);
root_child1.insertChild(root_child1_child1, 1);
var root_child1_child2 = Yoga.Node.create();
var root_child1_child2 = Yoga.Node.create(config);
root_child1_child2.setWidth(25);
root_child1_child2.setHeight(20);
root_child1.insertChild(root_child1_child2, 2);
var root_child1_child3 = Yoga.Node.create();
var root_child1_child3 = Yoga.Node.create(config);
root_child1_child3.setAlignSelf(Yoga.ALIGN_BASELINE);
root_child1_child3.setWidth(25);
root_child1_child3.setHeight(10);
@@ -536,40 +536,40 @@ it("align_baseline_child_multiline_override", function () {
});
it("align_baseline_child_multiline_no_override_on_secondline", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(60);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child1.setFlexWrap(Yoga.WRAP_WRAP);
root_child1.setWidth(50);
root_child1.setHeight(25);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(25);
root_child1_child0.setHeight(20);
root_child1.insertChild(root_child1_child0, 0);
var root_child1_child1 = Yoga.Node.create();
var root_child1_child1 = Yoga.Node.create(config);
root_child1_child1.setWidth(25);
root_child1_child1.setHeight(10);
root_child1.insertChild(root_child1_child1, 1);
var root_child1_child2 = Yoga.Node.create();
var root_child1_child2 = Yoga.Node.create(config);
root_child1_child2.setWidth(25);
root_child1_child2.setHeight(20);
root_child1.insertChild(root_child1_child2, 2);
var root_child1_child3 = Yoga.Node.create();
var root_child1_child3 = Yoga.Node.create(config);
root_child1_child3.setAlignSelf(Yoga.ALIGN_BASELINE);
root_child1_child3.setWidth(25);
root_child1_child3.setHeight(10);
@@ -655,24 +655,24 @@ it("align_baseline_child_multiline_no_override_on_secondline", function () {
});
it("align_baseline_child_top", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPosition(Yoga.EDGE_TOP, 10);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
@@ -727,24 +727,24 @@ it("align_baseline_child_top", function () {
});
it("align_baseline_child_top2", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setPosition(Yoga.EDGE_TOP, 5);
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
@@ -799,28 +799,28 @@ it("align_baseline_child_top2", function () {
});
it("align_baseline_double_nested_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(50);
root_child0_child0.setHeight(20);
root_child0.insertChild(root_child0_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(15);
root_child1.insertChild(root_child1_child0, 0);
@@ -885,17 +885,17 @@ it("align_baseline_double_nested_child", function () {
});
it("align_baseline_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
@@ -940,13 +940,13 @@ it("align_baseline_column", function () {
});
it("align_baseline_child_margin", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_LEFT, 5);
root_child0.setMargin(Yoga.EDGE_TOP, 5);
root_child0.setMargin(Yoga.EDGE_RIGHT, 5);
@@ -955,12 +955,12 @@ it("align_baseline_child_margin", function () {
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setMargin(Yoga.EDGE_LEFT, 1);
root_child1_child0.setMargin(Yoga.EDGE_TOP, 1);
root_child1_child0.setMargin(Yoga.EDGE_RIGHT, 1);
@@ -1019,7 +1019,7 @@ it("align_baseline_child_margin", function () {
});
it("align_baseline_child_padding", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setPadding(Yoga.EDGE_LEFT, 5);
@@ -1029,12 +1029,12 @@ it("align_baseline_child_padding", function () {
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setPadding(Yoga.EDGE_LEFT, 5);
root_child1.setPadding(Yoga.EDGE_TOP, 5);
root_child1.setPadding(Yoga.EDGE_RIGHT, 5);
@@ -1043,7 +1043,7 @@ it("align_baseline_child_padding", function () {
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
@@ -1098,39 +1098,39 @@ it("align_baseline_child_padding", function () {
});
it("align_baseline_multiline", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(20);
root.insertChild(root_child2, 2);
var root_child2_child0 = Yoga.Node.create();
var root_child2_child0 = Yoga.Node.create(config);
root_child2_child0.setWidth(50);
root_child2_child0.setHeight(10);
root_child2.insertChild(root_child2_child0, 0);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root_child3.setHeight(50);
root.insertChild(root_child3, 3);
@@ -1215,38 +1215,38 @@ it("align_baseline_multiline", function () {
});
it("align_baseline_multiline_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(20);
root_child1_child0.setHeight(20);
root_child1.insertChild(root_child1_child0, 0);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(40);
root_child2.setHeight(70);
root.insertChild(root_child2, 2);
var root_child2_child0 = Yoga.Node.create();
var root_child2_child0 = Yoga.Node.create(config);
root_child2_child0.setWidth(10);
root_child2_child0.setHeight(10);
root_child2.insertChild(root_child2_child0, 0);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root_child3.setHeight(20);
root.insertChild(root_child3, 3);
@@ -1331,38 +1331,38 @@ it("align_baseline_multiline_column", function () {
});
it("align_baseline_multiline_column2", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(20);
root_child1_child0.setHeight(20);
root_child1.insertChild(root_child1_child0, 0);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(40);
root_child2.setHeight(70);
root.insertChild(root_child2, 2);
var root_child2_child0 = Yoga.Node.create();
var root_child2_child0 = Yoga.Node.create(config);
root_child2_child0.setWidth(10);
root_child2_child0.setHeight(10);
root_child2.insertChild(root_child2_child0, 0);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root_child3.setHeight(20);
root.insertChild(root_child3, 3);
@@ -1447,39 +1447,39 @@ it("align_baseline_multiline_column2", function () {
});
it("align_baseline_multiline_row_and_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_BASELINE);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(20);
root.insertChild(root_child2, 2);
var root_child2_child0 = Yoga.Node.create();
var root_child2_child0 = Yoga.Node.create(config);
root_child2_child0.setWidth(50);
root_child2_child0.setHeight(10);
root_child2.insertChild(root_child2_child0, 0);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(50);
root_child3.setHeight(20);
root.insertChild(root_child3, 3);

View File

@@ -13,11 +13,11 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("align_self_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setAlignSelf(Yoga.ALIGN_CENTER);
root_child0.setWidth(10);
root_child0.setHeight(10);
@@ -53,11 +53,11 @@ it("align_self_center", function () {
});
it("align_self_flex_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setAlignSelf(Yoga.ALIGN_FLEX_END);
root_child0.setWidth(10);
root_child0.setHeight(10);
@@ -93,11 +93,11 @@ it("align_self_flex_end", function () {
});
it("align_self_flex_start", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setAlignSelf(Yoga.ALIGN_FLEX_START);
root_child0.setWidth(10);
root_child0.setHeight(10);
@@ -133,12 +133,12 @@ it("align_self_flex_start", function () {
});
it("align_self_flex_end_override_flex_start", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setAlignSelf(Yoga.ALIGN_FLEX_END);
root_child0.setWidth(10);
root_child0.setHeight(10);
@@ -174,24 +174,24 @@ it("align_self_flex_end_override_flex_start", function () {
});
it("align_self_baseline", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setAlignSelf(Yoga.ALIGN_BASELINE);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setAlignSelf(Yoga.ALIGN_BASELINE);
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);

View File

@@ -13,7 +13,7 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("border_no_size", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setBorder(Yoga.EDGE_LEFT, 10);
root.setBorder(Yoga.EDGE_TOP, 10);
root.setBorder(Yoga.EDGE_RIGHT, 10);
@@ -39,13 +39,13 @@ it("border_no_size", function () {
});
it("border_container_match_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setBorder(Yoga.EDGE_LEFT, 10);
root.setBorder(Yoga.EDGE_TOP, 10);
root.setBorder(Yoga.EDGE_RIGHT, 10);
root.setBorder(Yoga.EDGE_BOTTOM, 10);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
@@ -80,7 +80,7 @@ it("border_container_match_child", function () {
});
it("border_flex_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setBorder(Yoga.EDGE_LEFT, 10);
root.setBorder(Yoga.EDGE_TOP, 10);
root.setBorder(Yoga.EDGE_RIGHT, 10);
@@ -88,7 +88,7 @@ it("border_flex_child", function () {
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
@@ -123,7 +123,7 @@ it("border_flex_child", function () {
});
it("border_stretch_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setBorder(Yoga.EDGE_LEFT, 10);
root.setBorder(Yoga.EDGE_TOP, 10);
root.setBorder(Yoga.EDGE_RIGHT, 10);
@@ -131,7 +131,7 @@ it("border_stretch_child", function () {
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -165,7 +165,7 @@ it("border_stretch_child", function () {
});
it("border_center_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setBorder(Yoga.EDGE_START, 10);
@@ -174,7 +174,7 @@ it("border_center_child", function () {
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);

View File

@@ -13,9 +13,9 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("wrap_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(100);
root_child0.setHeight(100);
root.insertChild(root_child0, 0);
@@ -50,12 +50,12 @@ it("wrap_child", function () {
});
it("wrap_grandchild", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(100);
root_child0_child0.setHeight(100);
root_child0.insertChild(root_child0_child0, 0);

View File

@@ -13,16 +13,16 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("display_none", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setDisplay(Yoga.DISPLAY_NONE);
root.insertChild(root_child1, 1);
@@ -67,16 +67,16 @@ it("display_none", function () {
});
it("display_none_fixed_size", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(20);
root_child1.setHeight(20);
root_child1.setDisplay(Yoga.DISPLAY_NONE);
@@ -122,12 +122,12 @@ it("display_none_fixed_size", function () {
});
it("display_none_with_margin", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_LEFT, 10);
root_child0.setMargin(Yoga.EDGE_TOP, 10);
root_child0.setMargin(Yoga.EDGE_RIGHT, 10);
@@ -137,7 +137,7 @@ it("display_none_with_margin", function () {
root_child0.setDisplay(Yoga.DISPLAY_NONE);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -181,25 +181,25 @@ it("display_none_with_margin", function () {
});
it("display_none_with_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexShrink(1);
root_child0.setFlexBasis("0%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setFlexShrink(1);
root_child1.setFlexBasis("0%");
root_child1.setDisplay(Yoga.DISPLAY_NONE);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setFlexGrow(1);
root_child1_child0.setFlexShrink(1);
root_child1_child0.setFlexBasis("0%");
@@ -208,7 +208,7 @@ it("display_none_with_child", function () {
root_child1_child0.setMinHeight(0);
root_child1.insertChild(root_child1_child0, 0);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setFlexShrink(1);
root_child2.setFlexBasis("0%");
@@ -274,16 +274,16 @@ it("display_none_with_child", function () {
});
it("display_none_with_position", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setPosition(Yoga.EDGE_TOP, 10);
root_child1.setDisplay(Yoga.DISPLAY_NONE);

View File

@@ -13,18 +13,18 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("flex_direction_column_no_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -78,19 +78,19 @@ it("flex_direction_column_no_height", function () {
});
it("flex_direction_row_no_width", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -144,19 +144,19 @@ it("flex_direction_row_no_width", function () {
});
it("flex_direction_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -210,20 +210,20 @@ it("flex_direction_column", function () {
});
it("flex_direction_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -277,20 +277,20 @@ it("flex_direction_row", function () {
});
it("flex_direction_column_reverse", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_COLUMN_REVERSE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -344,20 +344,20 @@ it("flex_direction_column_reverse", function () {
});
it("flex_direction_row_reverse", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW_REVERSE);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);

View File

@@ -13,16 +13,16 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("flex_basis_flex_grow_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -66,17 +66,17 @@ it("flex_basis_flex_grow_column", function () {
});
it("flex_basis_flex_grow_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -120,16 +120,16 @@ it("flex_basis_flex_grow_row", function () {
});
it("flex_basis_flex_shrink_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexShrink(1);
root_child0.setFlexBasis(100);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexBasis(50);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -173,17 +173,17 @@ it("flex_basis_flex_shrink_column", function () {
});
it("flex_basis_flex_shrink_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexShrink(1);
root_child0.setFlexBasis(100);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexBasis(50);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -227,21 +227,21 @@ it("flex_basis_flex_shrink_row", function () {
});
it("flex_shrink_to_zero", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setHeight(75);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexShrink(1);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(50);
root.insertChild(root_child2, 2);
@@ -296,22 +296,22 @@ it("flex_shrink_to_zero", function () {
});
it("flex_basis_overrides_main_size", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
@@ -366,14 +366,14 @@ it("flex_basis_overrides_main_size", function () {
});
it("flex_grow_shrink_at_most", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setFlexGrow(1);
root_child0_child0.setFlexShrink(1);
root_child0.insertChild(root_child0_child0, 0);

View File

@@ -13,26 +13,26 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("wrap_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(30);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(30);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(30);
root.insertChild(root_child3, 3);
@@ -97,27 +97,27 @@ it("wrap_column", function () {
});
it("wrap_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(30);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(30);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(30);
root.insertChild(root_child3, 3);
@@ -182,28 +182,28 @@ it("wrap_row", function () {
});
it("wrap_row_align_items_flex_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_FLEX_END);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(30);
root.insertChild(root_child3, 3);
@@ -268,28 +268,28 @@ it("wrap_row_align_items_flex_end", function () {
});
it("wrap_row_align_items_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(30);
root.insertChild(root_child3, 3);
@@ -354,18 +354,18 @@ it("wrap_row_align_items_center", function () {
});
it("flex_wrap_children_with_min_main_overriding_flex_basis", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexBasis(50);
root_child0.setMinWidth(55);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexBasis(50);
root_child1.setMinWidth(55);
root_child1.setHeight(50);
@@ -411,24 +411,24 @@ it("flex_wrap_children_with_min_main_overriding_flex_basis", function () {
});
it("flex_wrap_wrap_to_child_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child0.setAlignItems(Yoga.ALIGN_FLEX_START);
root_child0.setFlexWrap(Yoga.WRAP_WRAP);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(100);
root_child0.insertChild(root_child0_child0, 0);
var root_child0_child0_child0 = Yoga.Node.create();
var root_child0_child0_child0 = Yoga.Node.create(config);
root_child0_child0_child0.setWidth(100);
root_child0_child0_child0.setHeight(100);
root_child0_child0.insertChild(root_child0_child0_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(100);
root_child1.setHeight(100);
root.insertChild(root_child1, 1);
@@ -493,17 +493,17 @@ it("flex_wrap_wrap_to_child_height", function () {
});
it("flex_wrap_align_stretch_fits_one_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setFlexWrap(Yoga.WRAP_WRAP);
root.setWidth(150);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -547,32 +547,32 @@ it("flex_wrap_align_stretch_fits_one_row", function () {
});
it("wrap_reverse_row_align_content_flex_start", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
root.setWidth(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(40);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(30);
root_child4.setHeight(50);
root.insertChild(root_child4, 4);
@@ -647,33 +647,33 @@ it("wrap_reverse_row_align_content_flex_start", function () {
});
it("wrap_reverse_row_align_content_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_CENTER);
root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
root.setWidth(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(40);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(30);
root_child4.setHeight(50);
root.insertChild(root_child4, 4);
@@ -748,32 +748,32 @@ it("wrap_reverse_row_align_content_center", function () {
});
it("wrap_reverse_row_single_line_different_size", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
root.setWidth(300);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(40);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(30);
root_child4.setHeight(50);
root.insertChild(root_child4, 4);
@@ -848,33 +848,33 @@ it("wrap_reverse_row_single_line_different_size", function () {
});
it("wrap_reverse_row_align_content_stretch", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_STRETCH);
root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
root.setWidth(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(40);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(30);
root_child4.setHeight(50);
root.insertChild(root_child4, 4);
@@ -949,33 +949,33 @@ it("wrap_reverse_row_align_content_stretch", function () {
});
it("wrap_reverse_row_align_content_space_around", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignContent(Yoga.ALIGN_SPACE_AROUND);
root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
root.setWidth(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(40);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(30);
root_child4.setHeight(50);
root.insertChild(root_child4, 4);
@@ -1050,33 +1050,33 @@ it("wrap_reverse_row_align_content_space_around", function () {
});
it("wrap_reverse_column_fixed_size", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setFlexWrap(Yoga.WRAP_WRAP_REVERSE);
root.setWidth(200);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(30);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(30);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(30);
root_child2.setHeight(30);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setWidth(30);
root_child3.setHeight(40);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setWidth(30);
root_child4.setHeight(50);
root.insertChild(root_child4, 4);
@@ -1151,22 +1151,22 @@ it("wrap_reverse_column_fixed_size", function () {
});
it("wrapped_row_within_align_items_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child0.setFlexWrap(Yoga.WRAP_WRAP);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(150);
root_child0_child0.setHeight(80);
root_child0.insertChild(root_child0_child0, 0);
var root_child0_child1 = Yoga.Node.create();
var root_child0_child1 = Yoga.Node.create(config);
root_child0_child1.setWidth(80);
root_child0_child1.setHeight(80);
root_child0.insertChild(root_child0_child1, 1);
@@ -1221,22 +1221,22 @@ it("wrapped_row_within_align_items_center", function () {
});
it("wrapped_row_within_align_items_flex_start", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child0.setFlexWrap(Yoga.WRAP_WRAP);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(150);
root_child0_child0.setHeight(80);
root_child0.insertChild(root_child0_child0, 0);
var root_child0_child1 = Yoga.Node.create();
var root_child0_child1 = Yoga.Node.create(config);
root_child0_child1.setWidth(80);
root_child0_child1.setHeight(80);
root_child0.insertChild(root_child0_child1, 1);
@@ -1291,22 +1291,22 @@ it("wrapped_row_within_align_items_flex_start", function () {
});
it("wrapped_row_within_align_items_flex_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_FLEX_END);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child0.setFlexWrap(Yoga.WRAP_WRAP);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(150);
root_child0_child0.setHeight(80);
root_child0.insertChild(root_child0_child0, 0);
var root_child0_child1 = Yoga.Node.create();
var root_child0_child1 = Yoga.Node.create(config);
root_child0_child1.setWidth(80);
root_child0_child1.setHeight(80);
root_child0.insertChild(root_child0_child1, 1);

View File

@@ -13,20 +13,20 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("justify_content_row_flex_start", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -80,21 +80,21 @@ it("justify_content_row_flex_start", function () {
});
it("justify_content_row_flex_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -148,21 +148,21 @@ it("justify_content_row_flex_end", function () {
});
it("justify_content_row_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -216,21 +216,21 @@ it("justify_content_row_center", function () {
});
it("justify_content_row_space_between", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setJustifyContent(Yoga.JUSTIFY_SPACE_BETWEEN);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -284,21 +284,21 @@ it("justify_content_row_space_between", function () {
});
it("justify_content_row_space_around", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setJustifyContent(Yoga.JUSTIFY_SPACE_AROUND);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -352,18 +352,18 @@ it("justify_content_row_space_around", function () {
});
it("justify_content_column_flex_start", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -417,20 +417,20 @@ it("justify_content_column_flex_start", function () {
});
it("justify_content_column_flex_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -484,20 +484,20 @@ it("justify_content_column_flex_end", function () {
});
it("justify_content_column_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -551,20 +551,20 @@ it("justify_content_column_center", function () {
});
it("justify_content_column_space_between", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_SPACE_BETWEEN);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -618,20 +618,20 @@ it("justify_content_column_space_between", function () {
});
it("justify_content_column_space_around", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_SPACE_AROUND);
root.setWidth(102);
root.setHeight(102);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);

View File

@@ -13,12 +13,12 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("margin_start", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_START, 10);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
@@ -53,11 +53,11 @@ it("margin_start", function () {
});
it("margin_top", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_TOP, 10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
@@ -92,13 +92,13 @@ it("margin_top", function () {
});
it("margin_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_END, 10);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
@@ -133,12 +133,12 @@ it("margin_end", function () {
});
it("margin_bottom", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_BOTTOM, 10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
@@ -173,12 +173,12 @@ it("margin_bottom", function () {
});
it("margin_and_flex_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMargin(Yoga.EDGE_START, 10);
root_child0.setMargin(Yoga.EDGE_END, 10);
@@ -214,11 +214,11 @@ it("margin_and_flex_row", function () {
});
it("margin_and_flex_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMargin(Yoga.EDGE_TOP, 10);
root_child0.setMargin(Yoga.EDGE_BOTTOM, 10);
@@ -254,12 +254,12 @@ it("margin_and_flex_column", function () {
});
it("margin_and_stretch_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMargin(Yoga.EDGE_TOP, 10);
root_child0.setMargin(Yoga.EDGE_BOTTOM, 10);
@@ -295,11 +295,11 @@ it("margin_and_stretch_row", function () {
});
it("margin_and_stretch_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMargin(Yoga.EDGE_START, 10);
root_child0.setMargin(Yoga.EDGE_END, 10);
@@ -335,17 +335,17 @@ it("margin_and_stretch_column", function () {
});
it("margin_with_sibling_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMargin(Yoga.EDGE_END, 10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -389,16 +389,16 @@ it("margin_with_sibling_row", function () {
});
it("margin_with_sibling_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMargin(Yoga.EDGE_BOTTOM, 10);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -442,18 +442,18 @@ it("margin_with_sibling_column", function () {
});
it("margin_auto_bottom", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_BOTTOM, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -498,18 +498,18 @@ it("margin_auto_bottom", function () {
});
it("margin_auto_top", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_TOP, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -554,19 +554,19 @@ it("margin_auto_top", function () {
});
it("margin_auto_bottom_and_top", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_TOP, "auto");
root_child0.setMargin(Yoga.EDGE_BOTTOM, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -611,19 +611,19 @@ it("margin_auto_bottom_and_top", function () {
});
it("margin_auto_bottom_and_top_justify_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_TOP, "auto");
root_child0.setMargin(Yoga.EDGE_BOTTOM, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -668,24 +668,24 @@ it("margin_auto_bottom_and_top_justify_center", function () {
});
it("margin_auto_mutiple_children_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_TOP, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setMargin(Yoga.EDGE_TOP, "auto");
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(50);
root.insertChild(root_child2, 2);
@@ -740,25 +740,25 @@ it("margin_auto_mutiple_children_column", function () {
});
it("margin_auto_mutiple_children_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_RIGHT, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setMargin(Yoga.EDGE_RIGHT, "auto");
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(50);
root.insertChild(root_child2, 2);
@@ -813,20 +813,20 @@ it("margin_auto_mutiple_children_row", function () {
});
it("margin_auto_left_and_right_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_LEFT, "auto");
root_child0.setMargin(Yoga.EDGE_RIGHT, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -871,18 +871,18 @@ it("margin_auto_left_and_right_column", function () {
});
it("margin_auto_left_and_right", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_LEFT, "auto");
root_child0.setMargin(Yoga.EDGE_RIGHT, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -1041,19 +1041,19 @@ it("margin_auto_start_and_end", function () {
});
it("margin_auto_left_and_right_column_and_center", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_LEFT, "auto");
root_child0.setMargin(Yoga.EDGE_RIGHT, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -1098,18 +1098,18 @@ it("margin_auto_left_and_right_column_and_center", function () {
});
it("margin_auto_left", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_LEFT, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -1154,18 +1154,18 @@ it("margin_auto_left", function () {
});
it("margin_auto_right", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_RIGHT, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -1210,19 +1210,19 @@ it("margin_auto_right", function () {
});
it("margin_auto_left_and_right_strech", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_LEFT, "auto");
root_child0.setMargin(Yoga.EDGE_RIGHT, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
@@ -1267,18 +1267,18 @@ it("margin_auto_left_and_right_strech", function () {
});
it("margin_auto_top_and_bottom_strech", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMargin(Yoga.EDGE_TOP, "auto");
root_child0.setMargin(Yoga.EDGE_BOTTOM, "auto");
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);

View File

@@ -13,11 +13,11 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("max_width", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMaxWidth(50);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
@@ -52,12 +52,12 @@ it("max_width", function () {
});
it("max_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root_child0.setMaxHeight(50);
root.insertChild(root_child0, 0);
@@ -92,16 +92,16 @@ it("max_height", function () {
});
it("min_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMinHeight(60);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -145,17 +145,17 @@ it("min_height", function () {
});
it("min_width", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMinWidth(60);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -199,13 +199,13 @@ it("min_width", function () {
});
it("justify_content_min_max", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setWidth(100);
root.setMinHeight(100);
root.setMaxHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(60);
root_child0.setHeight(60);
root.insertChild(root_child0, 0);
@@ -240,13 +240,13 @@ it("justify_content_min_max", function () {
});
it("align_items_min_max", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setMinWidth(100);
root.setMaxWidth(200);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(60);
root_child0.setHeight(60);
root.insertChild(root_child0, 0);
@@ -281,22 +281,22 @@ it("align_items_min_max", function () {
});
it("justify_content_overflow_min_max", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setMinHeight(100);
root.setMaxHeight(110);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(50);
root_child0.setHeight(50);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(50);
root_child2.setHeight(50);
root.insertChild(root_child2, 2);
@@ -353,17 +353,17 @@ it("flex_grow_to_min", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_MIN_FLEX_FIX, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setMinHeight(100);
root.setMaxHeight(500);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexShrink(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -411,17 +411,17 @@ it("flex_grow_in_at_most_container", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_MIN_FLEX_FIX, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setFlexGrow(1);
root_child0_child0.setFlexBasis(0);
root_child0.insertChild(root_child0_child0, 0);
@@ -468,16 +468,16 @@ it("flex_grow_in_at_most_container", function () {
});
it("flex_grow_within_max_width", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child0.setMaxWidth(100);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setFlexGrow(1);
root_child0_child0.setHeight(20);
root_child0.insertChild(root_child0_child0, 0);
@@ -522,16 +522,16 @@ it("flex_grow_within_max_width", function () {
});
it("flex_grow_within_constrained_max_width", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child0.setMaxWidth(300);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setFlexGrow(1);
root_child0_child0.setHeight(20);
root_child0.insertChild(root_child0_child0, 0);
@@ -576,16 +576,16 @@ it("flex_grow_within_constrained_max_width", function () {
});
it("flex_grow_within_constrained_min_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setMinWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setWidth(50);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -629,14 +629,14 @@ it("flex_grow_within_constrained_min_row", function () {
});
it("flex_grow_within_constrained_min_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setMinHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -680,21 +680,21 @@ it("flex_grow_within_constrained_min_column", function () {
});
it("flex_grow_within_constrained_max_row", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root_child0.setMaxWidth(100);
root_child0.setHeight(100);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setFlexShrink(1);
root_child0_child0.setFlexBasis(100);
root_child0.insertChild(root_child0_child0, 0);
var root_child0_child1 = Yoga.Node.create();
var root_child0_child1 = Yoga.Node.create(config);
root_child0_child1.setWidth(50);
root_child0.insertChild(root_child0_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -748,16 +748,16 @@ it("flex_grow_within_constrained_max_row", function () {
});
it("flex_grow_within_constrained_max_column", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setMaxHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexShrink(1);
root_child0.setFlexBasis(100);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setHeight(50);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -801,7 +801,7 @@ it("flex_grow_within_constrained_max_column", function () {
});
it("min_width_overrides_width", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(50);
root.setMinWidth(100);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -825,7 +825,7 @@ it("min_width_overrides_width", function () {
});
it("max_width_overrides_width", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setMaxWidth(100);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -849,7 +849,7 @@ it("max_width_overrides_width", function () {
});
it("min_height_overrides_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setHeight(50);
root.setMinHeight(100);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -873,7 +873,7 @@ it("min_height_overrides_height", function () {
});
it("max_height_overrides_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setHeight(200);
root.setMaxHeight(100);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -897,12 +897,12 @@ it("max_height_overrides_height", function () {
});
it("min_max_percent_no_width_height", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setAlignItems(Yoga.ALIGN_FLEX_START);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setMinWidth("10%");
root_child0.setMaxWidth("10%");
root_child0.setMinHeight("10%");

View File

@@ -13,7 +13,7 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("padding_no_size", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setPadding(Yoga.EDGE_LEFT, 10);
root.setPadding(Yoga.EDGE_TOP, 10);
root.setPadding(Yoga.EDGE_RIGHT, 10);
@@ -39,13 +39,13 @@ it("padding_no_size", function () {
});
it("padding_container_match_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setPadding(Yoga.EDGE_LEFT, 10);
root.setPadding(Yoga.EDGE_TOP, 10);
root.setPadding(Yoga.EDGE_RIGHT, 10);
root.setPadding(Yoga.EDGE_BOTTOM, 10);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
@@ -80,7 +80,7 @@ it("padding_container_match_child", function () {
});
it("padding_flex_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setPadding(Yoga.EDGE_LEFT, 10);
root.setPadding(Yoga.EDGE_TOP, 10);
root.setPadding(Yoga.EDGE_RIGHT, 10);
@@ -88,7 +88,7 @@ it("padding_flex_child", function () {
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setWidth(10);
root.insertChild(root_child0, 0);
@@ -123,7 +123,7 @@ it("padding_flex_child", function () {
});
it("padding_stretch_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setPadding(Yoga.EDGE_LEFT, 10);
root.setPadding(Yoga.EDGE_TOP, 10);
root.setPadding(Yoga.EDGE_RIGHT, 10);
@@ -131,7 +131,7 @@ it("padding_stretch_child", function () {
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -165,7 +165,7 @@ it("padding_stretch_child", function () {
});
it("padding_center_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_CENTER);
root.setAlignItems(Yoga.ALIGN_CENTER);
root.setPadding(Yoga.EDGE_START, 10);
@@ -174,7 +174,7 @@ it("padding_center_child", function () {
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
@@ -209,13 +209,13 @@ it("padding_center_child", function () {
});
it("child_with_padding_align_end", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setJustifyContent(Yoga.JUSTIFY_FLEX_END);
root.setAlignItems(Yoga.ALIGN_FLEX_END);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPadding(Yoga.EDGE_LEFT, 20);
root_child0.setPadding(Yoga.EDGE_TOP, 20);
root_child0.setPadding(Yoga.EDGE_RIGHT, 20);

View File

@@ -15,12 +15,12 @@ it("percentage_width_height", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth("30%");
root_child0.setHeight("30%");
root.insertChild(root_child0, 0);
@@ -59,12 +59,12 @@ it("percentage_position_left_top", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(400);
root.setHeight(400);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPosition(Yoga.EDGE_LEFT, "10%");
root_child0.setPosition(Yoga.EDGE_TOP, "20%");
root_child0.setWidth("45%");
@@ -105,12 +105,12 @@ it("percentage_position_bottom_right", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(500);
root.setHeight(500);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPosition(Yoga.EDGE_RIGHT, "20%");
root_child0.setPosition(Yoga.EDGE_BOTTOM, "10%");
root_child0.setWidth("55%");
@@ -151,17 +151,17 @@ it("percentage_flex_basis", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("50%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setFlexBasis("25%");
root.insertChild(root_child1, 1);
@@ -210,16 +210,16 @@ it("percentage_flex_basis_cross", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("50%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setFlexBasis("25%");
root.insertChild(root_child1, 1);
@@ -268,16 +268,16 @@ it("percentage_flex_basis_cross_min_height", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMinHeight("60%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(2);
root_child1.setMinHeight("10%");
root.insertChild(root_child1, 1);
@@ -326,18 +326,18 @@ it("percentage_flex_basis_main_max_height", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("10%");
root_child0.setMaxHeight("60%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(4);
root_child1.setFlexBasis("10%");
root_child1.setMaxHeight("20%");
@@ -387,17 +387,17 @@ it("percentage_flex_basis_cross_max_height", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("10%");
root_child0.setMaxHeight("60%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(4);
root_child1.setFlexBasis("10%");
root_child1.setMaxHeight("20%");
@@ -447,18 +447,18 @@ it("percentage_flex_basis_main_max_width", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("15%");
root_child0.setMaxWidth("60%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(4);
root_child1.setFlexBasis("10%");
root_child1.setMaxWidth("20%");
@@ -508,17 +508,17 @@ it("percentage_flex_basis_cross_max_width", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("10%");
root_child0.setMaxWidth("60%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(4);
root_child1.setFlexBasis("15%");
root_child1.setMaxWidth("20%");
@@ -568,18 +568,18 @@ it("percentage_flex_basis_main_min_width", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("15%");
root_child0.setMinWidth("60%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(4);
root_child1.setFlexBasis("10%");
root_child1.setMinWidth("20%");
@@ -629,17 +629,17 @@ it("percentage_flex_basis_cross_min_width", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("10%");
root_child0.setMinWidth("60%");
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(4);
root_child1.setFlexBasis("15%");
root_child1.setMinWidth("20%");
@@ -689,11 +689,11 @@ it("percentage_multiple_nested_with_padding_margin_and_percentage_values", funct
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(200);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis("10%");
root_child0.setMargin(Yoga.EDGE_LEFT, 5);
@@ -707,7 +707,7 @@ it("percentage_multiple_nested_with_padding_margin_and_percentage_values", funct
root_child0.setMinWidth("60%");
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setMargin(Yoga.EDGE_LEFT, 5);
root_child0_child0.setMargin(Yoga.EDGE_TOP, 5);
root_child0_child0.setMargin(Yoga.EDGE_RIGHT, 5);
@@ -719,7 +719,7 @@ it("percentage_multiple_nested_with_padding_margin_and_percentage_values", funct
root_child0_child0.setWidth("50%");
root_child0.insertChild(root_child0_child0, 0);
var root_child0_child0_child0 = Yoga.Node.create();
var root_child0_child0_child0 = Yoga.Node.create(config);
root_child0_child0_child0.setMargin(Yoga.EDGE_LEFT, "5%");
root_child0_child0_child0.setMargin(Yoga.EDGE_TOP, "5%");
root_child0_child0_child0.setMargin(Yoga.EDGE_RIGHT, "5%");
@@ -731,7 +731,7 @@ it("percentage_multiple_nested_with_padding_margin_and_percentage_values", funct
root_child0_child0_child0.setWidth("45%");
root_child0_child0.insertChild(root_child0_child0_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(4);
root_child1.setFlexBasis("15%");
root_child1.setMinWidth("20%");
@@ -801,11 +801,11 @@ it("percentage_margin_should_calculate_based_only_on_width", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setMargin(Yoga.EDGE_LEFT, "10%");
root_child0.setMargin(Yoga.EDGE_TOP, "10%");
@@ -813,7 +813,7 @@ it("percentage_margin_should_calculate_based_only_on_width", function () {
root_child0.setMargin(Yoga.EDGE_BOTTOM, "10%");
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(10);
root_child0_child0.setHeight(10);
root_child0.insertChild(root_child0_child0, 0);
@@ -862,11 +862,11 @@ it("percentage_padding_should_calculate_based_only_on_width", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setPadding(Yoga.EDGE_LEFT, "10%");
root_child0.setPadding(Yoga.EDGE_TOP, "10%");
@@ -874,7 +874,7 @@ it("percentage_padding_should_calculate_based_only_on_width", function () {
root_child0.setPadding(Yoga.EDGE_BOTTOM, "10%");
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(10);
root_child0_child0.setHeight(10);
root_child0.insertChild(root_child0_child0, 0);
@@ -923,11 +923,11 @@ it("percentage_absolute_position", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(200);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setPositionType(Yoga.POSITION_TYPE_ABSOLUTE);
root_child0.setPosition(Yoga.EDGE_LEFT, "30%");
root_child0.setPosition(Yoga.EDGE_TOP, "10%");
@@ -967,9 +967,9 @@ it("percentage_absolute_position", function () {
});
it("percentage_width_height_undefined_parent_size", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth("50%");
root_child0.setHeight("50%");
root.insertChild(root_child0, 0);
@@ -1004,24 +1004,24 @@ it("percentage_width_height_undefined_parent_size", function () {
});
it("percent_within_flex_grow", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(350);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(100);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
var root_child1_child0 = Yoga.Node.create();
var root_child1_child0 = Yoga.Node.create(config);
root_child1_child0.setWidth("100%");
root_child1.insertChild(root_child1_child0, 0);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setWidth(100);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);

View File

@@ -15,20 +15,20 @@ it("rounding_flex_basis_flex_grow_row_width_of_100", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -86,28 +86,28 @@ it("rounding_flex_basis_flex_grow_row_prime_number_width", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(113);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root.insertChild(root_child2, 2);
var root_child3 = Yoga.Node.create();
var root_child3 = Yoga.Node.create(config);
root_child3.setFlexGrow(1);
root.insertChild(root_child3, 3);
var root_child4 = Yoga.Node.create();
var root_child4 = Yoga.Node.create(config);
root_child4.setFlexGrow(1);
root.insertChild(root_child4, 4);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -185,21 +185,21 @@ it("rounding_flex_basis_flex_shrink_row", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
root.setWidth(101);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexShrink(1);
root_child0.setFlexBasis(100);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexBasis(25);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexBasis(25);
root.insertChild(root_child2, 2);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
@@ -257,22 +257,22 @@ it("rounding_flex_basis_overrides_main_size", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(113);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
@@ -331,22 +331,22 @@ it("rounding_total_fractial", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(87.4);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(0.7);
root_child0.setFlexBasis(50.3);
root_child0.setHeight(20.3);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1.6);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1.1);
root_child2.setHeight(10.7);
root.insertChild(root_child2, 2);
@@ -405,36 +405,36 @@ it("rounding_total_fractial_nested", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(87.4);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(0.7);
root_child0.setFlexBasis(50.3);
root_child0.setHeight(20.3);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setFlexGrow(1);
root_child0_child0.setFlexBasis(0.3);
root_child0_child0.setPosition(Yoga.EDGE_BOTTOM, 13.3);
root_child0_child0.setHeight(9.9);
root_child0.insertChild(root_child0_child0, 0);
var root_child0_child1 = Yoga.Node.create();
var root_child0_child1 = Yoga.Node.create(config);
root_child0_child1.setFlexGrow(4);
root_child0_child1.setFlexBasis(0.3);
root_child0_child1.setPosition(Yoga.EDGE_TOP, 13.3);
root_child0_child1.setHeight(1.1);
root_child0.insertChild(root_child0_child1, 1);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1.6);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1.1);
root_child2.setHeight(10.7);
root.insertChild(root_child2, 2);
@@ -513,22 +513,22 @@ it("rounding_fractial_input_1", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
@@ -587,22 +587,22 @@ it("rounding_fractial_input_2", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(113.6);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
@@ -661,23 +661,23 @@ it("rounding_fractial_input_3", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setPosition(Yoga.EDGE_TOP, 0.3);
root.setWidth(100);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);
@@ -736,23 +736,23 @@ it("rounding_fractial_input_4", function () {
Yoga.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setPosition(Yoga.EDGE_TOP, 0.7);
root.setWidth(100);
root.setHeight(113.4);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setFlexGrow(1);
root_child0.setFlexBasis(50);
root_child0.setHeight(20);
root.insertChild(root_child0, 0);
var root_child1 = Yoga.Node.create();
var root_child1 = Yoga.Node.create(config);
root_child1.setFlexGrow(1);
root_child1.setHeight(10);
root.insertChild(root_child1, 1);
var root_child2 = Yoga.Node.create();
var root_child2 = Yoga.Node.create(config);
root_child2.setFlexGrow(1);
root_child2.setHeight(10);
root.insertChild(root_child2, 2);

View File

@@ -13,14 +13,14 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
it("nested_overflowing_child", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(200);
root_child0_child0.setHeight(200);
root_child0.insertChild(root_child0_child0, 0);
@@ -65,16 +65,16 @@ it("nested_overflowing_child", function () {
});
it("nested_overflowing_child_in_constraint_parent", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(100);
root_child0.setHeight(100);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(200);
root_child0_child0.setHeight(200);
root_child0.insertChild(root_child0_child0, 0);
@@ -119,15 +119,15 @@ it("nested_overflowing_child_in_constraint_parent", function () {
});
it("parent_wrap_child_size_overflowing_parent", function () {
try {
var root = Yoga.Node.create();
var root = Yoga.Node.create(config);
root.setWidth(100);
root.setHeight(100);
var root_child0 = Yoga.Node.create();
var root_child0 = Yoga.Node.create(config);
root_child0.setWidth(100);
root.insertChild(root_child0, 0);
var root_child0_child0 = Yoga.Node.create();
var root_child0_child0 = Yoga.Node.create(config);
root_child0_child0.setWidth(100);
root_child0_child0.setHeight(200);
root_child0.insertChild(root_child0_child0, 0);