Switch to YogaConfigFactory.create
Summary: Switch to `YogaNodeFactory.create()` instead of using `YogaNode.create()` Reviewed By: SidharthGuglani Differential Revision: D17266408 fbshipit-source-id: 69e1e59c7345d16eb174af97c2e231666a02354b
This commit is contained in:
committed by
Facebook Github Bot
parent
67a3841164
commit
d697bbe0a5
@@ -25,7 +25,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_start() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -65,7 +65,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_top() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -104,7 +104,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_end() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -145,7 +145,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_bottom() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
@@ -185,7 +185,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_and_flex_row() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -226,7 +226,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_and_flex_column() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -266,7 +266,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_and_stretch_row() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -307,7 +307,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_and_stretch_column() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -347,7 +347,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_with_sibling_row() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -401,7 +401,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_with_sibling_column() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -454,7 +454,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_bottom() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -510,7 +510,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_top() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -566,7 +566,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_bottom_and_top() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -623,7 +623,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_bottom_and_top_justify_center() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -680,7 +680,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_mutiple_children_column() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -752,7 +752,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_mutiple_children_row() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -825,7 +825,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_left_and_right_column() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -883,7 +883,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_left_and_right() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -939,7 +939,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_start_and_end_column() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -997,7 +997,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_start_and_end() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -1053,7 +1053,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_left_and_right_column_and_center() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1110,7 +1110,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_left() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1166,7 +1166,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_right() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1222,7 +1222,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_left_and_right_strech() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1279,7 +1279,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_top_and_bottom_strech() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -1335,7 +1335,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_should_not_be_part_of_max_height() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(250f);
|
||||
@@ -1376,7 +1376,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_should_not_be_part_of_max_width() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(250f);
|
||||
@@ -1417,7 +1417,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_left_right_child_bigger_than_parent() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1459,7 +1459,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_left_child_bigger_than_parent() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1500,7 +1500,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_fix_left_auto_right_child_bigger_than_parent() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1542,7 +1542,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_left_fix_right_child_bigger_than_parent() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1584,7 +1584,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_top_stretching_child() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1641,7 +1641,7 @@ public class YGMarginTest {
|
||||
|
||||
@Test
|
||||
public void test_margin_auto_left_stretching_child() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
|
Reference in New Issue
Block a user