Rename enums
Summary: new name, start by renaming enums Differential Revision: D4244360 fbshipit-source-id: c9fcbdd231098c9ff230a6055676bbc7cbd11001
This commit is contained in:
committed by
Facebook Github Bot
parent
07cf47baad
commit
42b6f6b6e5
@@ -23,13 +23,13 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(CSSEdge.START, 10f);
|
||||
root_child0.setPosition(CSSEdge.TOP, 10f);
|
||||
root_child0.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(YogaEdge.START, 10f);
|
||||
root_child0.setPosition(YogaEdge.TOP, 10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -42,7 +42,7 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -63,13 +63,13 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(CSSEdge.END, 10f);
|
||||
root_child0.setPosition(CSSEdge.BOTTOM, 10f);
|
||||
root_child0.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(YogaEdge.END, 10f);
|
||||
root_child0.setPosition(YogaEdge.BOTTOM, 10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -82,7 +82,7 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -103,13 +103,13 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(CSSEdge.START, 10f);
|
||||
root_child0.setPosition(CSSEdge.TOP, 10f);
|
||||
root_child0.setPosition(CSSEdge.END, 10f);
|
||||
root_child0.setPosition(CSSEdge.BOTTOM, 10f);
|
||||
root_child0.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(YogaEdge.START, 10f);
|
||||
root_child0.setPosition(YogaEdge.TOP, 10f);
|
||||
root_child0.setPosition(YogaEdge.END, 10f);
|
||||
root_child0.setPosition(YogaEdge.BOTTOM, 10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -122,7 +122,7 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
assertEquals(80f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(80f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -143,15 +143,15 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(CSSEdge.START, 10f);
|
||||
root_child0.setPosition(CSSEdge.TOP, 10f);
|
||||
root_child0.setPosition(CSSEdge.END, 10f);
|
||||
root_child0.setPosition(CSSEdge.BOTTOM, 10f);
|
||||
root_child0.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(YogaEdge.START, 10f);
|
||||
root_child0.setPosition(YogaEdge.TOP, 10f);
|
||||
root_child0.setPosition(YogaEdge.END, 10f);
|
||||
root_child0.setPosition(YogaEdge.BOTTOM, 10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -164,7 +164,7 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -181,22 +181,22 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setOverflow(CSSOverflow.HIDDEN);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setOverflow(YogaOverflow.HIDDEN);
|
||||
root.setWidth(50f);
|
||||
root.setHeight(50f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(CSSEdge.START, 0f);
|
||||
root_child0.setPosition(CSSEdge.TOP, 0f);
|
||||
root_child0.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(YogaEdge.START, 0f);
|
||||
root_child0.setPosition(YogaEdge.TOP, 0f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setWidth(100f);
|
||||
root_child0_child0.setHeight(100f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -214,7 +214,7 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -236,37 +236,37 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_within_border() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setMargin(CSSEdge.LEFT, 10f);
|
||||
root.setMargin(CSSEdge.TOP, 10f);
|
||||
root.setMargin(CSSEdge.RIGHT, 10f);
|
||||
root.setMargin(CSSEdge.BOTTOM, 10f);
|
||||
root.setPadding(CSSEdge.LEFT, 10);
|
||||
root.setPadding(CSSEdge.TOP, 10);
|
||||
root.setPadding(CSSEdge.RIGHT, 10);
|
||||
root.setPadding(CSSEdge.BOTTOM, 10);
|
||||
root.setBorder(CSSEdge.LEFT, 10f);
|
||||
root.setBorder(CSSEdge.TOP, 10f);
|
||||
root.setBorder(CSSEdge.RIGHT, 10f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 10f);
|
||||
root.setMargin(YogaEdge.LEFT, 10f);
|
||||
root.setMargin(YogaEdge.TOP, 10f);
|
||||
root.setMargin(YogaEdge.RIGHT, 10f);
|
||||
root.setMargin(YogaEdge.BOTTOM, 10f);
|
||||
root.setPadding(YogaEdge.LEFT, 10);
|
||||
root.setPadding(YogaEdge.TOP, 10);
|
||||
root.setPadding(YogaEdge.RIGHT, 10);
|
||||
root.setPadding(YogaEdge.BOTTOM, 10);
|
||||
root.setBorder(YogaEdge.LEFT, 10f);
|
||||
root.setBorder(YogaEdge.TOP, 10f);
|
||||
root.setBorder(YogaEdge.RIGHT, 10f);
|
||||
root.setBorder(YogaEdge.BOTTOM, 10f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(CSSEdge.LEFT, 0f);
|
||||
root_child0.setPosition(CSSEdge.TOP, 0f);
|
||||
root_child0.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(YogaEdge.LEFT, 0f);
|
||||
root_child0.setPosition(YogaEdge.TOP, 0f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child1.setPosition(CSSEdge.RIGHT, 0f);
|
||||
root_child1.setPosition(CSSEdge.BOTTOM, 0f);
|
||||
root_child1.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child1.setPosition(YogaEdge.RIGHT, 0f);
|
||||
root_child1.setPosition(YogaEdge.BOTTOM, 0f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(10f, root.getLayoutX(), 0.0f);
|
||||
@@ -284,7 +284,7 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
assertEquals(50f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(10f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -19,7 +19,7 @@ public class CSSLayoutAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CSSLayoutAlignContentTest {
|
||||
root_child4.setWidth(50f);
|
||||
root_child4.setHeight(10f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -80,7 +80,7 @@ public class CSSLayoutAlignContentTest {
|
||||
assertEquals(50f, root_child4.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child4.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -117,8 +117,8 @@ public class CSSLayoutAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignContent(CSSAlign.FLEX_END);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setAlignContent(YogaAlign.FLEX_END);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -146,7 +146,7 @@ public class CSSLayoutAlignContentTest {
|
||||
root_child4.setWidth(50f);
|
||||
root_child4.setHeight(10f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -179,7 +179,7 @@ public class CSSLayoutAlignContentTest {
|
||||
assertEquals(50f, root_child4.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child4.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -216,8 +216,8 @@ public class CSSLayoutAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignContent(CSSAlign.CENTER);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setAlignContent(YogaAlign.CENTER);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -245,7 +245,7 @@ public class CSSLayoutAlignContentTest {
|
||||
root_child4.setWidth(50f);
|
||||
root_child4.setHeight(10f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -278,7 +278,7 @@ public class CSSLayoutAlignContentTest {
|
||||
assertEquals(50f, root_child4.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child4.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -315,8 +315,8 @@ public class CSSLayoutAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignContent(CSSAlign.STRETCH);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setAlignContent(YogaAlign.STRETCH);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -339,7 +339,7 @@ public class CSSLayoutAlignContentTest {
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setWidth(50f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -372,7 +372,7 @@ public class CSSLayoutAlignContentTest {
|
||||
assertEquals(50f, root_child4.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child4.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -25,7 +25,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -38,7 +38,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -55,7 +55,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -76,7 +76,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -93,7 +93,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.FLEX_START);
|
||||
root.setAlignItems(YogaAlign.FLEX_START);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -101,7 +101,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -114,7 +114,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -131,7 +131,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.FLEX_END);
|
||||
root.setAlignItems(YogaAlign.FLEX_END);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -139,7 +139,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -152,7 +152,7 @@ public class CSSLayoutAlignItemsTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -23,11 +23,11 @@ public class CSSLayoutAlignSelfTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.CENTER);
|
||||
root_child0.setAlignSelf(YogaAlign.CENTER);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -40,7 +40,7 @@ public class CSSLayoutAlignSelfTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -61,11 +61,11 @@ public class CSSLayoutAlignSelfTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.FLEX_END);
|
||||
root_child0.setAlignSelf(YogaAlign.FLEX_END);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -78,7 +78,7 @@ public class CSSLayoutAlignSelfTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -99,11 +99,11 @@ public class CSSLayoutAlignSelfTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.FLEX_START);
|
||||
root_child0.setAlignSelf(YogaAlign.FLEX_START);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -116,7 +116,7 @@ public class CSSLayoutAlignSelfTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -133,16 +133,16 @@ public class CSSLayoutAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_flex_end_override_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.FLEX_START);
|
||||
root.setAlignItems(YogaAlign.FLEX_START);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.FLEX_END);
|
||||
root_child0.setAlignSelf(YogaAlign.FLEX_END);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -155,7 +155,7 @@ public class CSSLayoutAlignSelfTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -19,11 +19,11 @@ public class CSSLayoutBorderTest {
|
||||
@Test
|
||||
public void test_border_no_size() {
|
||||
final CSSNode root = new CSSNode();
|
||||
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.setBorder(YogaEdge.LEFT, 10f);
|
||||
root.setBorder(YogaEdge.TOP, 10f);
|
||||
root.setBorder(YogaEdge.RIGHT, 10f);
|
||||
root.setBorder(YogaEdge.BOTTOM, 10f);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -31,7 +31,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(20f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(20f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -43,16 +43,16 @@ public class CSSLayoutBorderTest {
|
||||
@Test
|
||||
public void test_border_container_match_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setBorder(CSSEdge.LEFT, 10f);
|
||||
root.setBorder(CSSEdge.TOP, 10f);
|
||||
root.setBorder(CSSEdge.RIGHT, 10f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 10f);
|
||||
root.setBorder(YogaEdge.LEFT, 10f);
|
||||
root.setBorder(YogaEdge.TOP, 10f);
|
||||
root.setBorder(YogaEdge.RIGHT, 10f);
|
||||
root.setBorder(YogaEdge.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.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -65,7 +65,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -82,10 +82,10 @@ public class CSSLayoutBorderTest {
|
||||
@Test
|
||||
public void test_border_flex_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setBorder(CSSEdge.LEFT, 10f);
|
||||
root.setBorder(CSSEdge.TOP, 10f);
|
||||
root.setBorder(CSSEdge.RIGHT, 10f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 10f);
|
||||
root.setBorder(YogaEdge.LEFT, 10f);
|
||||
root.setBorder(YogaEdge.TOP, 10f);
|
||||
root.setBorder(YogaEdge.RIGHT, 10f);
|
||||
root.setBorder(YogaEdge.BOTTOM, 10f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -93,7 +93,7 @@ public class CSSLayoutBorderTest {
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -106,7 +106,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(80f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -123,17 +123,17 @@ public class CSSLayoutBorderTest {
|
||||
@Test
|
||||
public void test_border_stretch_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setBorder(CSSEdge.LEFT, 10f);
|
||||
root.setBorder(CSSEdge.TOP, 10f);
|
||||
root.setBorder(CSSEdge.RIGHT, 10f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 10f);
|
||||
root.setBorder(YogaEdge.LEFT, 10f);
|
||||
root.setBorder(YogaEdge.TOP, 10f);
|
||||
root.setBorder(YogaEdge.RIGHT, 10f);
|
||||
root.setBorder(YogaEdge.BOTTOM, 10f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -146,7 +146,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(80f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -163,11 +163,11 @@ public class CSSLayoutBorderTest {
|
||||
@Test
|
||||
public void test_border_center_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setBorder(CSSEdge.START, 10f);
|
||||
root.setBorder(CSSEdge.END, 20f);
|
||||
root.setBorder(CSSEdge.BOTTOM, 20f);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
root.setBorder(YogaEdge.START, 10f);
|
||||
root.setBorder(YogaEdge.END, 20f);
|
||||
root.setBorder(YogaEdge.BOTTOM, 20f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -175,7 +175,7 @@ public class CSSLayoutBorderTest {
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -188,7 +188,7 @@ public class CSSLayoutBorderTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -32,7 +32,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -55,7 +55,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -82,7 +82,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_row_no_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
@@ -96,7 +96,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -119,7 +119,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
assertEquals(10f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -160,7 +160,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -183,7 +183,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -210,7 +210,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -225,7 +225,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -248,7 +248,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
assertEquals(10f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -275,7 +275,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_column_reverse() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.COLUMN_REVERSE);
|
||||
root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -290,7 +290,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -313,7 +313,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -340,7 +340,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_row_reverse() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW_REVERSE);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW_REVERSE);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -355,7 +355,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -378,7 +378,7 @@ public class CSSLayoutFlexDirectionTest {
|
||||
assertEquals(10f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -30,7 +30,7 @@ public class CSSLayoutFlexTest {
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -48,7 +48,7 @@ public class CSSLayoutFlexTest {
|
||||
assertEquals(100f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(25f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -70,7 +70,7 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_grow_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -82,7 +82,7 @@ public class CSSLayoutFlexTest {
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -100,7 +100,7 @@ public class CSSLayoutFlexTest {
|
||||
assertEquals(25f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -133,7 +133,7 @@ public class CSSLayoutFlexTest {
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexBasis(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -151,7 +151,7 @@ public class CSSLayoutFlexTest {
|
||||
assertEquals(100f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -173,7 +173,7 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_shrink_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -185,7 +185,7 @@ public class CSSLayoutFlexTest {
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexBasis(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -203,7 +203,7 @@ public class CSSLayoutFlexTest {
|
||||
assertEquals(50f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -242,7 +242,7 @@ public class CSSLayoutFlexTest {
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(50f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -265,7 +265,7 @@ public class CSSLayoutFlexTest {
|
||||
assertEquals(50f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -310,7 +310,7 @@ public class CSSLayoutFlexTest {
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -333,7 +333,7 @@ public class CSSLayoutFlexTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(20f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -370,7 +370,7 @@ public class CSSLayoutFlexTest {
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setFlexShrink(1f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -388,7 +388,7 @@ public class CSSLayoutFlexTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -19,7 +19,7 @@ public class CSSLayoutFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
@@ -41,7 +41,7 @@ public class CSSLayoutFlexWrapTest {
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -69,7 +69,7 @@ public class CSSLayoutFlexWrapTest {
|
||||
assertEquals(30f, root_child3.getLayoutWidth(), 0.0f);
|
||||
assertEquals(30f, root_child3.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -101,8 +101,8 @@ public class CSSLayoutFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
@@ -124,7 +124,7 @@ public class CSSLayoutFlexWrapTest {
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -152,7 +152,7 @@ public class CSSLayoutFlexWrapTest {
|
||||
assertEquals(30f, root_child3.getLayoutWidth(), 0.0f);
|
||||
assertEquals(30f, root_child3.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -184,9 +184,9 @@ public class CSSLayoutFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_row_align_items_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setAlignItems(CSSAlign.FLEX_END);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setAlignItems(YogaAlign.FLEX_END);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
@@ -208,7 +208,7 @@ public class CSSLayoutFlexWrapTest {
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -236,7 +236,7 @@ public class CSSLayoutFlexWrapTest {
|
||||
assertEquals(30f, root_child3.getLayoutWidth(), 0.0f);
|
||||
assertEquals(30f, root_child3.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -268,9 +268,9 @@ public class CSSLayoutFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_row_align_items_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
@@ -292,7 +292,7 @@ public class CSSLayoutFlexWrapTest {
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -320,7 +320,7 @@ public class CSSLayoutFlexWrapTest {
|
||||
assertEquals(30f, root_child3.getLayoutWidth(), 0.0f);
|
||||
assertEquals(30f, root_child3.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -19,7 +19,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
@@ -34,7 +34,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -57,7 +57,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(10f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(102f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -84,8 +84,8 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
@@ -100,7 +100,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -123,7 +123,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(10f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(102f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -150,8 +150,8 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
@@ -166,7 +166,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -189,7 +189,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(10f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(102f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -216,8 +216,8 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_space_between() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.SPACE_BETWEEN);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setJustifyContent(YogaJustify.SPACE_BETWEEN);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
@@ -232,7 +232,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -255,7 +255,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(10f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(102f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -282,8 +282,8 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_space_around() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.SPACE_AROUND);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setJustifyContent(YogaJustify.SPACE_AROUND);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
@@ -298,7 +298,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -321,7 +321,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(10f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(102f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -361,7 +361,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -384,7 +384,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(102f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -411,7 +411,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
@@ -426,7 +426,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -449,7 +449,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(102f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -476,7 +476,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
@@ -491,7 +491,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -514,7 +514,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(102f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -541,7 +541,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_space_between() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.SPACE_BETWEEN);
|
||||
root.setJustifyContent(YogaJustify.SPACE_BETWEEN);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
@@ -556,7 +556,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -579,7 +579,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(102f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -606,7 +606,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_space_around() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.SPACE_AROUND);
|
||||
root.setJustifyContent(YogaJustify.SPACE_AROUND);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
@@ -621,7 +621,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -644,7 +644,7 @@ public class CSSLayoutJustifyContentTest {
|
||||
assertEquals(102f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -19,15 +19,15 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(CSSEdge.START, 10f);
|
||||
root_child0.setMargin(YogaEdge.START, 10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -40,7 +40,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -61,10 +61,10 @@ public class CSSLayoutMarginTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(CSSEdge.TOP, 10f);
|
||||
root_child0.setMargin(YogaEdge.TOP, 10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -77,7 +77,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -94,16 +94,16 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(CSSEdge.END, 10f);
|
||||
root_child0.setMargin(YogaEdge.END, 10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -116,7 +116,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -133,15 +133,15 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_bottom() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(CSSEdge.BOTTOM, 10f);
|
||||
root_child0.setMargin(YogaEdge.BOTTOM, 10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -154,7 +154,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -171,15 +171,15 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_flex_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setMargin(CSSEdge.START, 10f);
|
||||
root_child0.setMargin(YogaEdge.START, 10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -192,7 +192,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(90f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -214,9 +214,9 @@ public class CSSLayoutMarginTest {
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setMargin(CSSEdge.TOP, 10f);
|
||||
root_child0.setMargin(YogaEdge.TOP, 10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -229,7 +229,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(90f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -246,15 +246,15 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_stretch_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setMargin(CSSEdge.TOP, 10f);
|
||||
root_child0.setMargin(YogaEdge.TOP, 10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -267,7 +267,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(90f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -289,9 +289,9 @@ public class CSSLayoutMarginTest {
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setMargin(CSSEdge.START, 10f);
|
||||
root_child0.setMargin(YogaEdge.START, 10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -304,7 +304,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(90f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -321,7 +321,7 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_with_sibling_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -332,7 +332,7 @@ public class CSSLayoutMarginTest {
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -350,7 +350,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(50f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -382,7 +382,7 @@ public class CSSLayoutMarginTest {
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -400,7 +400,7 @@ public class CSSLayoutMarginTest {
|
||||
assertEquals(100f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -26,7 +26,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
root_child0.setMaxWidth(50f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -39,7 +39,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
assertEquals(50f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -56,7 +56,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_max_height() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setMaxHeight(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -77,7 +77,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -105,7 +105,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -123,7 +123,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
assertEquals(100f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(20f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -145,7 +145,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_min_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -157,7 +157,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -175,7 +175,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
assertEquals(20f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -197,7 +197,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_justify_content_min_max() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
root.setWidth(100f);
|
||||
root.setMinHeight(100f);
|
||||
root.setMaxHeight(200f);
|
||||
@@ -206,7 +206,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
root_child0.setWidth(60f);
|
||||
root_child0.setHeight(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -219,7 +219,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
assertEquals(60f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(60f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -236,7 +236,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_align_items_min_max() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
root.setMinWidth(100f);
|
||||
root.setMaxWidth(200f);
|
||||
root.setHeight(100f);
|
||||
@@ -245,7 +245,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
root_child0.setWidth(60f);
|
||||
root_child0.setHeight(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -258,7 +258,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
assertEquals(60f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(60f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -275,7 +275,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_justify_content_overflow_min_max() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
root.setMinHeight(100f);
|
||||
root.setMaxHeight(110f);
|
||||
|
||||
@@ -293,7 +293,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(50f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -316,7 +316,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
assertEquals(50f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -347,7 +347,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root_child0.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root_child0.setMaxWidth(100f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
@@ -355,7 +355,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setHeight(20f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -373,7 +373,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
assertEquals(100f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(20f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -399,7 +399,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root_child0.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root_child0.setMaxWidth(300f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
@@ -407,7 +407,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setHeight(20f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -425,7 +425,7 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
assertEquals(200f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(20f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -19,11 +19,11 @@ public class CSSLayoutPaddingTest {
|
||||
@Test
|
||||
public void test_padding_no_size() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPadding(CSSEdge.LEFT, 10);
|
||||
root.setPadding(CSSEdge.TOP, 10);
|
||||
root.setPadding(CSSEdge.RIGHT, 10);
|
||||
root.setPadding(CSSEdge.BOTTOM, 10);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setPadding(YogaEdge.LEFT, 10);
|
||||
root.setPadding(YogaEdge.TOP, 10);
|
||||
root.setPadding(YogaEdge.RIGHT, 10);
|
||||
root.setPadding(YogaEdge.BOTTOM, 10);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -31,7 +31,7 @@ public class CSSLayoutPaddingTest {
|
||||
assertEquals(20f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(20f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -43,16 +43,16 @@ public class CSSLayoutPaddingTest {
|
||||
@Test
|
||||
public void test_padding_container_match_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPadding(CSSEdge.LEFT, 10);
|
||||
root.setPadding(CSSEdge.TOP, 10);
|
||||
root.setPadding(CSSEdge.RIGHT, 10);
|
||||
root.setPadding(CSSEdge.BOTTOM, 10);
|
||||
root.setPadding(YogaEdge.LEFT, 10);
|
||||
root.setPadding(YogaEdge.TOP, 10);
|
||||
root.setPadding(YogaEdge.RIGHT, 10);
|
||||
root.setPadding(YogaEdge.BOTTOM, 10);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -65,7 +65,7 @@ public class CSSLayoutPaddingTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -82,10 +82,10 @@ public class CSSLayoutPaddingTest {
|
||||
@Test
|
||||
public void test_padding_flex_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPadding(CSSEdge.LEFT, 10);
|
||||
root.setPadding(CSSEdge.TOP, 10);
|
||||
root.setPadding(CSSEdge.RIGHT, 10);
|
||||
root.setPadding(CSSEdge.BOTTOM, 10);
|
||||
root.setPadding(YogaEdge.LEFT, 10);
|
||||
root.setPadding(YogaEdge.TOP, 10);
|
||||
root.setPadding(YogaEdge.RIGHT, 10);
|
||||
root.setPadding(YogaEdge.BOTTOM, 10);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -93,7 +93,7 @@ public class CSSLayoutPaddingTest {
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -106,7 +106,7 @@ public class CSSLayoutPaddingTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(80f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -123,17 +123,17 @@ public class CSSLayoutPaddingTest {
|
||||
@Test
|
||||
public void test_padding_stretch_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPadding(CSSEdge.LEFT, 10);
|
||||
root.setPadding(CSSEdge.TOP, 10);
|
||||
root.setPadding(CSSEdge.RIGHT, 10);
|
||||
root.setPadding(CSSEdge.BOTTOM, 10);
|
||||
root.setPadding(YogaEdge.LEFT, 10);
|
||||
root.setPadding(YogaEdge.TOP, 10);
|
||||
root.setPadding(YogaEdge.RIGHT, 10);
|
||||
root.setPadding(YogaEdge.BOTTOM, 10);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -146,7 +146,7 @@ public class CSSLayoutPaddingTest {
|
||||
assertEquals(80f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -163,11 +163,11 @@ public class CSSLayoutPaddingTest {
|
||||
@Test
|
||||
public void test_padding_center_child() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setPadding(CSSEdge.START, 10);
|
||||
root.setPadding(CSSEdge.END, 20);
|
||||
root.setPadding(CSSEdge.BOTTOM, 20);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
root.setPadding(YogaEdge.START, 10);
|
||||
root.setPadding(YogaEdge.END, 20);
|
||||
root.setPadding(YogaEdge.BOTTOM, 20);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -175,7 +175,7 @@ public class CSSLayoutPaddingTest {
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -188,7 +188,7 @@ public class CSSLayoutPaddingTest {
|
||||
assertEquals(10f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -205,20 +205,20 @@ public class CSSLayoutPaddingTest {
|
||||
@Test
|
||||
public void test_child_with_padding_align_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setAlignItems(CSSAlign.FLEX_END);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
root.setAlignItems(YogaAlign.FLEX_END);
|
||||
root.setWidth(200f);
|
||||
root.setHeight(200f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPadding(CSSEdge.LEFT, 20);
|
||||
root_child0.setPadding(CSSEdge.TOP, 20);
|
||||
root_child0.setPadding(CSSEdge.RIGHT, 20);
|
||||
root_child0.setPadding(CSSEdge.BOTTOM, 20);
|
||||
root_child0.setPadding(YogaEdge.LEFT, 20);
|
||||
root_child0.setPadding(YogaEdge.TOP, 20);
|
||||
root_child0.setPadding(YogaEdge.RIGHT, 20);
|
||||
root_child0.setPadding(YogaEdge.BOTTOM, 20);
|
||||
root_child0.setWidth(100f);
|
||||
root_child0.setHeight(100f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -231,7 +231,7 @@ public class CSSLayoutPaddingTest {
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
|
@@ -18,10 +18,10 @@ import static org.junit.Assert.assertEquals;
|
||||
public class CSSLayoutRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_flex_basis_flex_grow_row_width_of_100() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -36,7 +36,7 @@ public class CSSLayoutRoundingTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -59,7 +59,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(33f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -82,15 +82,15 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(33f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_rounding_flex_basis_flex_grow_row_prime_number_width() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(113f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -113,7 +113,7 @@ public class CSSLayoutRoundingTest {
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setFlexGrow(1f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -146,7 +146,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(23f, root_child4.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child4.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -179,15 +179,15 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(23f, root_child4.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child4.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_rounding_flex_basis_flex_shrink_row() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
root.setWidth(101f);
|
||||
root.setHeight(100f);
|
||||
|
||||
@@ -203,7 +203,7 @@ public class CSSLayoutRoundingTest {
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexBasis(25f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -226,7 +226,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(25f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -249,12 +249,12 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(25f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_rounding_flex_basis_overrides_main_size() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWidth(100f);
|
||||
@@ -275,7 +275,7 @@ public class CSSLayoutRoundingTest {
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -298,7 +298,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -321,12 +321,12 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_rounding_total_fractial() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWidth(87.4f);
|
||||
@@ -347,7 +347,7 @@ public class CSSLayoutRoundingTest {
|
||||
root_child2.setFlexGrow(1.1f);
|
||||
root_child2.setHeight(10.7f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -370,7 +370,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(87f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -393,12 +393,12 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(87f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_rounding_total_fractial_nested() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWidth(87.4f);
|
||||
@@ -413,14 +413,14 @@ public class CSSLayoutRoundingTest {
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setFlexBasis(0.3f);
|
||||
root_child0_child0.setPosition(CSSEdge.BOTTOM, 13.3f);
|
||||
root_child0_child0.setPosition(YogaEdge.BOTTOM, 13.3f);
|
||||
root_child0_child0.setHeight(9.9f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child1 = new CSSNode();
|
||||
root_child0_child1.setFlexGrow(4f);
|
||||
root_child0_child1.setFlexBasis(0.3f);
|
||||
root_child0_child1.setPosition(CSSEdge.TOP, 13.3f);
|
||||
root_child0_child1.setPosition(YogaEdge.TOP, 13.3f);
|
||||
root_child0_child1.setHeight(1.1f);
|
||||
root_child0.addChildAt(root_child0_child1, 1);
|
||||
|
||||
@@ -433,7 +433,7 @@ public class CSSLayoutRoundingTest {
|
||||
root_child2.setFlexGrow(1.1f);
|
||||
root_child2.setHeight(10.7f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -466,7 +466,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(87f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -499,12 +499,12 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(87f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_rounding_fractial_input_1() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWidth(100f);
|
||||
@@ -525,7 +525,7 @@ public class CSSLayoutRoundingTest {
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -548,7 +548,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -571,12 +571,12 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_rounding_fractial_input_2() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWidth(100f);
|
||||
@@ -597,7 +597,7 @@ public class CSSLayoutRoundingTest {
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -620,7 +620,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(25f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -643,15 +643,15 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(25f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_rounding_fractial_input_3() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPosition(CSSEdge.TOP, 0.3f);
|
||||
root.setPosition(YogaEdge.TOP, 0.3f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
@@ -670,7 +670,7 @@ public class CSSLayoutRoundingTest {
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -693,7 +693,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -716,15 +716,15 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_rounding_fractial_input_4() {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPosition(CSSEdge.TOP, 0.7f);
|
||||
root.setPosition(YogaEdge.TOP, 0.7f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
@@ -743,7 +743,7 @@ public class CSSLayoutRoundingTest {
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -766,7 +766,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(CSSDirection.RTL);
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout();
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
@@ -789,7 +789,7 @@ public class CSSLayoutRoundingTest {
|
||||
assertEquals(100f, root_child2.getLayoutWidth(), 0.0f);
|
||||
assertEquals(24f, root_child2.getLayoutHeight(), 0.0f);
|
||||
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, false);
|
||||
CSSNode.setExperimentalFeatureEnabled(YogaExperimentalFeature.ROUNDING, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -30,9 +30,9 @@ public class CSSNodeTest {
|
||||
public long measure(
|
||||
CSSNodeAPI node,
|
||||
float width,
|
||||
CSSMeasureMode widthMode,
|
||||
YogaMeasureMode widthMode,
|
||||
float height,
|
||||
CSSMeasureMode heightMode) {
|
||||
YogaMeasureMode heightMode) {
|
||||
return MeasureOutput.make(100, 100);
|
||||
}
|
||||
});
|
||||
@@ -41,42 +41,42 @@ public class CSSNodeTest {
|
||||
assertEquals(100, (int) node.getLayoutHeight());
|
||||
}
|
||||
|
||||
private CSSLogLevel mLogLevel;
|
||||
private YogaLogLevel mLogLevel;
|
||||
private String mLogMessage;
|
||||
|
||||
@Test
|
||||
public void testLogger() {
|
||||
CSSNode.setLogger(new CSSLogger() {
|
||||
public void log(CSSLogLevel level, String message) {
|
||||
public void log(YogaLogLevel level, String message) {
|
||||
mLogLevel = level;
|
||||
mLogMessage = message;
|
||||
}
|
||||
});
|
||||
CSSNode.jni_CSSLog(CSSLogLevel.DEBUG.intValue(), "Hello");
|
||||
assertEquals(CSSLogLevel.DEBUG, mLogLevel);
|
||||
CSSNode.jni_CSSLog(YogaLogLevel.DEBUG.intValue(), "Hello");
|
||||
assertEquals(YogaLogLevel.DEBUG, mLogLevel);
|
||||
assertEquals("Hello", mLogMessage);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateLogger() {
|
||||
CSSNode.setLogger(new CSSLogger() {
|
||||
public void log(CSSLogLevel level, String message) {}
|
||||
public void log(YogaLogLevel level, String message) {}
|
||||
});
|
||||
CSSNode.setLogger(new CSSLogger() {
|
||||
public void log(CSSLogLevel level, String message) {
|
||||
public void log(YogaLogLevel level, String message) {
|
||||
mLogLevel = level;
|
||||
mLogMessage = message;
|
||||
}
|
||||
});
|
||||
CSSNode.jni_CSSLog(CSSLogLevel.VERBOSE.intValue(), "Flexbox");
|
||||
assertEquals(CSSLogLevel.VERBOSE, mLogLevel);
|
||||
CSSNode.jni_CSSLog(YogaLogLevel.VERBOSE.intValue(), "Flexbox");
|
||||
assertEquals(YogaLogLevel.VERBOSE, mLogLevel);
|
||||
assertEquals("Flexbox", mLogMessage);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCopyStyle() {
|
||||
final CSSNode node0 = new CSSNode();
|
||||
assertTrue(CSSConstants.isUndefined(node0.getMaxHeight()));
|
||||
assertTrue(YogaConstants.isUndefined(node0.getMaxHeight()));
|
||||
|
||||
final CSSNode node1 = new CSSNode();
|
||||
node1.setMaxHeight(100);
|
||||
|
Reference in New Issue
Block a user