Remove deprecated java code
Summary: Remove deprecated java code and make use of CSSEdge instead of the now removed Spacing class. Reviewed By: AaaChiuuu Differential Revision: D4233198 fbshipit-source-id: 736d79be266e1b9f2d62e5fe6d901de47123cdc1
This commit is contained in:
committed by
Facebook Github Bot
parent
5fa42cd1b0
commit
b32b6029de
@@ -19,12 +19,12 @@ public class CSSLayoutBorderTest {
|
||||
@Test
|
||||
public void test_border_no_size() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setBorder(Spacing.LEFT, 10f);
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setBorder(CSSEdge.LEFT, 10f);
|
||||
root.setBorder(CSSEdge.TOP, 10f);
|
||||
root.setBorder(CSSEdge.RIGHT, 10f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 10f);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
@@ -32,7 +32,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(20f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
@@ -43,17 +43,17 @@ public class CSSLayoutBorderTest {
|
||||
@Test
|
||||
public void test_border_container_match_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setBorder(Spacing.LEFT, 10f);
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setBorder(CSSEdge.LEFT, 10f);
|
||||
root.setBorder(CSSEdge.TOP, 10f);
|
||||
root.setBorder(CSSEdge.RIGHT, 10f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 10f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
@@ -66,7 +66,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
@@ -82,10 +82,10 @@ public class CSSLayoutBorderTest {
|
||||
@Test
|
||||
public void test_border_flex_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setBorder(Spacing.LEFT, 10f);
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setBorder(CSSEdge.LEFT, 10f);
|
||||
root.setBorder(CSSEdge.TOP, 10f);
|
||||
root.setBorder(CSSEdge.RIGHT, 10f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 10f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -94,7 +94,7 @@ public class CSSLayoutBorderTest {
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
@@ -107,7 +107,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(80f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
@@ -123,10 +123,10 @@ public class CSSLayoutBorderTest {
|
||||
@Test
|
||||
public void test_border_stretch_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setBorder(Spacing.LEFT, 10f);
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setBorder(CSSEdge.LEFT, 10f);
|
||||
root.setBorder(CSSEdge.TOP, 10f);
|
||||
root.setBorder(CSSEdge.RIGHT, 10f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 10f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -134,7 +134,7 @@ public class CSSLayoutBorderTest {
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
@@ -147,7 +147,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
@@ -165,9 +165,9 @@ public class CSSLayoutBorderTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setBorder(Spacing.START, 10f);
|
||||
root.setBorder(Spacing.END, 20f);
|
||||
root.setBorder(Spacing.BOTTOM, 20f);
|
||||
root.setBorder(CSSEdge.START, 10f);
|
||||
root.setBorder(CSSEdge.END, 20f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 20f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -176,7 +176,7 @@ public class CSSLayoutBorderTest {
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
@@ -189,7 +189,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.calculateLayout(null);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
|
Reference in New Issue
Block a user