Rename java API

Summary: Rename java api to new use yoga naming

Reviewed By: IanChilds

Differential Revision: D4265345

fbshipit-source-id: 69ecfd8fac214f86b8b70647b9b909acd83d78b5
This commit is contained in:
Emil Sjolander
2016-12-03 04:40:23 -08:00
committed by Facebook Github Bot
parent 6339467b6d
commit c6100d0771
22 changed files with 366 additions and 352 deletions

View File

@@ -18,16 +18,16 @@ import static org.junit.Assert.assertEquals;
public class YGFlexTest {
@Test
public void test_flex_basis_flex_grow_column() {
final CSSNode root = new CSSNode();
final YogaNode root = new YogaNode();
root.setWidth(100f);
root.setHeight(100f);
final CSSNode root_child0 = new CSSNode();
final YogaNode root_child0 = new YogaNode();
root_child0.setFlexGrow(1f);
root_child0.setFlexBasis(50f);
root.addChildAt(root_child0, 0);
final CSSNode root_child1 = new CSSNode();
final YogaNode root_child1 = new YogaNode();
root_child1.setFlexGrow(1f);
root.addChildAt(root_child1, 1);
root.setDirection(YogaDirection.LTR);
@@ -69,17 +69,17 @@ public class YGFlexTest {
@Test
public void test_flex_basis_flex_grow_row() {
final CSSNode root = new CSSNode();
final YogaNode root = new YogaNode();
root.setFlexDirection(YogaFlexDirection.ROW);
root.setWidth(100f);
root.setHeight(100f);
final CSSNode root_child0 = new CSSNode();
final YogaNode root_child0 = new YogaNode();
root_child0.setFlexGrow(1f);
root_child0.setFlexBasis(50f);
root.addChildAt(root_child0, 0);
final CSSNode root_child1 = new CSSNode();
final YogaNode root_child1 = new YogaNode();
root_child1.setFlexGrow(1f);
root.addChildAt(root_child1, 1);
root.setDirection(YogaDirection.LTR);
@@ -121,16 +121,16 @@ public class YGFlexTest {
@Test
public void test_flex_basis_flex_shrink_column() {
final CSSNode root = new CSSNode();
final YogaNode root = new YogaNode();
root.setWidth(100f);
root.setHeight(100f);
final CSSNode root_child0 = new CSSNode();
final YogaNode root_child0 = new YogaNode();
root_child0.setFlexShrink(1f);
root_child0.setFlexBasis(100f);
root.addChildAt(root_child0, 0);
final CSSNode root_child1 = new CSSNode();
final YogaNode root_child1 = new YogaNode();
root_child1.setFlexBasis(50f);
root.addChildAt(root_child1, 1);
root.setDirection(YogaDirection.LTR);
@@ -172,17 +172,17 @@ public class YGFlexTest {
@Test
public void test_flex_basis_flex_shrink_row() {
final CSSNode root = new CSSNode();
final YogaNode root = new YogaNode();
root.setFlexDirection(YogaFlexDirection.ROW);
root.setWidth(100f);
root.setHeight(100f);
final CSSNode root_child0 = new CSSNode();
final YogaNode root_child0 = new YogaNode();
root_child0.setFlexShrink(1f);
root_child0.setFlexBasis(100f);
root.addChildAt(root_child0, 0);
final CSSNode root_child1 = new CSSNode();
final YogaNode root_child1 = new YogaNode();
root_child1.setFlexBasis(50f);
root.addChildAt(root_child1, 1);
root.setDirection(YogaDirection.LTR);
@@ -224,21 +224,21 @@ public class YGFlexTest {
@Test
public void test_flex_shrink_to_zero() {
final CSSNode root = new CSSNode();
final YogaNode root = new YogaNode();
root.setHeight(75f);
final CSSNode root_child0 = new CSSNode();
final YogaNode root_child0 = new YogaNode();
root_child0.setWidth(50f);
root_child0.setHeight(50f);
root.addChildAt(root_child0, 0);
final CSSNode root_child1 = new CSSNode();
final YogaNode root_child1 = new YogaNode();
root_child1.setFlexShrink(1f);
root_child1.setWidth(50f);
root_child1.setHeight(50f);
root.addChildAt(root_child1, 1);
final CSSNode root_child2 = new CSSNode();
final YogaNode root_child2 = new YogaNode();
root_child2.setWidth(50f);
root_child2.setHeight(50f);
root.addChildAt(root_child2, 2);
@@ -291,22 +291,22 @@ public class YGFlexTest {
@Test
public void test_flex_basis_overrides_main_size() {
final CSSNode root = new CSSNode();
final YogaNode root = new YogaNode();
root.setWidth(100f);
root.setHeight(100f);
final CSSNode root_child0 = new CSSNode();
final YogaNode root_child0 = new YogaNode();
root_child0.setFlexGrow(1f);
root_child0.setFlexBasis(50f);
root_child0.setHeight(20f);
root.addChildAt(root_child0, 0);
final CSSNode root_child1 = new CSSNode();
final YogaNode root_child1 = new YogaNode();
root_child1.setFlexGrow(1f);
root_child1.setHeight(10f);
root.addChildAt(root_child1, 1);
final CSSNode root_child2 = new CSSNode();
final YogaNode root_child2 = new YogaNode();
root_child2.setFlexGrow(1f);
root_child2.setHeight(10f);
root.addChildAt(root_child2, 2);
@@ -359,14 +359,14 @@ public class YGFlexTest {
@Test
public void test_flex_grow_shrink_at_most() {
final CSSNode root = new CSSNode();
final YogaNode root = new YogaNode();
root.setWidth(100f);
root.setHeight(100f);
final CSSNode root_child0 = new CSSNode();
final YogaNode root_child0 = new YogaNode();
root.addChildAt(root_child0, 0);
final CSSNode root_child0_child0 = new CSSNode();
final YogaNode root_child0_child0 = new YogaNode();
root_child0_child0.setFlexGrow(1f);
root_child0_child0.setFlexShrink(1f);
root_child0.addChildAt(root_child0_child0, 0);