|
|
@@ -24,11 +24,11 @@ static YGSize _measure(YGNodeRef node,
|
|
|
|
TEST(YogaTest, aspect_ratio_cross_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_cross_defined) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -45,11 +45,11 @@ TEST(YogaTest, aspect_ratio_cross_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_main_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_main_defined) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -67,12 +67,12 @@ TEST(YogaTest, aspect_ratio_both_dimensions_defined_row) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 100);
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -89,12 +89,12 @@ TEST(YogaTest, aspect_ratio_both_dimensions_defined_row) {
|
|
|
|
TEST(YogaTest, aspect_ratio_both_dimensions_defined_column) {
|
|
|
|
TEST(YogaTest, aspect_ratio_both_dimensions_defined_column) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 100);
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -110,8 +110,8 @@ TEST(YogaTest, aspect_ratio_both_dimensions_defined_column) {
|
|
|
|
|
|
|
|
|
|
|
|
TEST(YogaTest, aspect_ratio_align_stretch) {
|
|
|
|
TEST(YogaTest, aspect_ratio_align_stretch) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
@@ -130,11 +130,11 @@ TEST(YogaTest, aspect_ratio_align_stretch) {
|
|
|
|
TEST(YogaTest, aspect_ratio_flex_grow) {
|
|
|
|
TEST(YogaTest, aspect_ratio_flex_grow) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
@@ -152,11 +152,11 @@ TEST(YogaTest, aspect_ratio_flex_grow) {
|
|
|
|
TEST(YogaTest, aspect_ratio_flex_shrink) {
|
|
|
|
TEST(YogaTest, aspect_ratio_flex_shrink) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(150));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 150);
|
|
|
|
YGNodeStyleSetFlexShrink(root_child0, 1);
|
|
|
|
YGNodeStyleSetFlexShrink(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
@@ -174,11 +174,11 @@ TEST(YogaTest, aspect_ratio_flex_shrink) {
|
|
|
|
TEST(YogaTest, aspect_ratio_basis) {
|
|
|
|
TEST(YogaTest, aspect_ratio_basis) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetFlexBasis(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetFlexBasis(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -194,14 +194,14 @@ TEST(YogaTest, aspect_ratio_basis) {
|
|
|
|
|
|
|
|
|
|
|
|
TEST(YogaTest, aspect_ratio_absolute_layout_width_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_absolute_layout_width_defined) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
|
|
|
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, YGPx(0));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 0);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeTop, YGPx(0));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 0);
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -217,14 +217,14 @@ TEST(YogaTest, aspect_ratio_absolute_layout_width_defined) {
|
|
|
|
|
|
|
|
|
|
|
|
TEST(YogaTest, aspect_ratio_absolute_layout_height_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_absolute_layout_height_defined) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
|
|
|
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, YGPx(0));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 0);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeTop, YGPx(0));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 0);
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -241,12 +241,12 @@ TEST(YogaTest, aspect_ratio_absolute_layout_height_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_max_cross_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_max_cross_defined) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetMaxWidth(root_child0, YGPx(40));
|
|
|
|
YGNodeStyleSetMaxWidth(root_child0, 40);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -263,12 +263,12 @@ TEST(YogaTest, aspect_ratio_with_max_cross_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_max_main_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_max_main_defined) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 50);
|
|
|
|
YGNodeStyleSetMaxHeight(root_child0, YGPx(40));
|
|
|
|
YGNodeStyleSetMaxHeight(root_child0, 40);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -285,12 +285,12 @@ TEST(YogaTest, aspect_ratio_with_max_main_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_min_cross_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_min_cross_defined) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(30));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 30);
|
|
|
|
YGNodeStyleSetMinWidth(root_child0, YGPx(40));
|
|
|
|
YGNodeStyleSetMinWidth(root_child0, 40);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -307,12 +307,12 @@ TEST(YogaTest, aspect_ratio_with_min_cross_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_min_main_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_min_main_defined) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(30));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 30);
|
|
|
|
YGNodeStyleSetMinHeight(root_child0, YGPx(40));
|
|
|
|
YGNodeStyleSetMinHeight(root_child0, 40);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -329,11 +329,11 @@ TEST(YogaTest, aspect_ratio_with_min_main_defined) {
|
|
|
|
TEST(YogaTest, aspect_ratio_double_cross) {
|
|
|
|
TEST(YogaTest, aspect_ratio_double_cross) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 2);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 2);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -350,11 +350,11 @@ TEST(YogaTest, aspect_ratio_double_cross) {
|
|
|
|
TEST(YogaTest, aspect_ratio_half_cross) {
|
|
|
|
TEST(YogaTest, aspect_ratio_half_cross) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 100);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 0.5);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 0.5);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -371,11 +371,11 @@ TEST(YogaTest, aspect_ratio_half_cross) {
|
|
|
|
TEST(YogaTest, aspect_ratio_double_main) {
|
|
|
|
TEST(YogaTest, aspect_ratio_double_main) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 0.5);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 0.5);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -392,11 +392,11 @@ TEST(YogaTest, aspect_ratio_double_main) {
|
|
|
|
TEST(YogaTest, aspect_ratio_half_main) {
|
|
|
|
TEST(YogaTest, aspect_ratio_half_main) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 100);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 2);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 2);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -413,8 +413,8 @@ TEST(YogaTest, aspect_ratio_half_main) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_measure_func) {
|
|
|
|
TEST(YogaTest, aspect_ratio_with_measure_func) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeSetMeasureFunc(root_child0, _measure);
|
|
|
|
YGNodeSetMeasureFunc(root_child0, _measure);
|
|
|
@@ -435,12 +435,12 @@ TEST(YogaTest, aspect_ratio_width_height_flex_grow_row) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(200));
|
|
|
|
YGNodeStyleSetHeight(root, 200);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 50);
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
@@ -458,12 +458,12 @@ TEST(YogaTest, aspect_ratio_width_height_flex_grow_row) {
|
|
|
|
TEST(YogaTest, aspect_ratio_width_height_flex_grow_column) {
|
|
|
|
TEST(YogaTest, aspect_ratio_width_height_flex_grow_column) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(200));
|
|
|
|
YGNodeStyleSetWidth(root, 200);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 50);
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
@@ -482,17 +482,17 @@ TEST(YogaTest, aspect_ratio_height_as_flex_basis) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(200));
|
|
|
|
YGNodeStyleSetWidth(root, 200);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(200));
|
|
|
|
YGNodeStyleSetHeight(root, 200);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child1 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child1 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child1, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root_child1, 100);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child1, 1);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child1, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child1, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child1, 1);
|
|
|
|
YGNodeInsertChild(root, root_child1, 1);
|
|
|
|
YGNodeInsertChild(root, root_child1, 1);
|
|
|
@@ -515,17 +515,17 @@ TEST(YogaTest, aspect_ratio_height_as_flex_basis) {
|
|
|
|
TEST(YogaTest, aspect_ratio_width_as_flex_basis) {
|
|
|
|
TEST(YogaTest, aspect_ratio_width_as_flex_basis) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(200));
|
|
|
|
YGNodeStyleSetWidth(root, 200);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(200));
|
|
|
|
YGNodeStyleSetHeight(root, 200);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 50);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child1 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child1 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child1, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root_child1, 100);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child1, 1);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child1, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child1, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child1, 1);
|
|
|
|
YGNodeInsertChild(root, root_child1, 1);
|
|
|
|
YGNodeInsertChild(root, root_child1, 1);
|
|
|
@@ -549,11 +549,11 @@ TEST(YogaTest, aspect_ratio_overrides_flex_grow_row) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 50);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 0.5);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 0.5);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
@@ -571,11 +571,11 @@ TEST(YogaTest, aspect_ratio_overrides_flex_grow_row) {
|
|
|
|
TEST(YogaTest, aspect_ratio_overrides_flex_grow_column) {
|
|
|
|
TEST(YogaTest, aspect_ratio_overrides_flex_grow_column) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetFlexGrow(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 2);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 2);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
@@ -592,14 +592,14 @@ TEST(YogaTest, aspect_ratio_overrides_flex_grow_column) {
|
|
|
|
|
|
|
|
|
|
|
|
TEST(YogaTest, aspect_ratio_left_right_absolute) {
|
|
|
|
TEST(YogaTest, aspect_ratio_left_right_absolute) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
|
|
|
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, YGPx(10));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 10);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeTop, YGPx(10));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeRight, YGPx(10));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeRight, 10);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -615,14 +615,14 @@ TEST(YogaTest, aspect_ratio_left_right_absolute) {
|
|
|
|
|
|
|
|
|
|
|
|
TEST(YogaTest, aspect_ratio_top_bottom_absolute) {
|
|
|
|
TEST(YogaTest, aspect_ratio_top_bottom_absolute) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
|
|
|
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, YGPx(10));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 10);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeTop, YGPx(10));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10);
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeBottom, YGPx(10));
|
|
|
|
YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 10);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -639,11 +639,11 @@ TEST(YogaTest, aspect_ratio_top_bottom_absolute) {
|
|
|
|
TEST(YogaTest, aspect_ratio_width_overrides_align_stretch_row) {
|
|
|
|
TEST(YogaTest, aspect_ratio_width_overrides_align_stretch_row) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetWidth(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
@@ -659,11 +659,11 @@ TEST(YogaTest, aspect_ratio_width_overrides_align_stretch_row) {
|
|
|
|
|
|
|
|
|
|
|
|
TEST(YogaTest, aspect_ratio_height_overrides_align_stretch_column) {
|
|
|
|
TEST(YogaTest, aspect_ratio_height_overrides_align_stretch_column) {
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
const YGNodeRef root = YGNodeNew();
|
|
|
|
YGNodeStyleSetWidth(root, YGPx(100));
|
|
|
|
YGNodeStyleSetWidth(root, 100);
|
|
|
|
YGNodeStyleSetHeight(root, YGPx(100));
|
|
|
|
YGNodeStyleSetHeight(root, 100);
|
|
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
const YGNodeRef root_child0 = YGNodeNew();
|
|
|
|
YGNodeStyleSetHeight(root_child0, YGPx(50));
|
|
|
|
YGNodeStyleSetHeight(root_child0, 50);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeStyleSetAspectRatio(root_child0, 1);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
|
|
|
|
|
|
|