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/YGGapTest.html
|
||||
|
||||
test("column_gap_flexible", () => {
|
||||
test('column_gap_flexible', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -39,7 +39,7 @@ test("column_gap_flexible", () => {
|
||||
root_child2.setFlexShrink(1);
|
||||
root_child2.setFlexBasis("0%");
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -61,7 +61,7 @@ test("column_gap_flexible", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.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);
|
||||
@@ -83,14 +83,14 @@ test("column_gap_flexible", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_inflexible", () => {
|
||||
test('column_gap_inflexible', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -115,7 +115,7 @@ test("column_gap_inflexible", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(20);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -137,7 +137,7 @@ test("column_gap_inflexible", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.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);
|
||||
@@ -159,14 +159,14 @@ test("column_gap_inflexible", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_mixed_flexible", () => {
|
||||
test('column_gap_mixed_flexible', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -193,7 +193,7 @@ test("column_gap_mixed_flexible", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(20);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -215,7 +215,7 @@ test("column_gap_mixed_flexible", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.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);
|
||||
@@ -237,14 +237,14 @@ test("column_gap_mixed_flexible", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_child_margins", () => {
|
||||
test('column_gap_child_margins', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -281,7 +281,7 @@ test("column_gap_child_margins", () => {
|
||||
root_child2.setMargin(Yoga.EDGE_LEFT, 15);
|
||||
root_child2.setMargin(Yoga.EDGE_RIGHT, 15);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -303,7 +303,7 @@ test("column_gap_child_margins", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(2);
|
||||
expect(root_child2.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);
|
||||
@@ -325,14 +325,14 @@ test("column_gap_child_margins", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(2);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_row_gap_wrapping", () => {
|
||||
test('column_row_gap_wrapping', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -391,7 +391,7 @@ test("column_row_gap_wrapping", () => {
|
||||
root_child8.setWidth(20);
|
||||
root_child8.setHeight(20);
|
||||
root.insertChild(root_child8, 8);
|
||||
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);
|
||||
@@ -443,7 +443,7 @@ test("column_row_gap_wrapping", () => {
|
||||
expect(root_child8.getComputedWidth()).toBe(20);
|
||||
expect(root_child8.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);
|
||||
@@ -495,14 +495,14 @@ test("column_row_gap_wrapping", () => {
|
||||
expect(root_child8.getComputedWidth()).toBe(20);
|
||||
expect(root_child8.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_justify_flex_start", () => {
|
||||
test('column_gap_justify_flex_start', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -527,7 +527,7 @@ test("column_gap_justify_flex_start", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(20);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -549,7 +549,7 @@ test("column_gap_justify_flex_start", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.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);
|
||||
@@ -571,14 +571,14 @@ test("column_gap_justify_flex_start", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_justify_center", () => {
|
||||
test('column_gap_justify_center', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -604,7 +604,7 @@ test("column_gap_justify_center", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(20);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -626,7 +626,7 @@ test("column_gap_justify_center", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.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);
|
||||
@@ -648,14 +648,14 @@ test("column_gap_justify_center", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_justify_flex_end", () => {
|
||||
test('column_gap_justify_flex_end', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -681,7 +681,7 @@ test("column_gap_justify_flex_end", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(20);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -703,7 +703,7 @@ test("column_gap_justify_flex_end", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.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);
|
||||
@@ -725,14 +725,14 @@ test("column_gap_justify_flex_end", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_justify_space_between", () => {
|
||||
test('column_gap_justify_space_between', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -758,7 +758,7 @@ test("column_gap_justify_space_between", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(20);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -780,7 +780,7 @@ test("column_gap_justify_space_between", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.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);
|
||||
@@ -802,14 +802,14 @@ test("column_gap_justify_space_between", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_justify_space_around", () => {
|
||||
test('column_gap_justify_space_around', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -835,7 +835,7 @@ test("column_gap_justify_space_around", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(20);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -857,7 +857,7 @@ test("column_gap_justify_space_around", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.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);
|
||||
@@ -879,14 +879,14 @@ test("column_gap_justify_space_around", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_justify_space_evenly", () => {
|
||||
test('column_gap_justify_space_evenly', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -912,7 +912,7 @@ test("column_gap_justify_space_evenly", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(20);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -934,7 +934,7 @@ test("column_gap_justify_space_evenly", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.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);
|
||||
@@ -956,14 +956,14 @@ test("column_gap_justify_space_evenly", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(20);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_wrap_align_flex_start", () => {
|
||||
test('column_gap_wrap_align_flex_start', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1008,7 +1008,7 @@ test("column_gap_wrap_align_flex_start", () => {
|
||||
root_child5.setWidth(20);
|
||||
root_child5.setHeight(20);
|
||||
root.insertChild(root_child5, 5);
|
||||
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);
|
||||
@@ -1045,7 +1045,7 @@ test("column_gap_wrap_align_flex_start", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.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);
|
||||
@@ -1082,14 +1082,14 @@ test("column_gap_wrap_align_flex_start", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_wrap_align_center", () => {
|
||||
test('column_gap_wrap_align_center', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1135,7 +1135,7 @@ test("column_gap_wrap_align_center", () => {
|
||||
root_child5.setWidth(20);
|
||||
root_child5.setHeight(20);
|
||||
root.insertChild(root_child5, 5);
|
||||
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);
|
||||
@@ -1172,7 +1172,7 @@ test("column_gap_wrap_align_center", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.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);
|
||||
@@ -1209,14 +1209,14 @@ test("column_gap_wrap_align_center", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_wrap_align_flex_end", () => {
|
||||
test('column_gap_wrap_align_flex_end', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1262,7 +1262,7 @@ test("column_gap_wrap_align_flex_end", () => {
|
||||
root_child5.setWidth(20);
|
||||
root_child5.setHeight(20);
|
||||
root.insertChild(root_child5, 5);
|
||||
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);
|
||||
@@ -1299,7 +1299,7 @@ test("column_gap_wrap_align_flex_end", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.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);
|
||||
@@ -1336,14 +1336,14 @@ test("column_gap_wrap_align_flex_end", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_wrap_align_space_between", () => {
|
||||
test('column_gap_wrap_align_space_between', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1389,7 +1389,7 @@ test("column_gap_wrap_align_space_between", () => {
|
||||
root_child5.setWidth(20);
|
||||
root_child5.setHeight(20);
|
||||
root.insertChild(root_child5, 5);
|
||||
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);
|
||||
@@ -1426,7 +1426,7 @@ test("column_gap_wrap_align_space_between", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.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);
|
||||
@@ -1463,14 +1463,14 @@ test("column_gap_wrap_align_space_between", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_wrap_align_space_around", () => {
|
||||
test('column_gap_wrap_align_space_around', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1516,7 +1516,7 @@ test("column_gap_wrap_align_space_around", () => {
|
||||
root_child5.setWidth(20);
|
||||
root_child5.setHeight(20);
|
||||
root.insertChild(root_child5, 5);
|
||||
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);
|
||||
@@ -1553,7 +1553,7 @@ test("column_gap_wrap_align_space_around", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.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);
|
||||
@@ -1590,14 +1590,14 @@ test("column_gap_wrap_align_space_around", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_wrap_align_stretch", () => {
|
||||
test('column_gap_wrap_align_stretch', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1637,7 +1637,7 @@ test("column_gap_wrap_align_stretch", () => {
|
||||
root_child4.setFlexGrow(1);
|
||||
root_child4.setMinWidth(60);
|
||||
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);
|
||||
@@ -1669,7 +1669,7 @@ test("column_gap_wrap_align_stretch", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(300);
|
||||
expect(root_child4.getComputedHeight()).toBe(150);
|
||||
|
||||
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);
|
||||
@@ -1701,14 +1701,14 @@ test("column_gap_wrap_align_stretch", () => {
|
||||
expect(root_child4.getComputedWidth()).toBe(300);
|
||||
expect(root_child4.getComputedHeight()).toBe(150);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("column_gap_determines_parent_width", () => {
|
||||
test('column_gap_determines_parent_width', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1732,7 +1732,7 @@ test("column_gap_determines_parent_width", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(30);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -1754,7 +1754,7 @@ test("column_gap_determines_parent_width", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(30);
|
||||
expect(root_child2.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);
|
||||
@@ -1776,14 +1776,14 @@ test("column_gap_determines_parent_width", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(30);
|
||||
expect(root_child2.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("row_gap_align_items_stretch", () => {
|
||||
test('row_gap_align_items_stretch', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1823,7 +1823,7 @@ test("row_gap_align_items_stretch", () => {
|
||||
const root_child5 = Yoga.Node.create(config);
|
||||
root_child5.setWidth(20);
|
||||
root.insertChild(root_child5, 5);
|
||||
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);
|
||||
@@ -1860,7 +1860,7 @@ test("row_gap_align_items_stretch", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.getComputedHeight()).toBe(90);
|
||||
|
||||
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);
|
||||
@@ -1897,14 +1897,14 @@ test("row_gap_align_items_stretch", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.getComputedHeight()).toBe(90);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("row_gap_align_items_end", () => {
|
||||
test('row_gap_align_items_end', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1944,7 +1944,7 @@ test("row_gap_align_items_end", () => {
|
||||
const root_child5 = Yoga.Node.create(config);
|
||||
root_child5.setWidth(20);
|
||||
root.insertChild(root_child5, 5);
|
||||
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);
|
||||
@@ -1981,7 +1981,7 @@ test("row_gap_align_items_end", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.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);
|
||||
@@ -2018,14 +2018,14 @@ test("row_gap_align_items_end", () => {
|
||||
expect(root_child5.getComputedWidth()).toBe(20);
|
||||
expect(root_child5.getComputedHeight()).toBe(0);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("row_gap_column_child_margins", () => {
|
||||
test('row_gap_column_child_margins', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -2061,7 +2061,7 @@ test("row_gap_column_child_margins", () => {
|
||||
root_child2.setMargin(Yoga.EDGE_TOP, 15);
|
||||
root_child2.setMargin(Yoga.EDGE_BOTTOM, 15);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -2083,7 +2083,7 @@ test("row_gap_column_child_margins", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(100);
|
||||
expect(root_child2.getComputedHeight()).toBe(42);
|
||||
|
||||
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);
|
||||
@@ -2105,14 +2105,14 @@ test("row_gap_column_child_margins", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(100);
|
||||
expect(root_child2.getComputedHeight()).toBe(42);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("row_gap_row_wrap_child_margins", () => {
|
||||
test('row_gap_row_wrap_child_margins', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -2144,7 +2144,7 @@ test("row_gap_row_wrap_child_margins", () => {
|
||||
root_child2.setMargin(Yoga.EDGE_BOTTOM, 15);
|
||||
root_child2.setWidth(60);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -2166,7 +2166,7 @@ test("row_gap_row_wrap_child_margins", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(60);
|
||||
expect(root_child2.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);
|
||||
@@ -2188,14 +2188,14 @@ test("row_gap_row_wrap_child_margins", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(60);
|
||||
expect(root_child2.getComputedHeight()).toBe(0);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("row_gap_determines_parent_height", () => {
|
||||
test('row_gap_determines_parent_height', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -2218,7 +2218,7 @@ test("row_gap_determines_parent_height", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setHeight(30);
|
||||
root.insertChild(root_child2, 2);
|
||||
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);
|
||||
@@ -2240,7 +2240,7 @@ test("row_gap_determines_parent_height", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(100);
|
||||
expect(root_child2.getComputedHeight()).toBe(30);
|
||||
|
||||
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);
|
||||
@@ -2262,7 +2262,7 @@ test("row_gap_determines_parent_height", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(100);
|
||||
expect(root_child2.getComputedHeight()).toBe(30);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user