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:
committed by
Facebook GitHub Bot
parent
e409bfb43a
commit
e769dd97d8
@@ -7,7 +7,7 @@
|
||||
|
||||
// @generated by gentest/gentest.rb from gentest/fixtures/YGAlignContentTest.html
|
||||
|
||||
test("align_content_flex_start", () => {
|
||||
test('align_content_flex_start', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -45,7 +45,7 @@ test("align_content_flex_start", () => {
|
||||
root_child4.setWidth(50);
|
||||
root_child4.setHeight(10);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -77,7 +77,7 @@ test("align_content_flex_start", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -109,14 +109,14 @@ test("align_content_flex_start", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_flex_start_without_height_on_children", () => {
|
||||
test('align_content_flex_start_without_height_on_children', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -150,7 +150,7 @@ test("align_content_flex_start_without_height_on_children", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -182,7 +182,7 @@ test("align_content_flex_start_without_height_on_children", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -214,14 +214,14 @@ test("align_content_flex_start_without_height_on_children", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(0);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_flex_start_with_flex", () => {
|
||||
test('align_content_flex_start_with_flex', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -261,7 +261,7 @@ test("align_content_flex_start_with_flex", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -293,7 +293,7 @@ test("align_content_flex_start_with_flex", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -325,14 +325,14 @@ test("align_content_flex_start_with_flex", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(0);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_flex_end", () => {
|
||||
test('align_content_flex_end', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -370,7 +370,7 @@ test("align_content_flex_end", () => {
|
||||
root_child4.setWidth(50);
|
||||
root_child4.setHeight(10);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -402,7 +402,7 @@ test("align_content_flex_end", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -434,14 +434,14 @@ test("align_content_flex_end", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch", () => {
|
||||
test('align_content_stretch', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -474,7 +474,7 @@ test("align_content_stretch", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -506,7 +506,7 @@ test("align_content_stretch", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -538,14 +538,14 @@ test("align_content_stretch", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(0);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_spacebetween", () => {
|
||||
test('align_content_spacebetween', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -584,7 +584,7 @@ test("align_content_spacebetween", () => {
|
||||
root_child4.setWidth(50);
|
||||
root_child4.setHeight(10);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -616,7 +616,7 @@ test("align_content_spacebetween", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -648,14 +648,14 @@ test("align_content_spacebetween", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_spacearound", () => {
|
||||
test('align_content_spacearound', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -694,7 +694,7 @@ test("align_content_spacearound", () => {
|
||||
root_child4.setWidth(50);
|
||||
root_child4.setHeight(10);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -726,7 +726,7 @@ test("align_content_spacearound", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -758,14 +758,14 @@ test("align_content_spacearound", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row", () => {
|
||||
test('align_content_stretch_row', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -799,7 +799,7 @@ test("align_content_stretch_row", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -831,7 +831,7 @@ test("align_content_stretch_row", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -863,14 +863,14 @@ test("align_content_stretch_row", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(50);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row_with_children", () => {
|
||||
test('align_content_stretch_row_with_children', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -910,7 +910,7 @@ test("align_content_stretch_row_with_children", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -947,7 +947,7 @@ test("align_content_stretch_row_with_children", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -984,14 +984,14 @@ test("align_content_stretch_row_with_children", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(50);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row_with_flex", () => {
|
||||
test('align_content_stretch_row_with_flex', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1031,7 +1031,7 @@ test("align_content_stretch_row_with_flex", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -1063,7 +1063,7 @@ test("align_content_stretch_row_with_flex", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(100);
|
||||
|
||||
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);
|
||||
@@ -1095,14 +1095,14 @@ test("align_content_stretch_row_with_flex", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row_with_flex_no_shrink", () => {
|
||||
test('align_content_stretch_row_with_flex_no_shrink', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1141,7 +1141,7 @@ test("align_content_stretch_row_with_flex_no_shrink", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -1173,7 +1173,7 @@ test("align_content_stretch_row_with_flex_no_shrink", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(100);
|
||||
|
||||
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_content_stretch_row_with_flex_no_shrink", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row_with_margin", () => {
|
||||
test('align_content_stretch_row_with_margin', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1254,7 +1254,7 @@ test("align_content_stretch_row_with_margin", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -1286,7 +1286,7 @@ test("align_content_stretch_row_with_margin", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -1318,14 +1318,14 @@ test("align_content_stretch_row_with_margin", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row_with_padding", () => {
|
||||
test('align_content_stretch_row_with_padding', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1367,7 +1367,7 @@ test("align_content_stretch_row_with_padding", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -1399,7 +1399,7 @@ test("align_content_stretch_row_with_padding", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -1431,14 +1431,14 @@ test("align_content_stretch_row_with_padding", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(50);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row_with_single_row", () => {
|
||||
test('align_content_stretch_row_with_single_row', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1460,7 +1460,7 @@ test("align_content_stretch_row_with_single_row", () => {
|
||||
const root_child1 = Yoga.Node.create(config);
|
||||
root_child1.setWidth(50);
|
||||
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);
|
||||
@@ -1477,7 +1477,7 @@ test("align_content_stretch_row_with_single_row", () => {
|
||||
expect(root_child1.getComputedWidth()).toBe(50);
|
||||
expect(root_child1.getComputedHeight()).toBe(100);
|
||||
|
||||
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);
|
||||
@@ -1494,14 +1494,14 @@ test("align_content_stretch_row_with_single_row", () => {
|
||||
expect(root_child1.getComputedWidth()).toBe(50);
|
||||
expect(root_child1.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row_with_fixed_height", () => {
|
||||
test('align_content_stretch_row_with_fixed_height', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1536,7 +1536,7 @@ test("align_content_stretch_row_with_fixed_height", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -1568,7 +1568,7 @@ test("align_content_stretch_row_with_fixed_height", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -1600,14 +1600,14 @@ test("align_content_stretch_row_with_fixed_height", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row_with_max_height", () => {
|
||||
test('align_content_stretch_row_with_max_height', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1642,7 +1642,7 @@ test("align_content_stretch_row_with_max_height", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -1674,7 +1674,7 @@ test("align_content_stretch_row_with_max_height", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -1706,14 +1706,14 @@ test("align_content_stretch_row_with_max_height", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(50);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_row_with_min_height", () => {
|
||||
test('align_content_stretch_row_with_min_height', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1748,7 +1748,7 @@ test("align_content_stretch_row_with_min_height", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setWidth(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -1780,7 +1780,7 @@ test("align_content_stretch_row_with_min_height", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -1812,14 +1812,14 @@ test("align_content_stretch_row_with_min_height", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_column", () => {
|
||||
test('align_content_stretch_column', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1861,7 +1861,7 @@ test("align_content_stretch_column", () => {
|
||||
const root_child4 = Yoga.Node.create(config);
|
||||
root_child4.setHeight(50);
|
||||
root.insertChild(root_child4, 4);
|
||||
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);
|
||||
@@ -1898,7 +1898,7 @@ test("align_content_stretch_column", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.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);
|
||||
@@ -1935,14 +1935,14 @@ test("align_content_stretch_column", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(50);
|
||||
expect(root_child4.getComputedHeight()).toBe(50);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("align_content_stretch_is_not_overriding_align_items", () => {
|
||||
test('align_content_stretch_is_not_overriding_align_items', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1966,7 +1966,7 @@ test("align_content_stretch_is_not_overriding_align_items", () => {
|
||||
root_child0_child0.setWidth(10);
|
||||
root_child0_child0.setHeight(10);
|
||||
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);
|
||||
@@ -1983,7 +1983,7 @@ test("align_content_stretch_is_not_overriding_align_items", () => {
|
||||
expect(root_child0_child0.getComputedWidth()).toBe(10);
|
||||
expect(root_child0_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);
|
||||
@@ -2000,7 +2000,7 @@ test("align_content_stretch_is_not_overriding_align_items", () => {
|
||||
expect(root_child0_child0.getComputedWidth()).toBe(10);
|
||||
expect(root_child0_child0.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user