Change gentest to only write position relative to parent
Summary: `child.offsetLeft/Top` calculates the offset from child to its nearest positioned ancestor, not its direct parent. These are often the same and have not mattered in the past since we have not supported position static. Since are are in the process of supporting that, we would like our tests to be usable so this adjusts the gentest methodology to only speak the same language as Yoga - that is left/top are always relative to direct parents. It works by using `getBoundingClientRect().left/top` instead. Then we pass that down to children and subtract it from the childs `getBoundingClientRect()` to get the position relative to the parent. Note we have to round the final result as `child.offsetLeft/Top` is rounded. Reviewed By: NickGerleman Differential Revision: D51053629 fbshipit-source-id: 8809588d12953565228ae50fdf38197213c46182
This commit is contained in:
committed by
Facebook GitHub Bot
parent
301ed20296
commit
484118c89b
@@ -155,7 +155,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(-50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -178,7 +178,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(-50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -248,22 +248,22 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(200f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(300f, root_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(400f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(-350f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -286,22 +286,22 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(-50f, root_child0_child0_child0_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -373,7 +373,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -445,7 +445,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -516,7 +516,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -588,7 +588,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -660,7 +660,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -731,7 +731,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -804,7 +804,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -877,7 +877,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(200f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -949,7 +949,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1022,7 +1022,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(-50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1095,7 +1095,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1167,7 +1167,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1240,7 +1240,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1313,7 +1313,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1385,7 +1385,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1458,7 +1458,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1531,7 +1531,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(-50f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1603,7 +1603,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1679,7 +1679,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(-50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1755,7 +1755,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1830,7 +1830,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1906,7 +1906,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(-100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(200f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -1982,7 +1982,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -2057,7 +2057,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -2129,7 +2129,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -2201,7 +2201,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -2272,7 +2272,7 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(150f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
@@ -2325,8 +2325,8 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
@@ -2348,8 +2348,8 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(-100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(200f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
@@ -2401,8 +2401,8 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
@@ -2424,8 +2424,8 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(250f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
@@ -2476,8 +2476,8 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
@@ -2499,8 +2499,8 @@ public class YGStaticPositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(250f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
|
Reference in New Issue
Block a user