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/YGJustifyContentTest.html
|
||||
|
||||
test("justify_content_row_flex_start", () => {
|
||||
test('justify_content_row_flex_start', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -31,7 +31,7 @@ test("justify_content_row_flex_start", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(10);
|
||||
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);
|
||||
@@ -53,7 +53,7 @@ test("justify_content_row_flex_start", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
|
||||
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);
|
||||
@@ -75,14 +75,14 @@ test("justify_content_row_flex_start", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_row_flex_end", () => {
|
||||
test('justify_content_row_flex_end', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -107,7 +107,7 @@ test("justify_content_row_flex_end", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(10);
|
||||
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);
|
||||
@@ -129,7 +129,7 @@ test("justify_content_row_flex_end", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
|
||||
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);
|
||||
@@ -151,14 +151,14 @@ test("justify_content_row_flex_end", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_row_center", () => {
|
||||
test('justify_content_row_center', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -183,7 +183,7 @@ test("justify_content_row_center", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(10);
|
||||
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);
|
||||
@@ -205,7 +205,7 @@ test("justify_content_row_center", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
|
||||
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);
|
||||
@@ -227,14 +227,14 @@ test("justify_content_row_center", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_row_space_between", () => {
|
||||
test('justify_content_row_space_between', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -259,7 +259,7 @@ test("justify_content_row_space_between", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(10);
|
||||
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);
|
||||
@@ -281,7 +281,7 @@ test("justify_content_row_space_between", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
|
||||
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);
|
||||
@@ -303,14 +303,14 @@ test("justify_content_row_space_between", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_row_space_around", () => {
|
||||
test('justify_content_row_space_around', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -335,7 +335,7 @@ test("justify_content_row_space_around", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setWidth(10);
|
||||
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);
|
||||
@@ -357,7 +357,7 @@ test("justify_content_row_space_around", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
|
||||
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);
|
||||
@@ -379,14 +379,14 @@ test("justify_content_row_space_around", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(10);
|
||||
expect(root_child2.getComputedHeight()).toBe(102);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_column_flex_start", () => {
|
||||
test('justify_content_column_flex_start', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -409,7 +409,7 @@ test("justify_content_column_flex_start", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setHeight(10);
|
||||
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);
|
||||
@@ -431,7 +431,7 @@ test("justify_content_column_flex_start", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.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);
|
||||
@@ -453,14 +453,14 @@ test("justify_content_column_flex_start", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_column_flex_end", () => {
|
||||
test('justify_content_column_flex_end', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -484,7 +484,7 @@ test("justify_content_column_flex_end", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setHeight(10);
|
||||
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);
|
||||
@@ -506,7 +506,7 @@ test("justify_content_column_flex_end", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.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);
|
||||
@@ -528,14 +528,14 @@ test("justify_content_column_flex_end", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_column_center", () => {
|
||||
test('justify_content_column_center', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -559,7 +559,7 @@ test("justify_content_column_center", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setHeight(10);
|
||||
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);
|
||||
@@ -581,7 +581,7 @@ test("justify_content_column_center", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.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);
|
||||
@@ -603,14 +603,14 @@ test("justify_content_column_center", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_column_space_between", () => {
|
||||
test('justify_content_column_space_between', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -634,7 +634,7 @@ test("justify_content_column_space_between", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setHeight(10);
|
||||
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);
|
||||
@@ -656,7 +656,7 @@ test("justify_content_column_space_between", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.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);
|
||||
@@ -678,14 +678,14 @@ test("justify_content_column_space_between", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_column_space_around", () => {
|
||||
test('justify_content_column_space_around', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -709,7 +709,7 @@ test("justify_content_column_space_around", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setHeight(10);
|
||||
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);
|
||||
@@ -731,7 +731,7 @@ test("justify_content_column_space_around", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.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);
|
||||
@@ -753,14 +753,14 @@ test("justify_content_column_space_around", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_row_min_width_and_margin", () => {
|
||||
test('justify_content_row_min_width_and_margin', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -778,7 +778,7 @@ test("justify_content_row_min_width_and_margin", () => {
|
||||
root_child0.setWidth(20);
|
||||
root_child0.setHeight(20);
|
||||
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(100);
|
||||
expect(root.getComputedTop()).toBe(0);
|
||||
@@ -790,7 +790,7 @@ test("justify_content_row_min_width_and_margin", () => {
|
||||
expect(root_child0.getComputedWidth()).toBe(20);
|
||||
expect(root_child0.getComputedHeight()).toBe(20);
|
||||
|
||||
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
|
||||
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
|
||||
|
||||
expect(root.getComputedLeft()).toBe(100);
|
||||
expect(root.getComputedTop()).toBe(0);
|
||||
@@ -802,14 +802,14 @@ test("justify_content_row_min_width_and_margin", () => {
|
||||
expect(root_child0.getComputedWidth()).toBe(20);
|
||||
expect(root_child0.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_row_max_width_and_margin", () => {
|
||||
test('justify_content_row_max_width_and_margin', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -828,7 +828,7 @@ test("justify_content_row_max_width_and_margin", () => {
|
||||
root_child0.setWidth(20);
|
||||
root_child0.setHeight(20);
|
||||
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(100);
|
||||
expect(root.getComputedTop()).toBe(0);
|
||||
@@ -840,7 +840,7 @@ test("justify_content_row_max_width_and_margin", () => {
|
||||
expect(root_child0.getComputedWidth()).toBe(20);
|
||||
expect(root_child0.getComputedHeight()).toBe(20);
|
||||
|
||||
root.calculateLayout(Yoga.UNDEFINED, Yoga.UNDEFINED, Yoga.DIRECTION_RTL);
|
||||
root.calculateLayout(undefined, undefined, Yoga.DIRECTION_RTL);
|
||||
|
||||
expect(root.getComputedLeft()).toBe(100);
|
||||
expect(root.getComputedTop()).toBe(0);
|
||||
@@ -852,14 +852,14 @@ test("justify_content_row_max_width_and_margin", () => {
|
||||
expect(root_child0.getComputedWidth()).toBe(20);
|
||||
expect(root_child0.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_column_min_height_and_margin", () => {
|
||||
test('justify_content_column_min_height_and_margin', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -876,7 +876,7 @@ test("justify_content_column_min_height_and_margin", () => {
|
||||
root_child0.setWidth(20);
|
||||
root_child0.setHeight(20);
|
||||
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(100);
|
||||
@@ -888,7 +888,7 @@ test("justify_content_column_min_height_and_margin", () => {
|
||||
expect(root_child0.getComputedWidth()).toBe(20);
|
||||
expect(root_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(100);
|
||||
@@ -900,14 +900,14 @@ test("justify_content_column_min_height_and_margin", () => {
|
||||
expect(root_child0.getComputedWidth()).toBe(20);
|
||||
expect(root_child0.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_colunn_max_height_and_margin", () => {
|
||||
test('justify_content_colunn_max_height_and_margin', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -925,7 +925,7 @@ test("justify_content_colunn_max_height_and_margin", () => {
|
||||
root_child0.setWidth(20);
|
||||
root_child0.setHeight(20);
|
||||
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(100);
|
||||
@@ -937,7 +937,7 @@ test("justify_content_colunn_max_height_and_margin", () => {
|
||||
expect(root_child0.getComputedWidth()).toBe(20);
|
||||
expect(root_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(100);
|
||||
@@ -949,14 +949,14 @@ test("justify_content_colunn_max_height_and_margin", () => {
|
||||
expect(root_child0.getComputedWidth()).toBe(20);
|
||||
expect(root_child0.getComputedHeight()).toBe(20);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_column_space_evenly", () => {
|
||||
test('justify_content_column_space_evenly', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -980,7 +980,7 @@ test("justify_content_column_space_evenly", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setHeight(10);
|
||||
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);
|
||||
@@ -1002,7 +1002,7 @@ test("justify_content_column_space_evenly", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.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);
|
||||
@@ -1024,14 +1024,14 @@ test("justify_content_column_space_evenly", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(102);
|
||||
expect(root_child2.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_row_space_evenly", () => {
|
||||
test('justify_content_row_space_evenly', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1056,7 +1056,7 @@ test("justify_content_row_space_evenly", () => {
|
||||
const root_child2 = Yoga.Node.create(config);
|
||||
root_child2.setHeight(10);
|
||||
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);
|
||||
@@ -1078,7 +1078,7 @@ test("justify_content_row_space_evenly", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(0);
|
||||
expect(root_child2.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);
|
||||
@@ -1100,14 +1100,14 @@ test("justify_content_row_space_evenly", () => {
|
||||
expect(root_child2.getComputedWidth()).toBe(0);
|
||||
expect(root_child2.getComputedHeight()).toBe(10);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_min_width_with_padding_child_width_greater_than_parent", () => {
|
||||
test('justify_content_min_width_with_padding_child_width_greater_than_parent', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1140,7 +1140,7 @@ test("justify_content_min_width_with_padding_child_width_greater_than_parent", (
|
||||
root_child0_child0_child0.setWidth(300);
|
||||
root_child0_child0_child0.setHeight(100);
|
||||
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);
|
||||
@@ -1162,7 +1162,7 @@ test("justify_content_min_width_with_padding_child_width_greater_than_parent", (
|
||||
expect(root_child0_child0_child0.getComputedWidth()).toBe(300);
|
||||
expect(root_child0_child0_child0.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);
|
||||
@@ -1184,14 +1184,14 @@ test("justify_content_min_width_with_padding_child_width_greater_than_parent", (
|
||||
expect(root_child0_child0_child0.getComputedWidth()).toBe(300);
|
||||
expect(root_child0_child0_child0.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("justify_content_min_width_with_padding_child_width_lower_than_parent", () => {
|
||||
test('justify_content_min_width_with_padding_child_width_lower_than_parent', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -1224,7 +1224,7 @@ test("justify_content_min_width_with_padding_child_width_lower_than_parent", ()
|
||||
root_child0_child0_child0.setWidth(199);
|
||||
root_child0_child0_child0.setHeight(100);
|
||||
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);
|
||||
@@ -1246,7 +1246,7 @@ test("justify_content_min_width_with_padding_child_width_lower_than_parent", ()
|
||||
expect(root_child0_child0_child0.getComputedWidth()).toBe(199);
|
||||
expect(root_child0_child0_child0.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);
|
||||
@@ -1268,7 +1268,7 @@ test("justify_content_min_width_with_padding_child_width_lower_than_parent", ()
|
||||
expect(root_child0_child0_child0.getComputedWidth()).toBe(199);
|
||||
expect(root_child0_child0_child0.getComputedHeight()).toBe(100);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user