Add data-disabled to test fixtures (#1286)

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

This can be marked in fixtures to skip a test without commenting it out. We add one more usage of this.

The same functionality existed (unused) before for `experiments`, which I changed to `data-experiments`.

Formatting of JS tests changed to be closer to what Prettier would output, and to remove usage of `Yoga.UNDEFINED` which doesn't existi and just resolves to `undefined` (this is converted to NaN by the wrapper layer).

Reviewed By: yungsters

Differential Revision: D45723003

fbshipit-source-id: 337af319ab1c1c12047d6579da8c7e63b4f1537a
This commit is contained in:
Nick Gerleman
2023-05-10 22:46:39 -07:00
committed by Facebook GitHub Bot
parent e409bfb43a
commit e769dd97d8
52 changed files with 1846 additions and 1101 deletions

View File

@@ -7,7 +7,7 @@
// @generated by gentest/gentest.rb from gentest/fixtures/YGAlignItemsTest.html
test("align_items_stretch", () => {
test('align_items_stretch', () => {
const config = Yoga.Config.create();
let root;
@@ -22,7 +22,7 @@ test("align_items_stretch", () => {
const root_child0 = Yoga.Node.create(config);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -34,7 +34,7 @@ test("align_items_stretch", () => {
expect(root_child0.getComputedWidth()).toBe(100);
expect(root_child0.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -46,14 +46,14 @@ test("align_items_stretch", () => {
expect(root_child0.getComputedWidth()).toBe(100);
expect(root_child0.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_items_center", () => {
test('align_items_center', () => {
const config = Yoga.Config.create();
let root;
@@ -70,7 +70,7 @@ test("align_items_center", () => {
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -82,7 +82,7 @@ test("align_items_center", () => {
expect(root_child0.getComputedWidth()).toBe(10);
expect(root_child0.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -94,14 +94,14 @@ test("align_items_center", () => {
expect(root_child0.getComputedWidth()).toBe(10);
expect(root_child0.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_items_flex_start", () => {
test('align_items_flex_start', () => {
const config = Yoga.Config.create();
let root;
@@ -118,7 +118,7 @@ test("align_items_flex_start", () => {
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -130,7 +130,7 @@ test("align_items_flex_start", () => {
expect(root_child0.getComputedWidth()).toBe(10);
expect(root_child0.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -142,14 +142,14 @@ test("align_items_flex_start", () => {
expect(root_child0.getComputedWidth()).toBe(10);
expect(root_child0.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_items_flex_end", () => {
test('align_items_flex_end', () => {
const config = Yoga.Config.create();
let root;
@@ -166,7 +166,7 @@ test("align_items_flex_end", () => {
root_child0.setWidth(10);
root_child0.setHeight(10);
root.insertChild(root_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -178,7 +178,7 @@ test("align_items_flex_end", () => {
expect(root_child0.getComputedWidth()).toBe(10);
expect(root_child0.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -190,14 +190,14 @@ test("align_items_flex_end", () => {
expect(root_child0.getComputedWidth()).toBe(10);
expect(root_child0.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline", () => {
test('align_baseline', () => {
const config = Yoga.Config.create();
let root;
@@ -220,7 +220,7 @@ test("align_baseline", () => {
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -237,7 +237,7 @@ test("align_baseline", () => {
expect(root_child1.getComputedWidth()).toBe(50);
expect(root_child1.getComputedHeight()).toBe(20);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -254,14 +254,14 @@ test("align_baseline", () => {
expect(root_child1.getComputedWidth()).toBe(50);
expect(root_child1.getComputedHeight()).toBe(20);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_child", () => {
test('align_baseline_child', () => {
const config = Yoga.Config.create();
let root;
@@ -289,7 +289,7 @@ test("align_baseline_child", () => {
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -311,7 +311,7 @@ test("align_baseline_child", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -333,14 +333,14 @@ test("align_baseline_child", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_child_multiline", () => {
test('align_baseline_child_multiline', () => {
const config = Yoga.Config.create();
let root;
@@ -385,7 +385,7 @@ test("align_baseline_child_multiline", () => {
root_child1_child3.setWidth(25);
root_child1_child3.setHeight(10);
root_child1.insertChild(root_child1_child3, 3);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -422,7 +422,7 @@ test("align_baseline_child_multiline", () => {
expect(root_child1_child3.getComputedWidth()).toBe(25);
expect(root_child1_child3.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -459,14 +459,14 @@ test("align_baseline_child_multiline", () => {
expect(root_child1_child3.getComputedWidth()).toBe(25);
expect(root_child1_child3.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_child_multiline_override", () => {
test('align_baseline_child_multiline_override', () => {
const config = Yoga.Config.create();
let root;
@@ -513,7 +513,7 @@ test("align_baseline_child_multiline_override", () => {
root_child1_child3.setWidth(25);
root_child1_child3.setHeight(10);
root_child1.insertChild(root_child1_child3, 3);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -550,7 +550,7 @@ test("align_baseline_child_multiline_override", () => {
expect(root_child1_child3.getComputedWidth()).toBe(25);
expect(root_child1_child3.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -587,14 +587,14 @@ test("align_baseline_child_multiline_override", () => {
expect(root_child1_child3.getComputedWidth()).toBe(25);
expect(root_child1_child3.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_child_multiline_no_override_on_secondline", () => {
test('align_baseline_child_multiline_no_override_on_secondline', () => {
const config = Yoga.Config.create();
let root;
@@ -640,7 +640,7 @@ test("align_baseline_child_multiline_no_override_on_secondline", () => {
root_child1_child3.setWidth(25);
root_child1_child3.setHeight(10);
root_child1.insertChild(root_child1_child3, 3);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -677,7 +677,7 @@ test("align_baseline_child_multiline_no_override_on_secondline", () => {
expect(root_child1_child3.getComputedWidth()).toBe(25);
expect(root_child1_child3.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -714,14 +714,14 @@ test("align_baseline_child_multiline_no_override_on_secondline", () => {
expect(root_child1_child3.getComputedWidth()).toBe(25);
expect(root_child1_child3.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_child_top", () => {
test('align_baseline_child_top', () => {
const config = Yoga.Config.create();
let root;
@@ -750,7 +750,7 @@ test("align_baseline_child_top", () => {
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -772,7 +772,7 @@ test("align_baseline_child_top", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -794,14 +794,14 @@ test("align_baseline_child_top", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_child_top2", () => {
test('align_baseline_child_top2', () => {
const config = Yoga.Config.create();
let root;
@@ -830,7 +830,7 @@ test("align_baseline_child_top2", () => {
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -852,7 +852,7 @@ test("align_baseline_child_top2", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -874,14 +874,14 @@ test("align_baseline_child_top2", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_double_nested_child", () => {
test('align_baseline_double_nested_child', () => {
const config = Yoga.Config.create();
let root;
@@ -914,7 +914,7 @@ test("align_baseline_double_nested_child", () => {
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(15);
root_child1.insertChild(root_child1_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -941,7 +941,7 @@ test("align_baseline_double_nested_child", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(15);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -968,14 +968,14 @@ test("align_baseline_double_nested_child", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(15);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_column", () => {
test('align_baseline_column', () => {
const config = Yoga.Config.create();
let root;
@@ -997,7 +997,7 @@ test("align_baseline_column", () => {
root_child1.setWidth(50);
root_child1.setHeight(20);
root.insertChild(root_child1, 1);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1014,7 +1014,7 @@ test("align_baseline_column", () => {
expect(root_child1.getComputedWidth()).toBe(50);
expect(root_child1.getComputedHeight()).toBe(20);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1031,14 +1031,14 @@ test("align_baseline_column", () => {
expect(root_child1.getComputedWidth()).toBe(50);
expect(root_child1.getComputedHeight()).toBe(20);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_child_margin", () => {
test('align_baseline_child_margin', () => {
const config = Yoga.Config.create();
let root;
@@ -1074,7 +1074,7 @@ test("align_baseline_child_margin", () => {
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1096,7 +1096,7 @@ test("align_baseline_child_margin", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1118,14 +1118,14 @@ test("align_baseline_child_margin", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_child_padding", () => {
test('align_baseline_child_padding', () => {
const config = Yoga.Config.create();
let root;
@@ -1161,7 +1161,7 @@ test("align_baseline_child_padding", () => {
root_child1_child0.setWidth(50);
root_child1_child0.setHeight(10);
root_child1.insertChild(root_child1_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1183,7 +1183,7 @@ test("align_baseline_child_padding", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1205,14 +1205,14 @@ test("align_baseline_child_padding", () => {
expect(root_child1_child0.getComputedWidth()).toBe(50);
expect(root_child1_child0.getComputedHeight()).toBe(10);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_multiline", () => {
test('align_baseline_multiline', () => {
const config = Yoga.Config.create();
let root;
@@ -1256,7 +1256,7 @@ test("align_baseline_multiline", () => {
root_child3.setWidth(50);
root_child3.setHeight(50);
root.insertChild(root_child3, 3);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1293,7 +1293,7 @@ test("align_baseline_multiline", () => {
expect(root_child3.getComputedWidth()).toBe(50);
expect(root_child3.getComputedHeight()).toBe(50);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1330,14 +1330,14 @@ test("align_baseline_multiline", () => {
expect(root_child3.getComputedWidth()).toBe(50);
expect(root_child3.getComputedHeight()).toBe(50);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_multiline_column", () => {
test.skip('align_baseline_multiline_column', () => {
const config = Yoga.Config.create();
let root;
@@ -1380,7 +1380,7 @@ test("align_baseline_multiline_column", () => {
root_child3.setWidth(50);
root_child3.setHeight(20);
root.insertChild(root_child3, 3);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1417,7 +1417,7 @@ test("align_baseline_multiline_column", () => {
expect(root_child3.getComputedWidth()).toBe(50);
expect(root_child3.getComputedHeight()).toBe(20);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1429,7 +1429,7 @@ test("align_baseline_multiline_column", () => {
expect(root_child0.getComputedWidth()).toBe(50);
expect(root_child0.getComputedHeight()).toBe(50);
expect(root_child1.getComputedLeft()).toBe(70);
expect(root_child1.getComputedLeft()).toBe(50);
expect(root_child1.getComputedTop()).toBe(50);
expect(root_child1.getComputedWidth()).toBe(30);
expect(root_child1.getComputedHeight()).toBe(50);
@@ -1439,7 +1439,7 @@ test("align_baseline_multiline_column", () => {
expect(root_child1_child0.getComputedWidth()).toBe(20);
expect(root_child1_child0.getComputedHeight()).toBe(20);
expect(root_child2.getComputedLeft()).toBe(10);
expect(root_child2.getComputedLeft()).toBe(0);
expect(root_child2.getComputedTop()).toBe(0);
expect(root_child2.getComputedWidth()).toBe(40);
expect(root_child2.getComputedHeight()).toBe(70);
@@ -1454,14 +1454,14 @@ test("align_baseline_multiline_column", () => {
expect(root_child3.getComputedWidth()).toBe(50);
expect(root_child3.getComputedHeight()).toBe(20);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_multiline_column2", () => {
test.skip('align_baseline_multiline_column2', () => {
const config = Yoga.Config.create();
let root;
@@ -1504,7 +1504,7 @@ test("align_baseline_multiline_column2", () => {
root_child3.setWidth(50);
root_child3.setHeight(20);
root.insertChild(root_child3, 3);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1541,7 +1541,7 @@ test("align_baseline_multiline_column2", () => {
expect(root_child3.getComputedWidth()).toBe(50);
expect(root_child3.getComputedHeight()).toBe(20);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1553,7 +1553,7 @@ test("align_baseline_multiline_column2", () => {
expect(root_child0.getComputedWidth()).toBe(50);
expect(root_child0.getComputedHeight()).toBe(50);
expect(root_child1.getComputedLeft()).toBe(70);
expect(root_child1.getComputedLeft()).toBe(50);
expect(root_child1.getComputedTop()).toBe(50);
expect(root_child1.getComputedWidth()).toBe(30);
expect(root_child1.getComputedHeight()).toBe(50);
@@ -1563,7 +1563,7 @@ test("align_baseline_multiline_column2", () => {
expect(root_child1_child0.getComputedWidth()).toBe(20);
expect(root_child1_child0.getComputedHeight()).toBe(20);
expect(root_child2.getComputedLeft()).toBe(10);
expect(root_child2.getComputedLeft()).toBe(0);
expect(root_child2.getComputedTop()).toBe(0);
expect(root_child2.getComputedWidth()).toBe(40);
expect(root_child2.getComputedHeight()).toBe(70);
@@ -1578,14 +1578,14 @@ test("align_baseline_multiline_column2", () => {
expect(root_child3.getComputedWidth()).toBe(50);
expect(root_child3.getComputedHeight()).toBe(20);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_baseline_multiline_row_and_column", () => {
test('align_baseline_multiline_row_and_column', () => {
const config = Yoga.Config.create();
let root;
@@ -1629,7 +1629,7 @@ test("align_baseline_multiline_row_and_column", () => {
root_child3.setWidth(50);
root_child3.setHeight(20);
root.insertChild(root_child3, 3);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1666,7 +1666,7 @@ test("align_baseline_multiline_row_and_column", () => {
expect(root_child3.getComputedWidth()).toBe(50);
expect(root_child3.getComputedHeight()).toBe(20);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1703,14 +1703,14 @@ test("align_baseline_multiline_row_and_column", () => {
expect(root_child3.getComputedWidth()).toBe(50);
expect(root_child3.getComputedHeight()).toBe(20);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_items_center_child_with_margin_bigger_than_parent", () => {
test('align_items_center_child_with_margin_bigger_than_parent', () => {
const config = Yoga.Config.create();
let root;
@@ -1734,7 +1734,7 @@ test("align_items_center_child_with_margin_bigger_than_parent", () => {
root_child0_child0.setWidth(52);
root_child0_child0.setHeight(52);
root_child0.insertChild(root_child0_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1751,7 +1751,7 @@ test("align_items_center_child_with_margin_bigger_than_parent", () => {
expect(root_child0_child0.getComputedWidth()).toBe(52);
expect(root_child0_child0.getComputedHeight()).toBe(52);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1768,14 +1768,14 @@ test("align_items_center_child_with_margin_bigger_than_parent", () => {
expect(root_child0_child0.getComputedWidth()).toBe(52);
expect(root_child0_child0.getComputedHeight()).toBe(52);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_items_flex_end_child_with_margin_bigger_than_parent", () => {
test('align_items_flex_end_child_with_margin_bigger_than_parent', () => {
const config = Yoga.Config.create();
let root;
@@ -1799,7 +1799,7 @@ test("align_items_flex_end_child_with_margin_bigger_than_parent", () => {
root_child0_child0.setWidth(52);
root_child0_child0.setHeight(52);
root_child0.insertChild(root_child0_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1816,7 +1816,7 @@ test("align_items_flex_end_child_with_margin_bigger_than_parent", () => {
expect(root_child0_child0.getComputedWidth()).toBe(52);
expect(root_child0_child0.getComputedHeight()).toBe(52);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1833,14 +1833,14 @@ test("align_items_flex_end_child_with_margin_bigger_than_parent", () => {
expect(root_child0_child0.getComputedWidth()).toBe(52);
expect(root_child0_child0.getComputedHeight()).toBe(52);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_items_center_child_without_margin_bigger_than_parent", () => {
test('align_items_center_child_without_margin_bigger_than_parent', () => {
const config = Yoga.Config.create();
let root;
@@ -1862,7 +1862,7 @@ test("align_items_center_child_without_margin_bigger_than_parent", () => {
root_child0_child0.setWidth(72);
root_child0_child0.setHeight(72);
root_child0.insertChild(root_child0_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1879,7 +1879,7 @@ test("align_items_center_child_without_margin_bigger_than_parent", () => {
expect(root_child0_child0.getComputedWidth()).toBe(72);
expect(root_child0_child0.getComputedHeight()).toBe(72);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1896,14 +1896,14 @@ test("align_items_center_child_without_margin_bigger_than_parent", () => {
expect(root_child0_child0.getComputedWidth()).toBe(72);
expect(root_child0_child0.getComputedHeight()).toBe(72);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_items_flex_end_child_without_margin_bigger_than_parent", () => {
test('align_items_flex_end_child_without_margin_bigger_than_parent', () => {
const config = Yoga.Config.create();
let root;
@@ -1925,7 +1925,7 @@ test("align_items_flex_end_child_without_margin_bigger_than_parent", () => {
root_child0_child0.setWidth(72);
root_child0_child0.setHeight(72);
root_child0.insertChild(root_child0_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1942,7 +1942,7 @@ test("align_items_flex_end_child_without_margin_bigger_than_parent", () => {
expect(root_child0_child0.getComputedWidth()).toBe(72);
expect(root_child0_child0.getComputedHeight()).toBe(72);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -1959,14 +1959,14 @@ test("align_items_flex_end_child_without_margin_bigger_than_parent", () => {
expect(root_child0_child0.getComputedWidth()).toBe(72);
expect(root_child0_child0.getComputedHeight()).toBe(72);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_center_should_size_based_on_content", () => {
test('align_center_should_size_based_on_content', () => {
const config = Yoga.Config.create();
let root;
@@ -1994,7 +1994,7 @@ test("align_center_should_size_based_on_content", () => {
root_child0_child0_child0.setWidth(20);
root_child0_child0_child0.setHeight(20);
root_child0_child0.insertChild(root_child0_child0_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(20);
@@ -2016,7 +2016,7 @@ test("align_center_should_size_based_on_content", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(20);
expect(root_child0_child0_child0.getComputedHeight()).toBe(20);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(20);
@@ -2038,14 +2038,14 @@ test("align_center_should_size_based_on_content", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(20);
expect(root_child0_child0_child0.getComputedHeight()).toBe(20);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_stretch_should_size_based_on_parent", () => {
test('align_stretch_should_size_based_on_parent', () => {
const config = Yoga.Config.create();
let root;
@@ -2072,7 +2072,7 @@ test("align_stretch_should_size_based_on_parent", () => {
root_child0_child0_child0.setWidth(20);
root_child0_child0_child0.setHeight(20);
root_child0_child0.insertChild(root_child0_child0_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(20);
@@ -2094,7 +2094,7 @@ test("align_stretch_should_size_based_on_parent", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(20);
expect(root_child0_child0_child0.getComputedHeight()).toBe(20);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(20);
@@ -2116,14 +2116,14 @@ test("align_stretch_should_size_based_on_parent", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(20);
expect(root_child0_child0_child0.getComputedHeight()).toBe(20);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_flex_start_with_shrinking_children", () => {
test('align_flex_start_with_shrinking_children', () => {
const config = Yoga.Config.create();
let root;
@@ -2148,7 +2148,7 @@ test("align_flex_start_with_shrinking_children", () => {
root_child0_child0_child0.setFlexGrow(1);
root_child0_child0_child0.setFlexShrink(1);
root_child0_child0.insertChild(root_child0_child0_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -2170,7 +2170,7 @@ test("align_flex_start_with_shrinking_children", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(0);
expect(root_child0_child0_child0.getComputedHeight()).toBe(0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -2192,14 +2192,14 @@ test("align_flex_start_with_shrinking_children", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(0);
expect(root_child0_child0_child0.getComputedHeight()).toBe(0);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_flex_start_with_stretching_children", () => {
test('align_flex_start_with_stretching_children', () => {
const config = Yoga.Config.create();
let root;
@@ -2223,7 +2223,7 @@ test("align_flex_start_with_stretching_children", () => {
root_child0_child0_child0.setFlexGrow(1);
root_child0_child0_child0.setFlexShrink(1);
root_child0_child0.insertChild(root_child0_child0_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -2245,7 +2245,7 @@ test("align_flex_start_with_stretching_children", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(500);
expect(root_child0_child0_child0.getComputedHeight()).toBe(0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -2267,14 +2267,14 @@ test("align_flex_start_with_stretching_children", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(500);
expect(root_child0_child0_child0.getComputedHeight()).toBe(0);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}
config.free();
}
});
test("align_flex_start_with_shrinking_children_with_stretch", () => {
test('align_flex_start_with_shrinking_children_with_stretch', () => {
const config = Yoga.Config.create();
let root;
@@ -2299,7 +2299,7 @@ test("align_flex_start_with_shrinking_children_with_stretch", () => {
root_child0_child0_child0.setFlexGrow(1);
root_child0_child0_child0.setFlexShrink(1);
root_child0_child0.insertChild(root_child0_child0_child0, 0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_LTR);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_LTR);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -2321,7 +2321,7 @@ test("align_flex_start_with_shrinking_children_with_stretch", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(0);
expect(root_child0_child0_child0.getComputedHeight()).toBe(0);
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
expect(root.getComputedLeft()).toBe(0);
expect(root.getComputedTop()).toBe(0);
@@ -2343,7 +2343,7 @@ test("align_flex_start_with_shrinking_children_with_stretch", () => {
expect(root_child0_child0_child0.getComputedWidth()).toBe(0);
expect(root_child0_child0_child0.getComputedHeight()).toBe(0);
} finally {
if (typeof root !== "undefined") {
if (typeof root !== 'undefined') {
root.freeRecursive();
}