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/YGSizeOverflowTest.html
|
||||
|
||||
test("nested_overflowing_child", () => {
|
||||
test('nested_overflowing_child', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -26,7 +26,7 @@ test("nested_overflowing_child", () => {
|
||||
root_child0_child0.setWidth(200);
|
||||
root_child0_child0.setHeight(200);
|
||||
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);
|
||||
@@ -43,7 +43,7 @@ test("nested_overflowing_child", () => {
|
||||
expect(root_child0_child0.getComputedWidth()).toBe(200);
|
||||
expect(root_child0_child0.getComputedHeight()).toBe(200);
|
||||
|
||||
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);
|
||||
@@ -60,14 +60,14 @@ test("nested_overflowing_child", () => {
|
||||
expect(root_child0_child0.getComputedWidth()).toBe(200);
|
||||
expect(root_child0_child0.getComputedHeight()).toBe(200);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("nested_overflowing_child_in_constraint_parent", () => {
|
||||
test('nested_overflowing_child_in_constraint_parent', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -88,7 +88,7 @@ test("nested_overflowing_child_in_constraint_parent", () => {
|
||||
root_child0_child0.setWidth(200);
|
||||
root_child0_child0.setHeight(200);
|
||||
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);
|
||||
@@ -105,7 +105,7 @@ test("nested_overflowing_child_in_constraint_parent", () => {
|
||||
expect(root_child0_child0.getComputedWidth()).toBe(200);
|
||||
expect(root_child0_child0.getComputedHeight()).toBe(200);
|
||||
|
||||
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);
|
||||
@@ -122,14 +122,14 @@ test("nested_overflowing_child_in_constraint_parent", () => {
|
||||
expect(root_child0_child0.getComputedWidth()).toBe(200);
|
||||
expect(root_child0_child0.getComputedHeight()).toBe(200);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
config.free();
|
||||
}
|
||||
});
|
||||
test("parent_wrap_child_size_overflowing_parent", () => {
|
||||
test('parent_wrap_child_size_overflowing_parent', () => {
|
||||
const config = Yoga.Config.create();
|
||||
let root;
|
||||
|
||||
@@ -149,7 +149,7 @@ test("parent_wrap_child_size_overflowing_parent", () => {
|
||||
root_child0_child0.setWidth(100);
|
||||
root_child0_child0.setHeight(200);
|
||||
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);
|
||||
@@ -166,7 +166,7 @@ test("parent_wrap_child_size_overflowing_parent", () => {
|
||||
expect(root_child0_child0.getComputedWidth()).toBe(100);
|
||||
expect(root_child0_child0.getComputedHeight()).toBe(200);
|
||||
|
||||
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);
|
||||
@@ -183,7 +183,7 @@ test("parent_wrap_child_size_overflowing_parent", () => {
|
||||
expect(root_child0_child0.getComputedWidth()).toBe(100);
|
||||
expect(root_child0_child0.getComputedHeight()).toBe(200);
|
||||
} finally {
|
||||
if (typeof root !== "undefined") {
|
||||
if (typeof root !== 'undefined') {
|
||||
root.freeRecursive();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user