Skip to content

Commit c9c4414

Browse files
joevilchesfacebook-github-bot
authored andcommitted
Update some Justify tests following Chrome changes
Summary: Chrome made some changes for how overflowed row-reverse containers are laid out which was causing some issues on CI. I updated them here and skipped the new failing tests which we would want to followup on. For LTR, the differences are seen below |Before|After| |--| |{F1962694149} | {F1962694151}| The extra space is now extending past the flex start edge vs flex end. RTL is the opposite. Differential Revision: D66138361
1 parent 5b962c0 commit c9c4414

File tree

4 files changed

+49
-43
lines changed

4 files changed

+49
-43
lines changed

gentest/fixtures/YGJustifyContentTest.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@
157157
<div style="width: 40px;"></div>
158158
</div>
159159

160-
<div id="justify_content_overflow_row_reverse_space_around" style="width: 102px; height: 102px; flex-direction: row-reverse; justify-content: space-around;">
160+
<div data-disabled="true" id="justify_content_overflow_row_reverse_space_around" style="width: 102px; height: 102px; flex-direction: row-reverse; justify-content: space-around;">
161161
<div style="width: 40px;"></div>
162162
<div style="width: 40px;"></div>
163163
<div style="width: 40px;"></div>
164164
</div>
165165

166-
<div id="justify_content_overflow_row_reverse_space_evenly" style="width: 102px; height: 102px; flex-direction: row-reverse; justify-content: space-evenly;">
166+
<div data-disabled="true" id="justify_content_overflow_row_reverse_space_evenly" style="width: 102px; height: 102px; flex-direction: row-reverse; justify-content: space-evenly;">
167167
<div style="width: 40px;"></div>
168168
<div style="width: 40px;"></div>
169169
<div style="width: 40px;"></div>

java/tests/generated/com/facebook/yoga/YGJustifyContentTest.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<6aaf6f020cdc74d09e440206957507aa>>
7+
* @generated SignedSource<<ebd50ee9980922e7e6f3beabff5375ea>>
88
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGJustifyContentTest.html
99
*/
1010

@@ -1790,6 +1790,7 @@ public void test_justify_content_overflow_row_space_evenly() {
17901790
}
17911791

17921792
@Test
1793+
@Ignore
17931794
public void test_justify_content_overflow_row_reverse_space_around() {
17941795
YogaConfig config = YogaConfigFactory.create();
17951796

@@ -1819,17 +1820,17 @@ public void test_justify_content_overflow_row_reverse_space_around() {
18191820
assertEquals(102f, root.getLayoutWidth(), 0.0f);
18201821
assertEquals(102f, root.getLayoutHeight(), 0.0f);
18211822

1822-
assertEquals(62f, root_child0.getLayoutX(), 0.0f);
1823+
assertEquals(80f, root_child0.getLayoutX(), 0.0f);
18231824
assertEquals(0f, root_child0.getLayoutY(), 0.0f);
18241825
assertEquals(40f, root_child0.getLayoutWidth(), 0.0f);
18251826
assertEquals(102f, root_child0.getLayoutHeight(), 0.0f);
18261827

1827-
assertEquals(22f, root_child1.getLayoutX(), 0.0f);
1828+
assertEquals(40f, root_child1.getLayoutX(), 0.0f);
18281829
assertEquals(0f, root_child1.getLayoutY(), 0.0f);
18291830
assertEquals(40f, root_child1.getLayoutWidth(), 0.0f);
18301831
assertEquals(102f, root_child1.getLayoutHeight(), 0.0f);
18311832

1832-
assertEquals(-18f, root_child2.getLayoutX(), 0.0f);
1833+
assertEquals(0f, root_child2.getLayoutX(), 0.0f);
18331834
assertEquals(0f, root_child2.getLayoutY(), 0.0f);
18341835
assertEquals(40f, root_child2.getLayoutWidth(), 0.0f);
18351836
assertEquals(102f, root_child2.getLayoutHeight(), 0.0f);
@@ -1842,23 +1843,24 @@ public void test_justify_content_overflow_row_reverse_space_around() {
18421843
assertEquals(102f, root.getLayoutWidth(), 0.0f);
18431844
assertEquals(102f, root.getLayoutHeight(), 0.0f);
18441845

1845-
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
1846+
assertEquals(-18f, root_child0.getLayoutX(), 0.0f);
18461847
assertEquals(0f, root_child0.getLayoutY(), 0.0f);
18471848
assertEquals(40f, root_child0.getLayoutWidth(), 0.0f);
18481849
assertEquals(102f, root_child0.getLayoutHeight(), 0.0f);
18491850

1850-
assertEquals(40f, root_child1.getLayoutX(), 0.0f);
1851+
assertEquals(22f, root_child1.getLayoutX(), 0.0f);
18511852
assertEquals(0f, root_child1.getLayoutY(), 0.0f);
18521853
assertEquals(40f, root_child1.getLayoutWidth(), 0.0f);
18531854
assertEquals(102f, root_child1.getLayoutHeight(), 0.0f);
18541855

1855-
assertEquals(80f, root_child2.getLayoutX(), 0.0f);
1856+
assertEquals(62f, root_child2.getLayoutX(), 0.0f);
18561857
assertEquals(0f, root_child2.getLayoutY(), 0.0f);
18571858
assertEquals(40f, root_child2.getLayoutWidth(), 0.0f);
18581859
assertEquals(102f, root_child2.getLayoutHeight(), 0.0f);
18591860
}
18601861

18611862
@Test
1863+
@Ignore
18621864
public void test_justify_content_overflow_row_reverse_space_evenly() {
18631865
YogaConfig config = YogaConfigFactory.create();
18641866

@@ -1888,17 +1890,17 @@ public void test_justify_content_overflow_row_reverse_space_evenly() {
18881890
assertEquals(102f, root.getLayoutWidth(), 0.0f);
18891891
assertEquals(102f, root.getLayoutHeight(), 0.0f);
18901892

1891-
assertEquals(62f, root_child0.getLayoutX(), 0.0f);
1893+
assertEquals(80f, root_child0.getLayoutX(), 0.0f);
18921894
assertEquals(0f, root_child0.getLayoutY(), 0.0f);
18931895
assertEquals(40f, root_child0.getLayoutWidth(), 0.0f);
18941896
assertEquals(102f, root_child0.getLayoutHeight(), 0.0f);
18951897

1896-
assertEquals(22f, root_child1.getLayoutX(), 0.0f);
1898+
assertEquals(40f, root_child1.getLayoutX(), 0.0f);
18971899
assertEquals(0f, root_child1.getLayoutY(), 0.0f);
18981900
assertEquals(40f, root_child1.getLayoutWidth(), 0.0f);
18991901
assertEquals(102f, root_child1.getLayoutHeight(), 0.0f);
19001902

1901-
assertEquals(-18f, root_child2.getLayoutX(), 0.0f);
1903+
assertEquals(0f, root_child2.getLayoutX(), 0.0f);
19021904
assertEquals(0f, root_child2.getLayoutY(), 0.0f);
19031905
assertEquals(40f, root_child2.getLayoutWidth(), 0.0f);
19041906
assertEquals(102f, root_child2.getLayoutHeight(), 0.0f);
@@ -1911,17 +1913,17 @@ public void test_justify_content_overflow_row_reverse_space_evenly() {
19111913
assertEquals(102f, root.getLayoutWidth(), 0.0f);
19121914
assertEquals(102f, root.getLayoutHeight(), 0.0f);
19131915

1914-
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
1916+
assertEquals(-18f, root_child0.getLayoutX(), 0.0f);
19151917
assertEquals(0f, root_child0.getLayoutY(), 0.0f);
19161918
assertEquals(40f, root_child0.getLayoutWidth(), 0.0f);
19171919
assertEquals(102f, root_child0.getLayoutHeight(), 0.0f);
19181920

1919-
assertEquals(40f, root_child1.getLayoutX(), 0.0f);
1921+
assertEquals(22f, root_child1.getLayoutX(), 0.0f);
19201922
assertEquals(0f, root_child1.getLayoutY(), 0.0f);
19211923
assertEquals(40f, root_child1.getLayoutWidth(), 0.0f);
19221924
assertEquals(102f, root_child1.getLayoutHeight(), 0.0f);
19231925

1924-
assertEquals(80f, root_child2.getLayoutX(), 0.0f);
1926+
assertEquals(62f, root_child2.getLayoutX(), 0.0f);
19251927
assertEquals(0f, root_child2.getLayoutY(), 0.0f);
19261928
assertEquals(40f, root_child2.getLayoutWidth(), 0.0f);
19271929
assertEquals(102f, root_child2.getLayoutHeight(), 0.0f);

javascript/tests/generated/YGJustifyContentTest.test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<4d367d399575872c385f254588d91fb5>>
7+
* @generated SignedSource<<d9c3d3430edadef3cd6ba8bbacbb31a2>>
88
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGJustifyContentTest.html
99
*/
1010

@@ -1925,7 +1925,7 @@ test('justify_content_overflow_row_space_evenly', () => {
19251925
config.free();
19261926
}
19271927
});
1928-
test('justify_content_overflow_row_reverse_space_around', () => {
1928+
test.skip('justify_content_overflow_row_reverse_space_around', () => {
19291929
const config = Yoga.Config.create();
19301930
let root;
19311931

@@ -1955,17 +1955,17 @@ test('justify_content_overflow_row_reverse_space_around', () => {
19551955
expect(root.getComputedWidth()).toBe(102);
19561956
expect(root.getComputedHeight()).toBe(102);
19571957

1958-
expect(root_child0.getComputedLeft()).toBe(62);
1958+
expect(root_child0.getComputedLeft()).toBe(80);
19591959
expect(root_child0.getComputedTop()).toBe(0);
19601960
expect(root_child0.getComputedWidth()).toBe(40);
19611961
expect(root_child0.getComputedHeight()).toBe(102);
19621962

1963-
expect(root_child1.getComputedLeft()).toBe(22);
1963+
expect(root_child1.getComputedLeft()).toBe(40);
19641964
expect(root_child1.getComputedTop()).toBe(0);
19651965
expect(root_child1.getComputedWidth()).toBe(40);
19661966
expect(root_child1.getComputedHeight()).toBe(102);
19671967

1968-
expect(root_child2.getComputedLeft()).toBe(-18);
1968+
expect(root_child2.getComputedLeft()).toBe(0);
19691969
expect(root_child2.getComputedTop()).toBe(0);
19701970
expect(root_child2.getComputedWidth()).toBe(40);
19711971
expect(root_child2.getComputedHeight()).toBe(102);
@@ -1977,17 +1977,17 @@ test('justify_content_overflow_row_reverse_space_around', () => {
19771977
expect(root.getComputedWidth()).toBe(102);
19781978
expect(root.getComputedHeight()).toBe(102);
19791979

1980-
expect(root_child0.getComputedLeft()).toBe(0);
1980+
expect(root_child0.getComputedLeft()).toBe(-18);
19811981
expect(root_child0.getComputedTop()).toBe(0);
19821982
expect(root_child0.getComputedWidth()).toBe(40);
19831983
expect(root_child0.getComputedHeight()).toBe(102);
19841984

1985-
expect(root_child1.getComputedLeft()).toBe(40);
1985+
expect(root_child1.getComputedLeft()).toBe(22);
19861986
expect(root_child1.getComputedTop()).toBe(0);
19871987
expect(root_child1.getComputedWidth()).toBe(40);
19881988
expect(root_child1.getComputedHeight()).toBe(102);
19891989

1990-
expect(root_child2.getComputedLeft()).toBe(80);
1990+
expect(root_child2.getComputedLeft()).toBe(62);
19911991
expect(root_child2.getComputedTop()).toBe(0);
19921992
expect(root_child2.getComputedWidth()).toBe(40);
19931993
expect(root_child2.getComputedHeight()).toBe(102);
@@ -1999,7 +1999,7 @@ test('justify_content_overflow_row_reverse_space_around', () => {
19991999
config.free();
20002000
}
20012001
});
2002-
test('justify_content_overflow_row_reverse_space_evenly', () => {
2002+
test.skip('justify_content_overflow_row_reverse_space_evenly', () => {
20032003
const config = Yoga.Config.create();
20042004
let root;
20052005

@@ -2029,17 +2029,17 @@ test('justify_content_overflow_row_reverse_space_evenly', () => {
20292029
expect(root.getComputedWidth()).toBe(102);
20302030
expect(root.getComputedHeight()).toBe(102);
20312031

2032-
expect(root_child0.getComputedLeft()).toBe(62);
2032+
expect(root_child0.getComputedLeft()).toBe(80);
20332033
expect(root_child0.getComputedTop()).toBe(0);
20342034
expect(root_child0.getComputedWidth()).toBe(40);
20352035
expect(root_child0.getComputedHeight()).toBe(102);
20362036

2037-
expect(root_child1.getComputedLeft()).toBe(22);
2037+
expect(root_child1.getComputedLeft()).toBe(40);
20382038
expect(root_child1.getComputedTop()).toBe(0);
20392039
expect(root_child1.getComputedWidth()).toBe(40);
20402040
expect(root_child1.getComputedHeight()).toBe(102);
20412041

2042-
expect(root_child2.getComputedLeft()).toBe(-18);
2042+
expect(root_child2.getComputedLeft()).toBe(0);
20432043
expect(root_child2.getComputedTop()).toBe(0);
20442044
expect(root_child2.getComputedWidth()).toBe(40);
20452045
expect(root_child2.getComputedHeight()).toBe(102);
@@ -2051,17 +2051,17 @@ test('justify_content_overflow_row_reverse_space_evenly', () => {
20512051
expect(root.getComputedWidth()).toBe(102);
20522052
expect(root.getComputedHeight()).toBe(102);
20532053

2054-
expect(root_child0.getComputedLeft()).toBe(0);
2054+
expect(root_child0.getComputedLeft()).toBe(-18);
20552055
expect(root_child0.getComputedTop()).toBe(0);
20562056
expect(root_child0.getComputedWidth()).toBe(40);
20572057
expect(root_child0.getComputedHeight()).toBe(102);
20582058

2059-
expect(root_child1.getComputedLeft()).toBe(40);
2059+
expect(root_child1.getComputedLeft()).toBe(22);
20602060
expect(root_child1.getComputedTop()).toBe(0);
20612061
expect(root_child1.getComputedWidth()).toBe(40);
20622062
expect(root_child1.getComputedHeight()).toBe(102);
20632063

2064-
expect(root_child2.getComputedLeft()).toBe(80);
2064+
expect(root_child2.getComputedLeft()).toBe(62);
20652065
expect(root_child2.getComputedTop()).toBe(0);
20662066
expect(root_child2.getComputedWidth()).toBe(40);
20672067
expect(root_child2.getComputedHeight()).toBe(102);

tests/generated/YGJustifyContentTest.cpp

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
* clang-format off
8-
* @generated SignedSource<<acb28ab0d3486089ff07a8763f92e22f>>
8+
* @generated SignedSource<<07092062f14f233462a4678c392df76a>>
99
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGJustifyContentTest.html
1010
*/
1111

@@ -1803,6 +1803,8 @@ TEST(YogaTest, justify_content_overflow_row_space_evenly) {
18031803
}
18041804

18051805
TEST(YogaTest, justify_content_overflow_row_reverse_space_around) {
1806+
GTEST_SKIP();
1807+
18061808
YGConfigRef config = YGConfigNew();
18071809

18081810
YGNodeRef root = YGNodeNewWithConfig(config);
@@ -1830,17 +1832,17 @@ TEST(YogaTest, justify_content_overflow_row_reverse_space_around) {
18301832
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetWidth(root));
18311833
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root));
18321834

1833-
ASSERT_FLOAT_EQ(62, YGNodeLayoutGetLeft(root_child0));
1835+
ASSERT_FLOAT_EQ(80, YGNodeLayoutGetLeft(root_child0));
18341836
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
18351837
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child0));
18361838
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child0));
18371839

1838-
ASSERT_FLOAT_EQ(22, YGNodeLayoutGetLeft(root_child1));
1840+
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetLeft(root_child1));
18391841
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1));
18401842
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child1));
18411843
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child1));
18421844

1843-
ASSERT_FLOAT_EQ(-18, YGNodeLayoutGetLeft(root_child2));
1845+
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child2));
18441846
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child2));
18451847
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child2));
18461848
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child2));
@@ -1852,17 +1854,17 @@ TEST(YogaTest, justify_content_overflow_row_reverse_space_around) {
18521854
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetWidth(root));
18531855
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root));
18541856

1855-
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
1857+
ASSERT_FLOAT_EQ(-18, YGNodeLayoutGetLeft(root_child0));
18561858
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
18571859
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child0));
18581860
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child0));
18591861

1860-
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetLeft(root_child1));
1862+
ASSERT_FLOAT_EQ(22, YGNodeLayoutGetLeft(root_child1));
18611863
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1));
18621864
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child1));
18631865
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child1));
18641866

1865-
ASSERT_FLOAT_EQ(80, YGNodeLayoutGetLeft(root_child2));
1867+
ASSERT_FLOAT_EQ(62, YGNodeLayoutGetLeft(root_child2));
18661868
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child2));
18671869
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child2));
18681870
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child2));
@@ -1873,6 +1875,8 @@ TEST(YogaTest, justify_content_overflow_row_reverse_space_around) {
18731875
}
18741876

18751877
TEST(YogaTest, justify_content_overflow_row_reverse_space_evenly) {
1878+
GTEST_SKIP();
1879+
18761880
YGConfigRef config = YGConfigNew();
18771881

18781882
YGNodeRef root = YGNodeNewWithConfig(config);
@@ -1900,17 +1904,17 @@ TEST(YogaTest, justify_content_overflow_row_reverse_space_evenly) {
19001904
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetWidth(root));
19011905
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root));
19021906

1903-
ASSERT_FLOAT_EQ(62, YGNodeLayoutGetLeft(root_child0));
1907+
ASSERT_FLOAT_EQ(80, YGNodeLayoutGetLeft(root_child0));
19041908
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
19051909
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child0));
19061910
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child0));
19071911

1908-
ASSERT_FLOAT_EQ(22, YGNodeLayoutGetLeft(root_child1));
1912+
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetLeft(root_child1));
19091913
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1));
19101914
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child1));
19111915
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child1));
19121916

1913-
ASSERT_FLOAT_EQ(-18, YGNodeLayoutGetLeft(root_child2));
1917+
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child2));
19141918
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child2));
19151919
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child2));
19161920
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child2));
@@ -1922,17 +1926,17 @@ TEST(YogaTest, justify_content_overflow_row_reverse_space_evenly) {
19221926
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetWidth(root));
19231927
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root));
19241928

1925-
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
1929+
ASSERT_FLOAT_EQ(-18, YGNodeLayoutGetLeft(root_child0));
19261930
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0));
19271931
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child0));
19281932
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child0));
19291933

1930-
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetLeft(root_child1));
1934+
ASSERT_FLOAT_EQ(22, YGNodeLayoutGetLeft(root_child1));
19311935
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child1));
19321936
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child1));
19331937
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child1));
19341938

1935-
ASSERT_FLOAT_EQ(80, YGNodeLayoutGetLeft(root_child2));
1939+
ASSERT_FLOAT_EQ(62, YGNodeLayoutGetLeft(root_child2));
19361940
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child2));
19371941
ASSERT_FLOAT_EQ(40, YGNodeLayoutGetWidth(root_child2));
19381942
ASSERT_FLOAT_EQ(102, YGNodeLayoutGetHeight(root_child2));

0 commit comments

Comments
 (0)