Import "Fix percent absolute position and size calcuate different with web" behind experimental feature (#1028) (#1201)
Summary: Fixes https://github.com/facebook/yoga/issues/850 https://github.com/facebook/yoga/issues/850 describes a conformance issue where positioning of an absolute child using percentages is not calculated against the correct box size. This takes the fix for that in https://github.com/facebook/yoga/pull/1028, regenerates tests, and fixes tests so that the experimental feature can be enabled. Goal is to run this as an experiment internally to see if we can enable by default. Changelog: [Internal] Pull Request resolved: https://github.com/facebook/yoga/pull/1201 Reviewed By: yungsters Differential Revision: D42282358 Pulled By: NickGerleman fbshipit-source-id: 57c0dd9b0f1c47cb9335ff6e13d44b4646e5fa58
This commit is contained in:
committed by
Facebook GitHub Bot
parent
627255c0e4
commit
7e96b65790
@@ -10,7 +10,9 @@
|
||||
package com.facebook.yoga;
|
||||
|
||||
public enum YogaExperimentalFeature {
|
||||
WEB_FLEX_BASIS(0);
|
||||
WEB_FLEX_BASIS(0),
|
||||
ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE(1),
|
||||
FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN(2);
|
||||
|
||||
private final int mIntValue;
|
||||
|
||||
@@ -25,6 +27,8 @@ public enum YogaExperimentalFeature {
|
||||
public static YogaExperimentalFeature fromInt(int value) {
|
||||
switch (value) {
|
||||
case 0: return WEB_FLEX_BASIS;
|
||||
case 1: return ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE;
|
||||
case 2: return FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN;
|
||||
default: throw new IllegalArgumentException("Unknown enum value: " + value);
|
||||
}
|
||||
}
|
||||
|
@@ -27,6 +27,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_width_height_start_top() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -69,6 +71,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_width_height_end_bottom() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -111,6 +115,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_start_top_end_bottom() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -153,6 +159,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_width_height_start_top_end_bottom() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -197,6 +205,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -254,6 +264,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_within_border() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setMargin(YogaEdge.LEFT, 10f);
|
||||
@@ -370,6 +382,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_align_items_and_justify_content_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -413,6 +427,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_align_items_and_justify_content_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
@@ -456,6 +472,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_justify_content_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -498,6 +516,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_align_items_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -540,6 +560,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_align_items_center_on_child_only() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexGrow(1f);
|
||||
@@ -582,6 +604,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_align_items_and_justify_content_center_and_top_position() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -626,6 +650,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_align_items_and_justify_content_center_and_bottom_position() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -670,6 +696,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_align_items_and_justify_content_center_and_left_position() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -714,6 +742,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_align_items_and_justify_content_center_and_right_position() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -758,6 +788,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_position_root_with_rtl_should_position_withoutdirection() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setPosition(YogaEdge.LEFT, 72f);
|
||||
@@ -783,6 +815,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_percentage_bottom_based_on_parent_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -858,6 +892,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_in_wrap_reverse_column_container() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWrap(YogaWrap.WRAP_REVERSE);
|
||||
@@ -899,6 +935,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_in_wrap_reverse_row_container() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -941,6 +979,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_in_wrap_reverse_column_container_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWrap(YogaWrap.WRAP_REVERSE);
|
||||
@@ -983,6 +1023,8 @@ public class YGAbsolutePositionTest {
|
||||
@Test
|
||||
public void test_absolute_layout_in_wrap_reverse_row_container_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1023,6 +1065,153 @@ public class YGAbsolutePositionTest {
|
||||
assertEquals(20f, root_child0.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_percent_absolute_position_infinite_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(300f);
|
||||
|
||||
final YogaNode root_child0 = createNode(config);
|
||||
root_child0.setWidth(300f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final YogaNode root_child1 = createNode(config);
|
||||
root_child1.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child1.setPositionPercent(YogaEdge.LEFT, 20f);
|
||||
root_child1.setPositionPercent(YogaEdge.TOP, 20f);
|
||||
root_child1.setWidthPercent(20f);
|
||||
root_child1.setHeightPercent(20f);
|
||||
root.addChildAt(root_child1, 1);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
assertEquals(300f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(300f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(60f, root_child1.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child1.getLayoutY(), 0.0f);
|
||||
assertEquals(60f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child1.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
assertEquals(300f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(300f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(60f, root_child1.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child1.getLayoutY(), 0.0f);
|
||||
assertEquals(60f, root_child1.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child1.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_absolute_layout_percentage_height_based_on_padded_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setPadding(YogaEdge.TOP, 10);
|
||||
root.setBorder(YogaEdge.TOP, 10f);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final YogaNode root_child0 = createNode(config);
|
||||
root_child0.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child0.setWidth(100f);
|
||||
root_child0.setHeightPercent(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(10f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_absolute_layout_percentage_height_based_on_padded_parent_and_align_items_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
root.setPadding(YogaEdge.TOP, 20);
|
||||
root.setPadding(YogaEdge.BOTTOM, 20);
|
||||
root.setWidth(100f);
|
||||
root.setHeight(100f);
|
||||
|
||||
final YogaNode root_child0 = createNode(config);
|
||||
root_child0.setPositionType(YogaPositionType.ABSOLUTE);
|
||||
root_child0.setWidth(100f);
|
||||
root_child0.setHeightPercent(50f);
|
||||
root.addChildAt(root_child0, 0);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(25f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(100f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(25f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(100f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(50f, root_child0.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
|
||||
private YogaNode createNode(YogaConfig config) {
|
||||
return mNodeFactory.create(config);
|
||||
}
|
||||
|
@@ -27,6 +27,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -128,6 +130,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_flex_start_without_height_on_children() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
@@ -225,6 +229,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_flex_start_with_flex() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
@@ -328,6 +334,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignContent(YogaAlign.FLEX_END);
|
||||
@@ -429,6 +437,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignContent(YogaAlign.STRETCH);
|
||||
@@ -525,6 +535,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_spacebetween() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -627,6 +639,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_spacearound() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -729,6 +743,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -826,6 +842,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row_with_children() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -939,6 +957,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row_with_flex() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1042,6 +1062,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row_with_flex_no_shrink() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1144,6 +1166,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row_with_margin() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1249,6 +1273,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row_with_padding() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1354,6 +1380,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row_with_single_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1409,6 +1437,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row_with_fixed_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1507,6 +1537,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row_with_max_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1605,6 +1637,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_row_with_min_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1703,6 +1737,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignContent(YogaAlign.STRETCH);
|
||||
@@ -1818,6 +1854,8 @@ public class YGAlignContentTest {
|
||||
@Test
|
||||
public void test_align_content_stretch_is_not_overriding_align_items() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignContent(YogaAlign.STRETCH);
|
||||
|
@@ -27,6 +27,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_stretch() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -65,6 +67,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -105,6 +109,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.FLEX_START);
|
||||
@@ -145,6 +151,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.FLEX_END);
|
||||
@@ -185,6 +193,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -241,6 +251,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -312,6 +324,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_child_multiline() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -430,6 +444,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_child_multiline_override() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -550,6 +566,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_child_multiline_no_override_on_secondline() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -669,6 +687,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_child_top() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -741,6 +761,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_child_top2() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -813,6 +835,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_double_nested_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -899,6 +923,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.BASELINE);
|
||||
@@ -954,6 +980,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_child_margin() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1033,6 +1061,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_child_padding() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1112,6 +1142,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_multiline() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1229,6 +1261,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_multiline_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.BASELINE);
|
||||
@@ -1345,6 +1379,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_multiline_column2() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.BASELINE);
|
||||
@@ -1461,6 +1497,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_baseline_multiline_row_and_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1578,6 +1616,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_center_child_with_margin_bigger_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1635,6 +1675,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_flex_end_child_with_margin_bigger_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1692,6 +1734,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_center_child_without_margin_bigger_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1747,6 +1791,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_items_flex_end_child_without_margin_bigger_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1802,6 +1848,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_center_should_size_based_on_content() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1873,6 +1921,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_stretch_should_size_based_on_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setMargin(YogaEdge.TOP, 20f);
|
||||
@@ -1943,6 +1993,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_flex_start_with_shrinking_children() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(500f);
|
||||
@@ -2011,6 +2063,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_flex_start_with_stretching_children() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(500f);
|
||||
@@ -2078,6 +2132,8 @@ public class YGAlignItemsTest {
|
||||
@Test
|
||||
public void test_align_flex_start_with_shrinking_children_with_stretch() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(500f);
|
||||
|
@@ -27,6 +27,8 @@ public class YGAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -67,6 +69,8 @@ public class YGAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -107,6 +111,8 @@ public class YGAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -147,6 +153,8 @@ public class YGAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_flex_end_override_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.FLEX_START);
|
||||
@@ -188,6 +196,8 @@ public class YGAlignSelfTest {
|
||||
@Test
|
||||
public void test_align_self_baseline() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
|
@@ -27,6 +27,8 @@ public class YGAndroidNewsFeed {
|
||||
@Test
|
||||
public void test_android_news_feed() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignContent(YogaAlign.STRETCH);
|
||||
|
@@ -27,6 +27,8 @@ public class YGBorderTest {
|
||||
@Test
|
||||
public void test_border_no_size() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setBorder(YogaEdge.LEFT, 10f);
|
||||
@@ -53,6 +55,8 @@ public class YGBorderTest {
|
||||
@Test
|
||||
public void test_border_container_match_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setBorder(YogaEdge.LEFT, 10f);
|
||||
@@ -94,6 +98,8 @@ public class YGBorderTest {
|
||||
@Test
|
||||
public void test_border_flex_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setBorder(YogaEdge.LEFT, 10f);
|
||||
@@ -137,6 +143,8 @@ public class YGBorderTest {
|
||||
@Test
|
||||
public void test_border_stretch_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setBorder(YogaEdge.LEFT, 10f);
|
||||
@@ -179,6 +187,8 @@ public class YGBorderTest {
|
||||
@Test
|
||||
public void test_border_center_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
|
@@ -27,6 +27,8 @@ public class YGDimensionTest {
|
||||
@Test
|
||||
public void test_wrap_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
|
||||
@@ -64,6 +66,8 @@ public class YGDimensionTest {
|
||||
@Test
|
||||
public void test_wrap_grandchild() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
|
||||
|
@@ -27,6 +27,8 @@ public class YGDisplayTest {
|
||||
@Test
|
||||
public void test_display_none() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -81,6 +83,8 @@ public class YGDisplayTest {
|
||||
@Test
|
||||
public void test_display_none_fixed_size() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -136,6 +140,8 @@ public class YGDisplayTest {
|
||||
@Test
|
||||
public void test_display_none_with_margin() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -195,6 +201,8 @@ public class YGDisplayTest {
|
||||
@Test
|
||||
public void test_display_none_with_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -286,6 +294,8 @@ public class YGDisplayTest {
|
||||
@Test
|
||||
public void test_display_none_with_position() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -341,6 +351,8 @@ public class YGDisplayTest {
|
||||
@Test
|
||||
public void test_display_none_with_position_absolute() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
|
@@ -27,6 +27,8 @@ public class YGFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_column_no_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -92,6 +94,8 @@ public class YGFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_row_no_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -158,6 +162,8 @@ public class YGFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -224,6 +230,8 @@ public class YGFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -291,6 +299,8 @@ public class YGFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_column_reverse() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE);
|
||||
@@ -358,6 +368,8 @@ public class YGFlexDirectionTest {
|
||||
@Test
|
||||
public void test_flex_direction_row_reverse() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW_REVERSE);
|
||||
|
@@ -27,6 +27,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_grow_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -80,6 +82,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_shrink_flex_grow_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -137,6 +141,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_shrink_flex_grow_child_flex_shrink_other_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -195,6 +201,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_grow_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -249,6 +257,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_shrink_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -302,6 +312,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_flex_shrink_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -356,6 +368,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_shrink_to_zero() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setHeight(75f);
|
||||
@@ -425,6 +439,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_basis_overrides_main_size() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -495,6 +511,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_grow_shrink_at_most() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -547,6 +565,8 @@ public class YGFlexTest {
|
||||
@Test
|
||||
public void test_flex_grow_less_than_factor_one() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
|
@@ -27,6 +27,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWrap(YogaWrap.WRAP);
|
||||
@@ -111,6 +113,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -196,6 +200,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_row_align_items_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -282,6 +288,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_row_align_items_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -368,6 +376,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_flex_wrap_children_with_min_main_overriding_flex_basis() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -425,6 +435,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_flex_wrap_wrap_to_child_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
|
||||
@@ -507,6 +519,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_flex_wrap_align_stretch_fits_one_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -561,6 +575,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_reverse_row_align_content_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -661,6 +677,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_reverse_row_align_content_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -762,6 +780,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_reverse_row_single_line_different_size() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -862,6 +882,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_reverse_row_align_content_stretch() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -963,6 +985,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_reverse_row_align_content_space_around() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1064,6 +1088,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_reverse_column_fixed_size() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1165,6 +1191,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrapped_row_within_align_items_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1235,6 +1263,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrapped_row_within_align_items_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.FLEX_START);
|
||||
@@ -1305,6 +1335,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrapped_row_within_align_items_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.FLEX_END);
|
||||
@@ -1375,6 +1407,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrapped_column_max_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1453,6 +1487,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrapped_column_max_height_flex() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1537,6 +1573,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_nodes_with_content_sizing_overflowing_margin() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(500f);
|
||||
@@ -1634,6 +1672,8 @@ public class YGFlexWrapTest {
|
||||
@Test
|
||||
public void test_wrap_nodes_with_content_sizing_margin_cross() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(500f);
|
||||
|
@@ -27,6 +27,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_flexible() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -102,6 +104,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_inflexible() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -170,6 +174,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_mixed_flexible() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -240,6 +246,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_child_margins() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -320,6 +328,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_row_gap_wrapping() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -482,6 +492,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_justify_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -550,6 +562,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_justify_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -619,6 +633,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_justify_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -688,6 +704,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_justify_space_between() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -757,6 +775,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_justify_space_around() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -826,6 +846,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_justify_space_evenly() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -895,6 +917,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_wrap_align_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1013,6 +1037,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_wrap_align_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1132,6 +1158,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_wrap_align_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1251,6 +1279,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_wrap_align_space_between() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1370,6 +1400,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_wrap_align_space_around() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1489,6 +1521,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_wrap_align_stretch() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1592,6 +1626,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_column_gap_determines_parent_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1659,6 +1695,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_row_gap_align_items_stretch() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1772,6 +1810,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_row_gap_align_items_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1885,6 +1925,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_row_gap_column_child_margins() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -1964,6 +2006,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_row_gap_row_wrap_child_margins() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -2039,6 +2083,8 @@ public class YGGapTest {
|
||||
@Test
|
||||
public void test_row_gap_determines_parent_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
|
@@ -27,6 +27,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -94,6 +96,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -162,6 +166,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -230,6 +236,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_space_between() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -298,6 +306,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_space_around() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -366,6 +376,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_flex_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(102f);
|
||||
@@ -432,6 +444,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_flex_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
@@ -499,6 +513,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -566,6 +582,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_space_between() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.SPACE_BETWEEN);
|
||||
@@ -633,6 +651,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_space_around() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.SPACE_AROUND);
|
||||
@@ -700,6 +720,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_min_width_and_margin() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -741,6 +763,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_max_width_and_margin() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -783,6 +807,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_min_height_and_margin() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -823,6 +849,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_colunn_max_height_and_margin() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -864,6 +892,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_column_space_evenly() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.SPACE_EVENLY);
|
||||
@@ -931,6 +961,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_row_space_evenly() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -999,6 +1031,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_min_width_with_padding_child_width_greater_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignContent(YogaAlign.STRETCH);
|
||||
@@ -1075,6 +1109,8 @@ public class YGJustifyContentTest {
|
||||
@Test
|
||||
public void test_justify_content_min_width_with_padding_child_width_lower_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignContent(YogaAlign.STRETCH);
|
||||
|
@@ -27,6 +27,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_start() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -67,6 +69,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_top() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -106,6 +110,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -147,6 +153,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_bottom() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
@@ -187,6 +195,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_flex_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -228,6 +238,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_flex_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -268,6 +280,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_stretch_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -309,6 +323,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_and_stretch_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -349,6 +365,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_with_sibling_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -403,6 +421,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_with_sibling_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -456,6 +476,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_bottom() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -512,6 +534,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_top() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -568,6 +592,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_bottom_and_top() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -625,6 +651,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_bottom_and_top_justify_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -682,6 +710,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_mutiple_children_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -754,6 +784,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_mutiple_children_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -827,6 +859,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_left_and_right_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -885,6 +919,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_left_and_right() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -941,6 +977,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_start_and_end_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -999,6 +1037,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_start_and_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -1055,6 +1095,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_left_and_right_column_and_center() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1112,6 +1154,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_left() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1168,6 +1212,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_right() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1224,6 +1270,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_left_and_right_stretch() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1281,6 +1329,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_top_and_bottom_stretch() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -1337,6 +1387,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_should_not_be_part_of_max_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(250f);
|
||||
@@ -1378,6 +1430,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_should_not_be_part_of_max_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(250f);
|
||||
@@ -1419,6 +1473,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_left_right_child_bigger_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1461,6 +1517,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_left_child_bigger_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1502,6 +1560,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_fix_left_auto_right_child_bigger_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1544,6 +1604,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_left_fix_right_child_bigger_than_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1586,6 +1648,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_top_stretching_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -1643,6 +1707,8 @@ public class YGMarginTest {
|
||||
@Test
|
||||
public void test_margin_auto_left_stretching_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
|
@@ -27,6 +27,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_max_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -66,6 +68,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_max_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -106,6 +110,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_justify_content_min_max() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -147,6 +153,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_align_items_min_max() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.CENTER);
|
||||
@@ -188,6 +196,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_justify_content_overflow_min_max() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -258,6 +268,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_to_min() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -312,6 +324,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_in_at_most_container() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -367,6 +381,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -406,6 +422,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_constrained_min_max_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setMinHeight(100f);
|
||||
@@ -458,6 +476,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_max_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -512,6 +532,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_constrained_max_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -566,6 +588,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_root_ignored() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexGrow(1f);
|
||||
@@ -621,6 +645,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_root_minimized() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -691,6 +717,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_height_maximized() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -760,6 +788,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_constrained_min_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -813,6 +843,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_constrained_min_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setMinHeight(100f);
|
||||
@@ -864,6 +896,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_constrained_max_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -932,6 +966,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_flex_grow_within_constrained_max_column() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -985,6 +1021,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_child_min_max_width_flexing() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -1042,6 +1080,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_min_width_overrides_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(50f);
|
||||
@@ -1066,6 +1106,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_max_width_overrides_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -1090,6 +1132,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_min_height_overrides_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setHeight(50f);
|
||||
@@ -1114,6 +1158,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_max_height_overrides_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setHeight(200f);
|
||||
@@ -1138,6 +1184,8 @@ public class YGMinMaxDimensionTest {
|
||||
@Test
|
||||
public void test_min_max_percent_no_width_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setAlignItems(YogaAlign.FLEX_START);
|
||||
|
@@ -27,6 +27,8 @@ public class YGPaddingTest {
|
||||
@Test
|
||||
public void test_padding_no_size() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setPadding(YogaEdge.LEFT, 10);
|
||||
@@ -53,6 +55,8 @@ public class YGPaddingTest {
|
||||
@Test
|
||||
public void test_padding_container_match_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setPadding(YogaEdge.LEFT, 10);
|
||||
@@ -94,6 +98,8 @@ public class YGPaddingTest {
|
||||
@Test
|
||||
public void test_padding_flex_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setPadding(YogaEdge.LEFT, 10);
|
||||
@@ -137,6 +143,8 @@ public class YGPaddingTest {
|
||||
@Test
|
||||
public void test_padding_stretch_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setPadding(YogaEdge.LEFT, 10);
|
||||
@@ -179,6 +187,8 @@ public class YGPaddingTest {
|
||||
@Test
|
||||
public void test_padding_center_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -223,6 +233,8 @@ public class YGPaddingTest {
|
||||
@Test
|
||||
public void test_child_with_padding_align_end() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.FLEX_END);
|
||||
|
@@ -27,6 +27,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_width_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -67,6 +69,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_position_left_top() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -109,6 +113,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_position_bottom_right() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -151,6 +157,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_flex_basis() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -206,6 +214,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_flex_basis_cross() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -260,6 +270,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_flex_basis_main_max_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -317,6 +329,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_flex_basis_cross_max_height() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -373,6 +387,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_flex_basis_main_max_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -430,6 +446,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_flex_basis_cross_max_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -486,6 +504,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_flex_basis_main_min_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -543,6 +563,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_flex_basis_cross_min_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -599,6 +621,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_multiple_nested_with_padding_margin_and_percentage_values() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -707,6 +731,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_margin_should_calculate_based_only_on_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -764,6 +790,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_padding_should_calculate_based_only_on_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -821,6 +849,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_absolute_position() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(200f);
|
||||
@@ -863,6 +893,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_width_height_undefined_parent_size() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
|
||||
@@ -900,6 +932,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percent_within_flex_grow() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -981,6 +1015,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percentage_container_in_wrapping_container() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setJustifyContent(YogaJustify.CENTER);
|
||||
@@ -1066,6 +1102,8 @@ public class YGPercentageTest {
|
||||
@Test
|
||||
public void test_percent_absolute_position() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(60f);
|
||||
|
@@ -27,6 +27,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_flex_basis_flex_grow_row_width_of_100() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -94,6 +96,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_flex_basis_flex_grow_row_prime_number_width() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -189,6 +193,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_flex_basis_flex_shrink_row() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -257,6 +263,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_flex_basis_overrides_main_size() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -327,6 +335,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_total_fractial() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(87.4f);
|
||||
@@ -397,6 +407,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_total_fractial_nested() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(87.4f);
|
||||
@@ -501,6 +513,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_fractial_input_1() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -571,6 +585,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_fractial_input_2() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -641,6 +657,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_fractial_input_3() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setPosition(YogaEdge.TOP, 0.3f);
|
||||
@@ -712,6 +730,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_fractial_input_4() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setPosition(YogaEdge.TOP, 0.7f);
|
||||
@@ -783,6 +803,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_inner_node_controversy_horizontal() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
@@ -867,6 +889,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_inner_node_controversy_vertical() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setHeight(320f);
|
||||
@@ -950,6 +974,8 @@ public class YGRoundingTest {
|
||||
@Test
|
||||
public void test_rounding_inner_node_controversy_combined() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setFlexDirection(YogaFlexDirection.ROW);
|
||||
|
@@ -27,6 +27,8 @@ public class YGSizeOverflowTest {
|
||||
@Test
|
||||
public void test_nested_overflowing_child() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -79,6 +81,8 @@ public class YGSizeOverflowTest {
|
||||
@Test
|
||||
public void test_nested_overflowing_child_in_constraint_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
@@ -133,6 +137,8 @@ public class YGSizeOverflowTest {
|
||||
@Test
|
||||
public void test_parent_wrap_child_size_overflowing_parent() {
|
||||
YogaConfig config = YogaConfigFactory.create();
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
|
||||
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);
|
||||
|
||||
final YogaNode root = createNode(config);
|
||||
root.setWidth(100f);
|
||||
|
Reference in New Issue
Block a user