Remove Style prefix in java and cs apis
Summary: The Style prefix does not make sense in the java and c# api and only a few methods had it. This diff removes the last of those. Reviewed By: splhack Differential Revision: D4232920 fbshipit-source-id: 6e2ff21bbb7e0e441892023c14df579d1bc7aa49
This commit is contained in:
committed by
Facebook Github Bot
parent
6318801470
commit
5fa42cd1b0
@@ -19,15 +19,15 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_width_height_start_top() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(Spacing.START, 10f);
|
||||
root_child0.setPosition(Spacing.TOP, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -59,15 +59,15 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_width_height_end_bottom() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(Spacing.END, 10f);
|
||||
root_child0.setPosition(Spacing.BOTTOM, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -99,8 +99,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_start_top_end_bottom() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
@@ -139,8 +139,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_width_height_start_top_end_bottom() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
@@ -148,8 +148,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root_child0.setPosition(Spacing.TOP, 10f);
|
||||
root_child0.setPosition(Spacing.END, 10f);
|
||||
root_child0.setPosition(Spacing.BOTTOM, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -183,8 +183,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setOverflow(CSSOverflow.HIDDEN);
|
||||
root.setStyleWidth(50f);
|
||||
root.setStyleHeight(50f);
|
||||
root.setWidth(50f);
|
||||
root.setHeight(50f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
@@ -193,8 +193,8 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setStyleWidth(100f);
|
||||
root_child0_child0.setStyleHeight(100f);
|
||||
root_child0_child0.setWidth(100f);
|
||||
root_child0_child0.setHeight(100f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -248,23 +248,23 @@ public class CSSLayoutAbsolutePositionTest {
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setPositionType(CSSPositionType.ABSOLUTE);
|
||||
root_child0.setPosition(Spacing.LEFT, 0f);
|
||||
root_child0.setPosition(Spacing.TOP, 0f);
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(50f);
|
||||
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(Spacing.RIGHT, 0f);
|
||||
root_child1.setPosition(Spacing.BOTTOM, 0f);
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(50f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -20,32 +20,32 @@ public class CSSLayoutAlignContentTest {
|
||||
public void test_align_content_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(50f);
|
||||
root_child3.setStyleHeight(10f);
|
||||
root_child3.setWidth(50f);
|
||||
root_child3.setHeight(10f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setStyleWidth(50f);
|
||||
root_child4.setStyleHeight(10f);
|
||||
root_child4.setWidth(50f);
|
||||
root_child4.setHeight(10f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -119,32 +119,32 @@ public class CSSLayoutAlignContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignContent(CSSAlign.FLEX_END);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(50f);
|
||||
root_child3.setStyleHeight(10f);
|
||||
root_child3.setWidth(50f);
|
||||
root_child3.setHeight(10f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setStyleWidth(50f);
|
||||
root_child4.setStyleHeight(10f);
|
||||
root_child4.setWidth(50f);
|
||||
root_child4.setHeight(10f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -218,32 +218,32 @@ public class CSSLayoutAlignContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignContent(CSSAlign.CENTER);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(50f);
|
||||
root_child3.setStyleHeight(10f);
|
||||
root_child3.setWidth(50f);
|
||||
root_child3.setHeight(10f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setStyleWidth(50f);
|
||||
root_child4.setStyleHeight(10f);
|
||||
root_child4.setWidth(50f);
|
||||
root_child4.setHeight(10f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -317,27 +317,27 @@ public class CSSLayoutAlignContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignContent(CSSAlign.STRETCH);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setWidth(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setWidth(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setWidth(50f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(50f);
|
||||
root_child3.setWidth(50f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
|
||||
final CSSNode root_child4 = new CSSNode();
|
||||
root_child4.setStyleWidth(50f);
|
||||
root_child4.setWidth(50f);
|
||||
root.addChildAt(root_child4, 4);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -19,11 +19,11 @@ public class CSSLayoutAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_stretch() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -56,12 +56,12 @@ public class CSSLayoutAlignItemsTest {
|
||||
public void test_align_items_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -94,12 +94,12 @@ public class CSSLayoutAlignItemsTest {
|
||||
public void test_align_items_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.FLEX_START);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -132,12 +132,12 @@ public class CSSLayoutAlignItemsTest {
|
||||
public void test_align_items_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.FLEX_END);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -19,13 +19,13 @@ public class CSSLayoutAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.CENTER);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -57,13 +57,13 @@ public class CSSLayoutAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.FLEX_END);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -95,13 +95,13 @@ public class CSSLayoutAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.FLEX_START);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -134,13 +134,13 @@ public class CSSLayoutAlignSelfTest {
|
||||
public void test_align_self_flex_end_override_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.FLEX_START);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setAlignSelf(CSSAlign.FLEX_END);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -49,8 +49,8 @@ public class CSSLayoutBorderTest {
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -86,12 +86,12 @@ public class CSSLayoutBorderTest {
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -127,11 +127,11 @@ public class CSSLayoutBorderTest {
|
||||
root.setBorder(Spacing.TOP, 10f);
|
||||
root.setBorder(Spacing.RIGHT, 10f);
|
||||
root.setBorder(Spacing.BOTTOM, 10f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -168,12 +168,12 @@ public class CSSLayoutBorderTest {
|
||||
root.setBorder(Spacing.START, 10f);
|
||||
root.setBorder(Spacing.END, 20f);
|
||||
root.setBorder(Spacing.BOTTOM, 20f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -19,18 +19,18 @@ public class CSSLayoutFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_column_no_height() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -83,18 +83,18 @@ public class CSSLayoutFlexDirectionTest {
|
||||
public void test_flex_direction_row_no_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleHeight(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -146,19 +146,19 @@ public class CSSLayoutFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -211,19 +211,19 @@ public class CSSLayoutFlexDirectionTest {
|
||||
public void test_flex_direction_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -276,19 +276,19 @@ public class CSSLayoutFlexDirectionTest {
|
||||
public void test_flex_direction_column_reverse() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.COLUMN_REVERSE);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -341,19 +341,19 @@ public class CSSLayoutFlexDirectionTest {
|
||||
public void test_flex_direction_row_reverse() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW_REVERSE);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -19,8 +19,8 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_grow_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -71,8 +71,8 @@ public class CSSLayoutFlexTest {
|
||||
public void test_flex_basis_flex_grow_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -122,8 +122,8 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_shrink_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexShrink(1f);
|
||||
@@ -174,8 +174,8 @@ public class CSSLayoutFlexTest {
|
||||
public void test_flex_basis_flex_shrink_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexShrink(1f);
|
||||
@@ -225,22 +225,22 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_shrink_to_zero() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleHeight(75f);
|
||||
root.setHeight(75f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(50f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexShrink(1f);
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(50f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(50f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(50f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -292,23 +292,23 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_overrides_main_size() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -360,8 +360,8 @@ public class CSSLayoutFlexTest {
|
||||
@Test
|
||||
public void test_flex_grow_shrink_at_most() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
@@ -20,26 +20,26 @@ public class CSSLayoutFlexWrapTest {
|
||||
public void test_wrap_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleHeight(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(30f);
|
||||
root_child0.setStyleHeight(30f);
|
||||
root_child0.setWidth(30f);
|
||||
root_child0.setHeight(30f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(30f);
|
||||
root_child1.setStyleHeight(30f);
|
||||
root_child1.setWidth(30f);
|
||||
root_child1.setHeight(30f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(30f);
|
||||
root_child2.setStyleHeight(30f);
|
||||
root_child2.setWidth(30f);
|
||||
root_child2.setHeight(30f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(30f);
|
||||
root_child3.setStyleHeight(30f);
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -103,26 +103,26 @@ public class CSSLayoutFlexWrapTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(30f);
|
||||
root_child0.setStyleHeight(30f);
|
||||
root_child0.setWidth(30f);
|
||||
root_child0.setHeight(30f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(30f);
|
||||
root_child1.setStyleHeight(30f);
|
||||
root_child1.setWidth(30f);
|
||||
root_child1.setHeight(30f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(30f);
|
||||
root_child2.setStyleHeight(30f);
|
||||
root_child2.setWidth(30f);
|
||||
root_child2.setHeight(30f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(30f);
|
||||
root_child3.setStyleHeight(30f);
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -187,26 +187,26 @@ public class CSSLayoutFlexWrapTest {
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setAlignItems(CSSAlign.FLEX_END);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(30f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(30f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(30f);
|
||||
root_child1.setStyleHeight(20f);
|
||||
root_child1.setWidth(30f);
|
||||
root_child1.setHeight(20f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(30f);
|
||||
root_child2.setStyleHeight(30f);
|
||||
root_child2.setWidth(30f);
|
||||
root_child2.setHeight(30f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(30f);
|
||||
root_child3.setStyleHeight(30f);
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -271,26 +271,26 @@ public class CSSLayoutFlexWrapTest {
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setWrap(CSSWrap.WRAP);
|
||||
root.setStyleWidth(100f);
|
||||
root.setWidth(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(30f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(30f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(30f);
|
||||
root_child1.setStyleHeight(20f);
|
||||
root_child1.setWidth(30f);
|
||||
root_child1.setHeight(20f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(30f);
|
||||
root_child2.setStyleHeight(30f);
|
||||
root_child2.setWidth(30f);
|
||||
root_child2.setHeight(30f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
|
||||
final CSSNode root_child3 = new CSSNode();
|
||||
root_child3.setStyleWidth(30f);
|
||||
root_child3.setStyleHeight(30f);
|
||||
root_child3.setWidth(30f);
|
||||
root_child3.setHeight(30f);
|
||||
root.addChildAt(root_child3, 3);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -20,19 +20,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_row_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -86,19 +86,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -152,19 +152,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -218,19 +218,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.SPACE_BETWEEN);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -284,19 +284,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.SPACE_AROUND);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(10f);
|
||||
root_child1.setWidth(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(10f);
|
||||
root_child2.setWidth(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -348,18 +348,18 @@ public class CSSLayoutJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_flex_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -412,19 +412,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_column_flex_end() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -477,19 +477,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_column_center() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -542,19 +542,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_column_space_between() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.SPACE_BETWEEN);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -607,19 +607,19 @@ public class CSSLayoutJustifyContentTest {
|
||||
public void test_justify_content_column_space_around() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.SPACE_AROUND);
|
||||
root.setStyleWidth(102f);
|
||||
root.setStyleHeight(102f);
|
||||
root.setWidth(102f);
|
||||
root.setHeight(102f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -20,12 +20,12 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_start() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(Spacing.START, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -57,12 +57,12 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_top() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(Spacing.TOP, 10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -96,12 +96,12 @@ public class CSSLayoutMarginTest {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(Spacing.END, 10f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -134,12 +134,12 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_bottom() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.FLEX_END);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setMargin(Spacing.BOTTOM, 10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -172,8 +172,8 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_and_flex_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -209,8 +209,8 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_flex_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -247,8 +247,8 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_and_stretch_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -284,8 +284,8 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_stretch_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -322,8 +322,8 @@ public class CSSLayoutMarginTest {
|
||||
public void test_margin_with_sibling_row() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -372,8 +372,8 @@ public class CSSLayoutMarginTest {
|
||||
@Test
|
||||
public void test_margin_with_sibling_column() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
|
@@ -19,12 +19,12 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_max_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleMaxWidth(50f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setMaxWidth(50f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -57,12 +57,12 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_max_height() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleMaxHeight(50f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setMaxHeight(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -94,12 +94,12 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_min_height() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setStyleMinHeight(60f);
|
||||
root_child0.setMinHeight(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
@@ -146,12 +146,12 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_min_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setStyleMinWidth(60f);
|
||||
root_child0.setMinWidth(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
@@ -198,13 +198,13 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_justify_content_min_max() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleMinHeight(100f);
|
||||
root.setStyleMaxHeight(200f);
|
||||
root.setWidth(100f);
|
||||
root.setMinHeight(100f);
|
||||
root.setMaxHeight(200f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(60f);
|
||||
root_child0.setStyleHeight(60f);
|
||||
root_child0.setWidth(60f);
|
||||
root_child0.setHeight(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -237,13 +237,13 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_align_items_min_max() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setAlignItems(CSSAlign.CENTER);
|
||||
root.setStyleMinWidth(100f);
|
||||
root.setStyleMaxWidth(200f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setMinWidth(100f);
|
||||
root.setMaxWidth(200f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(60f);
|
||||
root_child0.setStyleHeight(60f);
|
||||
root_child0.setWidth(60f);
|
||||
root_child0.setHeight(60f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -276,22 +276,22 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
public void test_justify_content_overflow_min_max() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setJustifyContent(CSSJustify.CENTER);
|
||||
root.setStyleMinHeight(100f);
|
||||
root.setStyleMaxHeight(110f);
|
||||
root.setMinHeight(100f);
|
||||
root.setMaxHeight(110f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(50f);
|
||||
root_child0.setStyleHeight(50f);
|
||||
root_child0.setWidth(50f);
|
||||
root_child0.setHeight(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setStyleWidth(50f);
|
||||
root_child1.setStyleHeight(50f);
|
||||
root_child1.setWidth(50f);
|
||||
root_child1.setHeight(50f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setStyleWidth(50f);
|
||||
root_child2.setStyleHeight(50f);
|
||||
root_child2.setWidth(50f);
|
||||
root_child2.setHeight(50f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -343,17 +343,17 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_max_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(200f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(200f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root_child0.setStyleMaxWidth(100f);
|
||||
root_child0.setMaxWidth(100f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setStyleHeight(20f);
|
||||
root_child0_child0.setHeight(20f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -395,17 +395,17 @@ public class CSSLayoutMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_constrained_max_width() {
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(200f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(200f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root_child0.setStyleMaxWidth(300f);
|
||||
root_child0.setMaxWidth(300f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setStyleHeight(20f);
|
||||
root_child0_child0.setHeight(20f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -49,8 +49,8 @@ public class CSSLayoutPaddingTest {
|
||||
root.setPadding(Spacing.BOTTOM, 10);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -86,12 +86,12 @@ public class CSSLayoutPaddingTest {
|
||||
root.setPadding(Spacing.TOP, 10);
|
||||
root.setPadding(Spacing.RIGHT, 10);
|
||||
root.setPadding(Spacing.BOTTOM, 10);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -127,11 +127,11 @@ public class CSSLayoutPaddingTest {
|
||||
root.setPadding(Spacing.TOP, 10);
|
||||
root.setPadding(Spacing.RIGHT, 10);
|
||||
root.setPadding(Spacing.BOTTOM, 10);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -168,12 +168,12 @@ public class CSSLayoutPaddingTest {
|
||||
root.setPadding(Spacing.START, 10);
|
||||
root.setPadding(Spacing.END, 20);
|
||||
root.setPadding(Spacing.BOTTOM, 20);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setStyleWidth(10f);
|
||||
root_child0.setStyleHeight(10f);
|
||||
root_child0.setWidth(10f);
|
||||
root_child0.setHeight(10f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -22,8 +22,8 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -91,8 +91,8 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(113f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(113f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
@@ -188,8 +188,8 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setFlexDirection(CSSFlexDirection.ROW);
|
||||
root.setStyleWidth(101f);
|
||||
root.setStyleHeight(100f);
|
||||
root.setWidth(101f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexShrink(1f);
|
||||
@@ -257,23 +257,23 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -329,23 +329,23 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(87.4f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(87.4f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(0.7f);
|
||||
root_child0.setFlexBasis(50.3f);
|
||||
root_child0.setStyleHeight(20.3f);
|
||||
root_child0.setHeight(20.3f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1.6f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1.1f);
|
||||
root_child2.setStyleHeight(10.7f);
|
||||
root_child2.setHeight(10.7f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -401,37 +401,37 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(87.4f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(87.4f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(0.7f);
|
||||
root_child0.setFlexBasis(50.3f);
|
||||
root_child0.setStyleHeight(20.3f);
|
||||
root_child0.setHeight(20.3f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child0_child0 = new CSSNode();
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setFlexBasis(0.3f);
|
||||
root_child0_child0.setPosition(Spacing.BOTTOM, 13.3f);
|
||||
root_child0_child0.setStyleHeight(9.9f);
|
||||
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(Spacing.TOP, 13.3f);
|
||||
root_child0_child1.setStyleHeight(1.1f);
|
||||
root_child0_child1.setHeight(1.1f);
|
||||
root_child0.addChildAt(root_child0_child1, 1);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1.6f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1.1f);
|
||||
root_child2.setStyleHeight(10.7f);
|
||||
root_child2.setHeight(10.7f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -507,23 +507,23 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -579,23 +579,23 @@ public class CSSLayoutRoundingTest {
|
||||
CSSNode.setExperimentalFeatureEnabled(CSSExperimentalFeature.ROUNDING, true);
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113.6f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.6f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -652,23 +652,23 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPosition(Spacing.TOP, 0.3f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
@@ -725,23 +725,23 @@ public class CSSLayoutRoundingTest {
|
||||
|
||||
final CSSNode root = new CSSNode();
|
||||
root.setPosition(Spacing.TOP, 0.7f);
|
||||
root.setStyleWidth(100f);
|
||||
root.setStyleHeight(113.4f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(113.4f);
|
||||
|
||||
final CSSNode root_child0 = new CSSNode();
|
||||
root_child0.setFlexGrow(1f);
|
||||
root_child0.setFlexBasis(50f);
|
||||
root_child0.setStyleHeight(20f);
|
||||
root_child0.setHeight(20f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final CSSNode root_child1 = new CSSNode();
|
||||
root_child1.setFlexGrow(1f);
|
||||
root_child1.setStyleHeight(10f);
|
||||
root_child1.setHeight(10f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
|
||||
final CSSNode root_child2 = new CSSNode();
|
||||
root_child2.setFlexGrow(1f);
|
||||
root_child2.setStyleHeight(10f);
|
||||
root_child2.setHeight(10f);
|
||||
root.addChildAt(root_child2, 2);
|
||||
root.setDirection(CSSDirection.LTR);
|
||||
root.calculateLayout(null);
|
||||
|
@@ -76,12 +76,12 @@ public class CSSNodeTest {
|
||||
@Test
|
||||
public void testCopyStyle() {
|
||||
final CSSNode node0 = new CSSNode();
|
||||
assertTrue(CSSConstants.isUndefined(node0.getStyleMaxHeight()));
|
||||
assertTrue(CSSConstants.isUndefined(node0.getMaxHeight()));
|
||||
|
||||
final CSSNode node1 = new CSSNode();
|
||||
node1.setStyleMaxHeight(100);
|
||||
node1.setMaxHeight(100);
|
||||
|
||||
node0.copyStyle(node1);
|
||||
assertEquals(100, (int) node0.getStyleMaxHeight());
|
||||
assertEquals(100, (int) node0.getMaxHeight());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user