|
|
|
@@ -184,9 +184,7 @@ TEST(YogaTest, absolute_layout_width_height_start_top_end_bottom) {
|
|
|
|
|
YGConfigFree(config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(
|
|
|
|
|
YogaTest,
|
|
|
|
|
do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent) {
|
|
|
|
|
TEST(YogaTest, do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent) {
|
|
|
|
|
const YGConfigRef config = YGConfigNew();
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root = YGNodeNewWithConfig(config);
|
|
|
|
@@ -578,9 +576,7 @@ TEST(YogaTest, absolute_layout_align_items_center_on_child_only) {
|
|
|
|
|
YGConfigFree(config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(
|
|
|
|
|
YogaTest,
|
|
|
|
|
absolute_layout_align_items_and_justify_content_center_and_top_position) {
|
|
|
|
|
TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_top_position) {
|
|
|
|
|
const YGConfigRef config = YGConfigNew();
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root = YGNodeNewWithConfig(config);
|
|
|
|
@@ -625,9 +621,7 @@ TEST(
|
|
|
|
|
YGConfigFree(config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(
|
|
|
|
|
YogaTest,
|
|
|
|
|
absolute_layout_align_items_and_justify_content_center_and_bottom_position) {
|
|
|
|
|
TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_bottom_position) {
|
|
|
|
|
const YGConfigRef config = YGConfigNew();
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root = YGNodeNewWithConfig(config);
|
|
|
|
@@ -672,9 +666,7 @@ TEST(
|
|
|
|
|
YGConfigFree(config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(
|
|
|
|
|
YogaTest,
|
|
|
|
|
absolute_layout_align_items_and_justify_content_center_and_left_position) {
|
|
|
|
|
TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_left_position) {
|
|
|
|
|
const YGConfigRef config = YGConfigNew();
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root = YGNodeNewWithConfig(config);
|
|
|
|
@@ -719,9 +711,7 @@ TEST(
|
|
|
|
|
YGConfigFree(config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(
|
|
|
|
|
YogaTest,
|
|
|
|
|
absolute_layout_align_items_and_justify_content_center_and_right_position) {
|
|
|
|
|
TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_right_position) {
|
|
|
|
|
const YGConfigRef config = YGConfigNew();
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root = YGNodeNewWithConfig(config);
|
|
|
|
@@ -1039,3 +1029,46 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_row_container_flex_end) {
|
|
|
|
|
|
|
|
|
|
YGConfigFree(config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TEST(YogaTest, absolute_layout_percentage_from_padded_parent) {
|
|
|
|
|
const YGConfigRef config = YGConfigNew();
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root = YGNodeNewWithConfig(config);
|
|
|
|
|
YGNodeStyleSetPadding(root, YGEdgeTop, 100);
|
|
|
|
|
YGNodeStyleSetBorder(root, YGEdgeTop, 100);
|
|
|
|
|
YGNodeStyleSetWidth(root, 750);
|
|
|
|
|
YGNodeStyleSetHeight(root, 1000);
|
|
|
|
|
|
|
|
|
|
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
|
|
|
|
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
|
|
|
|
YGNodeStyleSetWidth(root_child0, 750);
|
|
|
|
|
YGNodeStyleSetHeightPercent(root_child0, 50);
|
|
|
|
|
YGNodeInsertChild(root, root_child0, 0);
|
|
|
|
|
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
|
|
|
|
|
|
|
|
|
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root));
|
|
|
|
|
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root));
|
|
|
|
|
ASSERT_FLOAT_EQ(750, YGNodeLayoutGetWidth(root));
|
|
|
|
|
ASSERT_FLOAT_EQ(1000, YGNodeLayoutGetHeight(root));
|
|
|
|
|
|
|
|
|
|
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
|
|
|
|
|
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0));
|
|
|
|
|
ASSERT_FLOAT_EQ(750, YGNodeLayoutGetWidth(root_child0));
|
|
|
|
|
ASSERT_FLOAT_EQ(500, YGNodeLayoutGetHeight(root_child0));
|
|
|
|
|
|
|
|
|
|
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
|
|
|
|
|
|
|
|
|
|
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root));
|
|
|
|
|
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root));
|
|
|
|
|
ASSERT_FLOAT_EQ(750, YGNodeLayoutGetWidth(root));
|
|
|
|
|
ASSERT_FLOAT_EQ(1000, YGNodeLayoutGetHeight(root));
|
|
|
|
|
|
|
|
|
|
ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0));
|
|
|
|
|
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetTop(root_child0));
|
|
|
|
|
ASSERT_FLOAT_EQ(750, YGNodeLayoutGetWidth(root_child0));
|
|
|
|
|
ASSERT_FLOAT_EQ(500, YGNodeLayoutGetHeight(root_child0));
|
|
|
|
|
|
|
|
|
|
YGNodeFreeRecursive(root);
|
|
|
|
|
|
|
|
|
|
YGConfigFree(config);
|
|
|
|
|
}
|
|
|
|
|