Fix misc-misplaced-const
warnings in Yoga tests (#1677)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1677 We have Clang Tidy warnings enabled internally, that will flag `const YG*Ref` as misleading, as a const pointer to non-const, instead of non-const pointer to const. Let's remove all the misleading const in existing tests, and generated tests. Reviewed By: joevilches Differential Revision: D59335968 fbshipit-source-id: c66af878904ba7900f8ffcd99162968d90f8e5c7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e4fe14ab3e
commit
5009f5c1ac
@@ -49,7 +49,7 @@ CPPEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
this.push('');
|
||||
}
|
||||
|
||||
this.push('const YGConfigRef config = YGConfigNew();');
|
||||
this.push('YGConfigRef config = YGConfigNew();');
|
||||
for (const i in experiments) {
|
||||
this.push(
|
||||
'YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeature' +
|
||||
@@ -63,9 +63,7 @@ CPPEmitter.prototype = Object.create(Emitter.prototype, {
|
||||
|
||||
emitTestTreePrologue: {
|
||||
value: function (nodeName) {
|
||||
this.push(
|
||||
'const YGNodeRef ' + nodeName + ' = YGNodeNewWithConfig(config);',
|
||||
);
|
||||
this.push('YGNodeRef ' + nodeName + ' = YGNodeNewWithConfig(config);');
|
||||
},
|
||||
},
|
||||
|
||||
|
@@ -11,26 +11,26 @@
|
||||
// TODO: move this to a fixture based test once it supports parsing negative
|
||||
// values
|
||||
TEST(FlexGap, gap_negative_value) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetGap(root, YGGutterAll, -20);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 20);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 20);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
@@ -39,7 +39,7 @@ static YGNodeRef createYGNode(
|
||||
int width,
|
||||
int height,
|
||||
bool alignBaseline) {
|
||||
const YGNodeRef node = YGNodeNewWithConfig(config);
|
||||
YGNodeRef node = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(node, direction);
|
||||
if (alignBaseline) {
|
||||
YGNodeStyleSetAlignItems(node, YGAlignBaseline);
|
||||
@@ -53,7 +53,7 @@ static YGNodeRef createYGNode(
|
||||
TEST(YogaTest, align_baseline_parent_ht_not_specified) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignStretch);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
@@ -61,13 +61,13 @@ TEST(YogaTest, align_baseline_parent_ht_not_specified) {
|
||||
YGNodeStyleSetMaxHeight(root, 170);
|
||||
YGNodeStyleSetMinHeight(root, 0);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 0);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 0);
|
||||
YGNodeStyleSetFlexShrink(root_child1, 1);
|
||||
YGNodeSetMeasureFunc(root_child1, _measure2);
|
||||
@@ -98,17 +98,17 @@ TEST(YogaTest, align_baseline_parent_ht_not_specified) {
|
||||
TEST(YogaTest, align_baseline_with_no_parent_ht) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root, 150);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 40);
|
||||
YGNodeSetBaselineFunc(root_child1, _baselineFunc);
|
||||
@@ -139,17 +139,17 @@ TEST(YogaTest, align_baseline_with_no_parent_ht) {
|
||||
TEST(YogaTest, align_baseline_with_no_baseline_func_and_no_parent_ht) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root, 150);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 80);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -179,22 +179,21 @@ TEST(YogaTest, align_baseline_with_no_baseline_func_and_no_parent_ht) {
|
||||
TEST(YogaTest, align_baseline_parent_using_child_in_column_as_reference) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 800, false);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 300, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -224,22 +223,21 @@ TEST(
|
||||
align_baseline_parent_using_child_with_padding_in_column_as_reference) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 800, false);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 300, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -273,14 +271,13 @@ TEST(
|
||||
align_baseline_parent_with_padding_using_child_in_column_as_reference) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 800, false);
|
||||
YGNodeStyleSetPadding(root_child1, YGEdgeLeft, 100);
|
||||
YGNodeStyleSetPadding(root_child1, YGEdgeRight, 100);
|
||||
@@ -288,11 +285,11 @@ TEST(
|
||||
YGNodeStyleSetPadding(root_child1, YGEdgeBottom, 100);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 300, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -322,14 +319,13 @@ TEST(
|
||||
align_baseline_parent_with_margin_using_child_in_column_as_reference) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 800, false);
|
||||
YGNodeStyleSetMargin(root_child1, YGEdgeLeft, 100);
|
||||
YGNodeStyleSetMargin(root_child1, YGEdgeRight, 100);
|
||||
@@ -337,11 +333,11 @@ TEST(
|
||||
YGNodeStyleSetMargin(root_child1, YGEdgeBottom, 100);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 300, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -371,22 +367,21 @@ TEST(
|
||||
align_baseline_parent_using_child_with_margin_in_column_as_reference) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 800, false);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 300, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -418,22 +413,21 @@ TEST(
|
||||
TEST(YogaTest, align_baseline_parent_using_child_in_row_as_reference) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionRow, 500, 800, true);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 500, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -463,22 +457,21 @@ TEST(
|
||||
align_baseline_parent_using_child_with_padding_in_row_as_reference) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionRow, 500, 800, true);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 500, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -512,22 +505,21 @@ TEST(
|
||||
align_baseline_parent_using_child_with_margin_in_row_as_reference) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionRow, 500, 800, true);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 500, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -561,22 +553,21 @@ TEST(
|
||||
align_baseline_parent_using_child_in_column_as_reference_with_no_baseline_func) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 800, false);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 300, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
YGNodeInsertChild(root_child1, root_child1_child1, 1);
|
||||
@@ -605,22 +596,21 @@ TEST(
|
||||
align_baseline_parent_using_child_in_row_as_reference_with_no_baseline_func) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root =
|
||||
createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
YGNodeRef root = createYGNode(config, YGFlexDirectionRow, 1000, 1000, true);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 =
|
||||
YGNodeRef root_child1 =
|
||||
createYGNode(config, YGFlexDirectionRow, 500, 800, true);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 500, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
YGNodeInsertChild(root_child1, root_child1_child1, 1);
|
||||
@@ -649,25 +639,25 @@ TEST(
|
||||
align_baseline_parent_using_child_in_column_as_reference_with_height_not_specified) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root, 1000);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetWidth(root_child1, 500);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 300, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -700,25 +690,25 @@ TEST(
|
||||
align_baseline_parent_using_child_in_row_as_reference_with_height_not_specified) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root, 1000);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root_child1, 500);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 500, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetBaselineFunc(root_child1_child1, _baselineFunc);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
@@ -751,25 +741,25 @@ TEST(
|
||||
align_baseline_parent_using_child_in_column_as_reference_with_no_baseline_func_and_height_not_specified) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root, 1000);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetWidth(root_child1, 500);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 300, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
YGNodeInsertChild(root_child1, root_child1_child1, 1);
|
||||
@@ -801,25 +791,25 @@ TEST(
|
||||
align_baseline_parent_using_child_in_row_as_reference_with_no_baseline_func_and_height_not_specified) {
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root, 1000);
|
||||
|
||||
const YGNodeRef root_child0 =
|
||||
YGNodeRef root_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 600, false);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root_child1, 500);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 =
|
||||
YGNodeRef root_child1_child0 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 500, false);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 =
|
||||
YGNodeRef root_child1_child1 =
|
||||
createYGNode(config, YGFlexDirectionColumn, 500, 400, false);
|
||||
YGNodeSetIsReferenceBaseline(root_child1_child1, true);
|
||||
YGNodeInsertChild(root_child1, root_child1_child1, 1);
|
||||
|
@@ -21,12 +21,12 @@ static YGSize _measure(
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_cross_defined) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -42,12 +42,12 @@ TEST(YogaTest, aspect_ratio_cross_defined) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_main_defined) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -63,13 +63,13 @@ TEST(YogaTest, aspect_ratio_main_defined) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_both_dimensions_defined_row) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
@@ -86,12 +86,12 @@ TEST(YogaTest, aspect_ratio_both_dimensions_defined_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_both_dimensions_defined_column) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
@@ -108,11 +108,11 @@ TEST(YogaTest, aspect_ratio_both_dimensions_defined_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_align_stretch) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
@@ -127,12 +127,12 @@ TEST(YogaTest, aspect_ratio_align_stretch) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_flex_grow) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
@@ -149,12 +149,12 @@ TEST(YogaTest, aspect_ratio_flex_grow) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_flex_shrink) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 150);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
@@ -171,17 +171,17 @@ TEST(YogaTest, aspect_ratio_flex_shrink) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_flex_shrink_2) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeightPercent(root_child0, 100);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetHeightPercent(root_child1, 100);
|
||||
YGNodeStyleSetFlexShrink(root_child1, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child1, 1);
|
||||
@@ -203,12 +203,12 @@ TEST(YogaTest, aspect_ratio_flex_shrink_2) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_basis) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -224,11 +224,11 @@ TEST(YogaTest, aspect_ratio_basis) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_absolute_layout_width_defined) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 0);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 0);
|
||||
@@ -247,11 +247,11 @@ TEST(YogaTest, aspect_ratio_absolute_layout_width_defined) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_absolute_layout_height_defined) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 0);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 0);
|
||||
@@ -270,12 +270,12 @@ TEST(YogaTest, aspect_ratio_absolute_layout_height_defined) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_with_max_cross_defined) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetMaxWidth(root_child0, 40);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
@@ -292,12 +292,12 @@ TEST(YogaTest, aspect_ratio_with_max_cross_defined) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_with_max_main_defined) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetMaxHeight(root_child0, 40);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
@@ -314,12 +314,12 @@ TEST(YogaTest, aspect_ratio_with_max_main_defined) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_with_min_cross_defined) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 30);
|
||||
YGNodeStyleSetMinWidth(root_child0, 40);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
@@ -336,12 +336,12 @@ TEST(YogaTest, aspect_ratio_with_min_cross_defined) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_with_min_main_defined) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetMinHeight(root_child0, 40);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
@@ -358,12 +358,12 @@ TEST(YogaTest, aspect_ratio_with_min_main_defined) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_double_cross) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 2);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -379,12 +379,12 @@ TEST(YogaTest, aspect_ratio_double_cross) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_half_cross) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 0.5);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -400,12 +400,12 @@ TEST(YogaTest, aspect_ratio_half_cross) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_double_main) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 0.5);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -421,12 +421,12 @@ TEST(YogaTest, aspect_ratio_double_main) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_half_main) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 2);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -442,12 +442,12 @@ TEST(YogaTest, aspect_ratio_half_main) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_with_measure_func) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -463,13 +463,13 @@ TEST(YogaTest, aspect_ratio_with_measure_func) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_width_height_flex_grow_row) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
@@ -487,12 +487,12 @@ TEST(YogaTest, aspect_ratio_width_height_flex_grow_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_width_height_flex_grow_column) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
@@ -510,19 +510,19 @@ TEST(YogaTest, aspect_ratio_width_height_flex_grow_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_height_as_flex_basis) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child1, 100);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child1, 1);
|
||||
@@ -544,18 +544,18 @@ TEST(YogaTest, aspect_ratio_height_as_flex_basis) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_width_as_flex_basis) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child1, 100);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child1, 1);
|
||||
@@ -577,13 +577,13 @@ TEST(YogaTest, aspect_ratio_width_as_flex_basis) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_overrides_flex_grow_row) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 0.5);
|
||||
@@ -600,12 +600,12 @@ TEST(YogaTest, aspect_ratio_overrides_flex_grow_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_overrides_flex_grow_column) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 2);
|
||||
@@ -622,11 +622,11 @@ TEST(YogaTest, aspect_ratio_overrides_flex_grow_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_left_right_absolute) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10);
|
||||
@@ -645,11 +645,11 @@ TEST(YogaTest, aspect_ratio_left_right_absolute) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_top_bottom_absolute) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10);
|
||||
@@ -668,12 +668,12 @@ TEST(YogaTest, aspect_ratio_top_bottom_absolute) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_width_overrides_align_stretch_row) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -689,11 +689,11 @@ TEST(YogaTest, aspect_ratio_width_overrides_align_stretch_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_height_overrides_align_stretch_column) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -709,11 +709,11 @@ TEST(YogaTest, aspect_ratio_height_overrides_align_stretch_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_allow_child_overflow_parent_size) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 4);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -730,13 +730,13 @@ TEST(YogaTest, aspect_ratio_allow_child_overflow_parent_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_defined_main_with_margin) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10);
|
||||
@@ -755,13 +755,13 @@ TEST(YogaTest, aspect_ratio_defined_main_with_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_defined_cross_with_margin) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10);
|
||||
@@ -780,13 +780,13 @@ TEST(YogaTest, aspect_ratio_defined_cross_with_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_defined_cross_with_main_margin) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10);
|
||||
@@ -805,17 +805,17 @@ TEST(YogaTest, aspect_ratio_defined_cross_with_main_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_should_prefer_explicit_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
YGConfigSetUseWebDefaults(config, true);
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumn);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumn);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 100);
|
||||
YGNodeStyleSetAspectRatio(root_child0_child0, 2);
|
||||
@@ -836,17 +836,17 @@ TEST(YogaTest, aspect_ratio_should_prefer_explicit_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_should_prefer_explicit_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
YGConfigSetUseWebDefaults(config, true);
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 100);
|
||||
YGNodeStyleSetAspectRatio(root_child0_child0, 0.5);
|
||||
@@ -867,18 +867,18 @@ TEST(YogaTest, aspect_ratio_should_prefer_explicit_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, aspect_ratio_should_prefer_flexed_dimension) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
YGConfigSetUseWebDefaults(config, true);
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetAspectRatio(root_child0, 2);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAspectRatio(root_child0_child0, 4);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
@@ -15,24 +15,24 @@ _baseline(YGNodeConstRef node, const float /*width*/, const float /*height*/) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_customer_func) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
float baselineValue = 10;
|
||||
const YGNodeRef root_child1_child0 = YGNodeNew();
|
||||
YGNodeRef root_child1_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child1_child0, &baselineValue);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
YGNodeSetBaselineFunc(root_child1_child0, _baseline);
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include <array>
|
||||
|
||||
TEST(YogaTest, computed_layout_margin) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetMarginPercent(root, YGEdgeStart, 10);
|
||||
@@ -43,7 +43,7 @@ TEST(YogaTest, margin_side_overrides_horizontal_and_vertical) {
|
||||
? YGEdgeVertical
|
||||
: YGEdgeHorizontal;
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetMargin(root, horizontalOrVertical, 10);
|
||||
@@ -69,7 +69,7 @@ TEST(YogaTest, margin_side_overrides_all) {
|
||||
|
||||
for (float edgeValue = 0; edgeValue < 2; ++edgeValue) {
|
||||
for (const auto& edge : edges) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetMargin(root, YGEdgeAll, 10);
|
||||
@@ -89,7 +89,7 @@ TEST(YogaTest, margin_horizontal_and_vertical_overrides_all) {
|
||||
|
||||
for (float directionValue = 0; directionValue < 2; ++directionValue) {
|
||||
for (const auto& direction : directions) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetMargin(root, YGEdgeAll, 10);
|
||||
|
@@ -10,7 +10,7 @@
|
||||
#include <array>
|
||||
|
||||
TEST(YogaTest, computed_layout_padding) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetPaddingPercent(root, YGEdgeStart, 10);
|
||||
@@ -43,7 +43,7 @@ TEST(YogaTest, padding_side_overrides_horizontal_and_vertical) {
|
||||
? YGEdgeVertical
|
||||
: YGEdgeHorizontal;
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetPadding(root, horizontalOrVertical, 10);
|
||||
@@ -69,7 +69,7 @@ TEST(YogaTest, padding_side_overrides_all) {
|
||||
|
||||
for (float edgeValue = 0; edgeValue < 2; ++edgeValue) {
|
||||
for (const auto& edge : edges) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetPadding(root, YGEdgeAll, 10);
|
||||
@@ -89,7 +89,7 @@ TEST(YogaTest, padding_horizontal_and_vertical_overrides_all) {
|
||||
|
||||
for (float directionValue = 0; directionValue < 2; ++directionValue) {
|
||||
for (const auto& direction : directions) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetPadding(root, YGEdgeAll, 10);
|
||||
|
@@ -9,7 +9,7 @@
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
TEST(YogaTest, assert_default_values) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
|
||||
ASSERT_EQ(0u, YGNodeGetChildCount(root));
|
||||
ASSERT_EQ(nullptr, YGNodeGetChild(root, 1));
|
||||
@@ -92,7 +92,7 @@ TEST(YogaTest, assert_default_values) {
|
||||
TEST(YogaTest, assert_webdefault_values) {
|
||||
YGConfig* config = YGConfigNew();
|
||||
YGConfigSetUseWebDefaults(config, true);
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
|
||||
ASSERT_EQ(YGFlexDirectionRow, YGNodeStyleGetFlexDirection(root));
|
||||
ASSERT_EQ(YGAlignStretch, YGNodeStyleGetAlignContent(root));
|
||||
@@ -105,7 +105,7 @@ TEST(YogaTest, assert_webdefault_values) {
|
||||
TEST(YogaTest, assert_webdefault_values_reset) {
|
||||
YGConfig* config = YGConfigNew();
|
||||
YGConfigSetUseWebDefaults(config, true);
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeReset(root);
|
||||
|
||||
ASSERT_EQ(YGFlexDirectionRow, YGNodeStyleGetFlexDirection(root));
|
||||
@@ -119,20 +119,20 @@ TEST(YogaTest, assert_webdefault_values_reset) {
|
||||
TEST(YogaTest, assert_legacy_stretch_behaviour) {
|
||||
YGConfig* config = YGConfigNew();
|
||||
YGConfigSetErrata(config, YGErrataStretchFlexBasis);
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root_child0, YGAlignFlexStart);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
|
@@ -17,7 +17,7 @@ static void _dirtied(YGNodeConstRef node) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirtied) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
@@ -40,17 +40,17 @@ TEST(YogaTest, dirtied) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirtied_propagation) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -73,17 +73,17 @@ TEST(YogaTest, dirtied_propagation) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirtied_hierarchy) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
@@ -9,17 +9,17 @@
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
TEST(YogaTest, dirty_propagation) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -42,17 +42,17 @@ TEST(YogaTest, dirty_propagation) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirty_propagation_only_if_prop_changed) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -69,22 +69,22 @@ TEST(YogaTest, dirty_propagation_only_if_prop_changed) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirty_propagation_changing_layout_config) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0_child0, 25);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0_child0, 0);
|
||||
@@ -117,22 +117,22 @@ TEST(YogaTest, dirty_propagation_changing_layout_config) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirty_propagation_changing_benign_config) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeRef root_child1 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0_child0, 25);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0_child0, 0);
|
||||
@@ -162,17 +162,17 @@ TEST(YogaTest, dirty_propagation_changing_benign_config) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirty_mark_all_children_as_dirty_when_display_changes) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef child0 = YGNodeNew();
|
||||
YGNodeRef child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(child0, 1);
|
||||
const YGNodeRef child1 = YGNodeNew();
|
||||
YGNodeRef child1 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(child1, 1);
|
||||
|
||||
const YGNodeRef child1_child0 = YGNodeNew();
|
||||
const YGNodeRef child1_child0_child0 = YGNodeNew();
|
||||
YGNodeRef child1_child0 = YGNodeNew();
|
||||
YGNodeRef child1_child0_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(child1_child0_child0, 8);
|
||||
YGNodeStyleSetHeight(child1_child0_child0, 16);
|
||||
|
||||
@@ -210,19 +210,19 @@ TEST(YogaTest, dirty_mark_all_children_as_dirty_when_display_changes) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirty_node_only_if_children_are_actually_removed) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef child0 = YGNodeNew();
|
||||
YGNodeRef child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(child0, 50);
|
||||
YGNodeStyleSetHeight(child0, 25);
|
||||
YGNodeInsertChild(root, child0, 0);
|
||||
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
const YGNodeRef child1 = YGNodeNew();
|
||||
YGNodeRef child1 = YGNodeNew();
|
||||
YGNodeRemoveChild(root, child1);
|
||||
EXPECT_FALSE(YGNodeIsDirty(root));
|
||||
YGNodeFree(child1);
|
||||
@@ -235,7 +235,7 @@ TEST(YogaTest, dirty_node_only_if_children_are_actually_removed) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirty_node_only_if_undefined_values_gets_set_to_undefined) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
YGNodeStyleSetMinWidth(root, YGUndefined);
|
||||
|
@@ -9,12 +9,12 @@
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
TEST(YogaTest, start_overrides) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 20);
|
||||
@@ -33,12 +33,12 @@ TEST(YogaTest, start_overrides) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, end_overrides) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 20);
|
||||
@@ -57,12 +57,12 @@ TEST(YogaTest, end_overrides) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, horizontal_overridden) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeHorizontal, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 20);
|
||||
@@ -76,12 +76,12 @@ TEST(YogaTest, horizontal_overridden) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, vertical_overridden) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeVertical, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 20);
|
||||
@@ -95,12 +95,12 @@ TEST(YogaTest, vertical_overridden) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, horizontal_overrides_all) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeHorizontal, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeAll, 20);
|
||||
@@ -116,12 +116,12 @@ TEST(YogaTest, horizontal_overrides_all) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, vertical_overrides_all) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeVertical, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeAll, 20);
|
||||
@@ -137,12 +137,12 @@ TEST(YogaTest, vertical_overrides_all) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, all_overridden) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10);
|
||||
|
@@ -32,13 +32,13 @@ class YogaTest_HadOverflowTests : public Test {
|
||||
TEST_F(
|
||||
YogaTest_HadOverflowTests,
|
||||
children_overflow_no_wrap_and_no_flex_children) {
|
||||
const YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child0, 80);
|
||||
YGNodeStyleSetHeight(child0, 40);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeBottom, 15);
|
||||
YGNodeInsertChild(root, child0, 0);
|
||||
const YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child1, 80);
|
||||
YGNodeStyleSetHeight(child1, 40);
|
||||
YGNodeStyleSetMargin(child1, YGEdgeBottom, 5);
|
||||
@@ -52,13 +52,13 @@ TEST_F(
|
||||
TEST_F(
|
||||
YogaTest_HadOverflowTests,
|
||||
spacing_overflow_no_wrap_and_no_flex_children) {
|
||||
const YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child0, 80);
|
||||
YGNodeStyleSetHeight(child0, 40);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeBottom, 10);
|
||||
YGNodeInsertChild(root, child0, 0);
|
||||
const YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child1, 80);
|
||||
YGNodeStyleSetHeight(child1, 40);
|
||||
YGNodeStyleSetMargin(child1, YGEdgeBottom, 5);
|
||||
@@ -70,13 +70,13 @@ TEST_F(
|
||||
}
|
||||
|
||||
TEST_F(YogaTest_HadOverflowTests, no_overflow_no_wrap_and_flex_children) {
|
||||
const YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child0, 80);
|
||||
YGNodeStyleSetHeight(child0, 40);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeBottom, 10);
|
||||
YGNodeInsertChild(root, child0, 0);
|
||||
const YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child1, 80);
|
||||
YGNodeStyleSetHeight(child1, 40);
|
||||
YGNodeStyleSetMargin(child1, YGEdgeBottom, 5);
|
||||
@@ -89,13 +89,13 @@ TEST_F(YogaTest_HadOverflowTests, no_overflow_no_wrap_and_flex_children) {
|
||||
}
|
||||
|
||||
TEST_F(YogaTest_HadOverflowTests, hadOverflow_gets_reset_if_not_logger_valid) {
|
||||
const YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child0, 80);
|
||||
YGNodeStyleSetHeight(child0, 40);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeBottom, 10);
|
||||
YGNodeInsertChild(root, child0, 0);
|
||||
const YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child1, 80);
|
||||
YGNodeStyleSetHeight(child1, 40);
|
||||
YGNodeStyleSetMargin(child1, YGEdgeBottom, 5);
|
||||
@@ -113,17 +113,17 @@ TEST_F(YogaTest_HadOverflowTests, hadOverflow_gets_reset_if_not_logger_valid) {
|
||||
}
|
||||
|
||||
TEST_F(YogaTest_HadOverflowTests, spacing_overflow_in_nested_nodes) {
|
||||
const YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child0, 80);
|
||||
YGNodeStyleSetHeight(child0, 40);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(child0, YGEdgeBottom, 10);
|
||||
YGNodeInsertChild(root, child0, 0);
|
||||
const YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child1, 80);
|
||||
YGNodeStyleSetHeight(child1, 40);
|
||||
YGNodeInsertChild(root, child1, 1);
|
||||
const YGNodeRef child1_1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef child1_1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(child1_1, 80);
|
||||
YGNodeStyleSetHeight(child1_1, 40);
|
||||
YGNodeStyleSetMargin(child1_1, YGEdgeBottom, 5);
|
||||
|
@@ -58,13 +58,13 @@ static YGSize _measure_84_49(
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_once_single_flexible_child) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
int measureCount = 0;
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measureMax);
|
||||
@@ -79,9 +79,9 @@ TEST(YogaTest, measure_once_single_flexible_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, remeasure_with_same_exact_width_larger_than_needed_height) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
int measureCount = 0;
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measureMin);
|
||||
@@ -96,10 +96,10 @@ TEST(YogaTest, remeasure_with_same_exact_width_larger_than_needed_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, remeasure_with_same_atmost_width_larger_than_needed_height) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
int measureCount = 0;
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measureMin);
|
||||
@@ -114,10 +114,10 @@ TEST(YogaTest, remeasure_with_same_atmost_width_larger_than_needed_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, remeasure_with_computed_width_larger_than_needed_height) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
int measureCount = 0;
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measureMin);
|
||||
@@ -133,10 +133,10 @@ TEST(YogaTest, remeasure_with_computed_width_larger_than_needed_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, remeasure_with_atmost_computed_width_undefined_height) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
int measureCount = 0;
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measureMin);
|
||||
@@ -155,17 +155,17 @@ TEST(
|
||||
remeasure_with_already_measured_value_smaller_but_still_float_equal) {
|
||||
int measureCount = 0;
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 288.f);
|
||||
YGNodeStyleSetHeight(root, 288.f);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetPadding(root_child0, YGEdgeAll, 2.88f);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0_child0, _measure_84_49);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
@@ -48,11 +48,11 @@ TEST(YogaTest, exactly_measure_stretched_child_column) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -75,12 +75,12 @@ TEST(YogaTest, exactly_measure_stretched_child_row) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -103,11 +103,11 @@ TEST(YogaTest, at_most_main_axis_column) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -130,12 +130,12 @@ TEST(YogaTest, at_most_cross_axis_column) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -158,12 +158,12 @@ TEST(YogaTest, at_most_main_axis_row) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -186,13 +186,13 @@ TEST(YogaTest, at_most_cross_axis_row) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -215,10 +215,10 @@ TEST(YogaTest, flex_child) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
@@ -245,10 +245,10 @@ TEST(YogaTest, flex_child_with_flex_basis) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 0);
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
@@ -273,13 +273,13 @@ TEST(YogaTest, overflow_scroll_column) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetOverflow(root, YGOverflowScroll);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -305,14 +305,14 @@ TEST(YogaTest, overflow_scroll_row) {
|
||||
10 * sizeof(struct _MeasureConstraint)),
|
||||
};
|
||||
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetOverflow(root, YGOverflowScroll);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &constraintList);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
@@ -48,13 +48,13 @@ static YGSize _measure_assert_negative(
|
||||
}
|
||||
|
||||
TEST(YogaTest, dont_measure_single_grow_shrink_child) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
int measureCount = 0;
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
@@ -69,14 +69,14 @@ TEST(YogaTest, dont_measure_single_grow_shrink_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_absolute_child_with_no_constraints) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
int measureCount = 0;
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0_child0 = YGNodeNew();
|
||||
YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute);
|
||||
YGNodeSetContext(root_child0_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0_child0, _measure);
|
||||
@@ -90,14 +90,14 @@ TEST(YogaTest, measure_absolute_child_with_no_constraints) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dont_measure_when_min_equals_max) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
int measureCount = 0;
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeStyleSetMinWidth(root_child0, 10);
|
||||
@@ -118,14 +118,14 @@ TEST(YogaTest, dont_measure_when_min_equals_max) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dont_measure_when_min_equals_max_percentages) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
int measureCount = 0;
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeStyleSetMinWidthPercent(root_child0, 10);
|
||||
@@ -146,11 +146,11 @@ TEST(YogaTest, dont_measure_when_min_equals_max_percentages) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_nodes_with_margin_auto_and_stretch) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -166,14 +166,14 @@ TEST(YogaTest, measure_nodes_with_margin_auto_and_stretch) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dont_measure_when_min_equals_max_mixed_width_percent) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
int measureCount = 0;
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeStyleSetMinWidthPercent(root_child0, 10);
|
||||
@@ -194,14 +194,14 @@ TEST(YogaTest, dont_measure_when_min_equals_max_mixed_width_percent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, dont_measure_when_min_equals_max_mixed_height_percent) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
int measureCount = 0;
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure);
|
||||
YGNodeStyleSetMinWidth(root_child0, 10);
|
||||
@@ -222,10 +222,10 @@ TEST(YogaTest, dont_measure_when_min_equals_max_mixed_height_percent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_enough_size_should_be_in_single_line) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexStart);
|
||||
YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
|
||||
@@ -240,10 +240,10 @@ TEST(YogaTest, measure_enough_size_should_be_in_single_line) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_not_enough_size_should_wrap) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root, 55);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexStart);
|
||||
// YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
@@ -258,14 +258,14 @@ TEST(YogaTest, measure_not_enough_size_should_wrap) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_zero_space_should_grow) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetFlexGrow(root, 0);
|
||||
|
||||
int measureCount = 0;
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetPadding(root_child0, YGEdgeAll, 100);
|
||||
YGNodeSetContext(root_child0, &measureCount);
|
||||
@@ -282,9 +282,9 @@ TEST(YogaTest, measure_zero_space_should_grow) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_flex_direction_row_and_padding) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPadding(root, YGEdgeLeft, 25);
|
||||
YGNodeStyleSetPadding(root, YGEdgeTop, 25);
|
||||
@@ -293,11 +293,11 @@ TEST(YogaTest, measure_flex_direction_row_and_padding) {
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 5);
|
||||
YGNodeStyleSetHeight(root_child1, 5);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -324,20 +324,20 @@ TEST(YogaTest, measure_flex_direction_row_and_padding) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_flex_direction_column_and_padding) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 20);
|
||||
YGNodeStyleSetPadding(root, YGEdgeAll, 25);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
// YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 5);
|
||||
YGNodeStyleSetHeight(root_child1, 5);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -364,20 +364,20 @@ TEST(YogaTest, measure_flex_direction_column_and_padding) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_flex_direction_row_no_padding) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 20);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
// YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 5);
|
||||
YGNodeStyleSetHeight(root_child1, 5);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -404,20 +404,20 @@ TEST(YogaTest, measure_flex_direction_row_no_padding) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_flex_direction_row_no_padding_align_items_flexstart) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 20);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 5);
|
||||
YGNodeStyleSetHeight(root_child1, 5);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -444,21 +444,21 @@ TEST(YogaTest, measure_flex_direction_row_no_padding_align_items_flexstart) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_with_fixed_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 20);
|
||||
YGNodeStyleSetPadding(root, YGEdgeAll, 25);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 5);
|
||||
YGNodeStyleSetHeight(root_child1, 5);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -485,20 +485,20 @@ TEST(YogaTest, measure_with_fixed_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_with_flex_shrink) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 20);
|
||||
YGNodeStyleSetPadding(root, YGEdgeAll, 25);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 5);
|
||||
YGNodeStyleSetHeight(root_child1, 5);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -525,19 +525,19 @@ TEST(YogaTest, measure_with_flex_shrink) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, measure_no_padding) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 20);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _simulate_wrapping_text);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 5);
|
||||
YGNodeStyleSetHeight(root_child1, 5);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -565,10 +565,10 @@ TEST(YogaTest, measure_no_padding) {
|
||||
|
||||
#if GTEST_HAS_DEATH_TEST
|
||||
TEST(YogaDeathTest, cannot_add_child_to_node_with_measure_func) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeSetMeasureFunc(root, _measure);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
#if defined(__cpp_exceptions)
|
||||
ASSERT_THROW(YGNodeInsertChild(root, root_child0, 0), std::logic_error);
|
||||
#else // !defined(__cpp_exceptions)
|
||||
@@ -579,8 +579,8 @@ TEST(YogaDeathTest, cannot_add_child_to_node_with_measure_func) {
|
||||
}
|
||||
|
||||
TEST(YogaDeathTest, cannot_add_nonnull_measure_func_to_non_leaf_node) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
#if defined(__cpp_exceptions)
|
||||
ASSERT_THROW(YGNodeSetMeasureFunc(root, _measure), std::logic_error);
|
||||
@@ -594,7 +594,7 @@ TEST(YogaDeathTest, cannot_add_nonnull_measure_func_to_non_leaf_node) {
|
||||
#endif
|
||||
|
||||
TEST(YogaTest, can_nullify_measure_func_on_any_node) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeInsertChild(root, YGNodeNew(), 0);
|
||||
YGNodeSetMeasureFunc(root, nullptr);
|
||||
ASSERT_TRUE(!YGNodeHasMeasureFunc(root));
|
||||
@@ -602,14 +602,14 @@ TEST(YogaTest, can_nullify_measure_func_on_any_node) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, cant_call_negative_measure) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumn);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 10);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure_assert_negative);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -621,14 +621,14 @@ TEST(YogaTest, cant_call_negative_measure) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, cant_call_negative_measure_horizontal) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 10);
|
||||
YGNodeStyleSetHeight(root, 20);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure_assert_negative);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeStart, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -658,19 +658,19 @@ static YGSize _measure_100_100(
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_with_text_node) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 80);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child1, _measure_90_10);
|
||||
YGNodeStyleSetMaxWidthPercent(root_child1, 50);
|
||||
YGNodeStyleSetPaddingPercent(root_child1, YGEdgeTop, 50);
|
||||
@@ -699,35 +699,35 @@ TEST(YogaTest, percent_with_text_node) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_margin_with_measure_func) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 0);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 100);
|
||||
YGNodeStyleSetHeight(root_child1, 100);
|
||||
YGNodeStyleSetMargin(root_child1, YGEdgeTop, 100);
|
||||
YGNodeSetMeasureFunc(root_child1, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 100);
|
||||
YGNodeStyleSetHeight(root_child2, 100);
|
||||
YGNodeStyleSetMarginPercent(root_child2, YGEdgeTop, 10);
|
||||
YGNodeSetMeasureFunc(root_child2, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 100);
|
||||
YGNodeStyleSetHeight(root_child3, 100);
|
||||
YGNodeStyleSetMarginPercent(root_child3, YGEdgeTop, 20);
|
||||
@@ -767,35 +767,35 @@ TEST(YogaTest, percent_margin_with_measure_func) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_padding_with_measure_func) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeStyleSetPadding(root_child0, YGEdgeTop, 0);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 100);
|
||||
YGNodeStyleSetHeight(root_child1, 100);
|
||||
YGNodeStyleSetPadding(root_child1, YGEdgeTop, 100);
|
||||
YGNodeSetMeasureFunc(root_child1, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPaddingPercent(root_child2, YGEdgeTop, 10);
|
||||
YGNodeSetMeasureFunc(root_child2, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPaddingPercent(root_child3, YGEdgeTop, 20);
|
||||
YGNodeSetMeasureFunc(root_child3, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
@@ -833,36 +833,36 @@ TEST(YogaTest, percent_padding_with_measure_func) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_padding_and_percent_margin_with_measure_func) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeStyleSetPadding(root_child0, YGEdgeTop, 0);
|
||||
YGNodeSetMeasureFunc(root_child0, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 100);
|
||||
YGNodeStyleSetHeight(root_child1, 100);
|
||||
YGNodeStyleSetPadding(root_child1, YGEdgeTop, 100);
|
||||
YGNodeSetMeasureFunc(root_child1, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPaddingPercent(root_child2, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMarginPercent(root_child2, YGEdgeTop, 10);
|
||||
YGNodeSetMeasureFunc(root_child2, _measure_100_100);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPaddingPercent(root_child3, YGEdgeTop, 20);
|
||||
YGNodeStyleSetMarginPercent(root_child3, YGEdgeTop, 20);
|
||||
YGNodeSetMeasureFunc(root_child3, _measure_100_100);
|
||||
|
@@ -9,9 +9,9 @@
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
TEST(YogaTest, reset_layout_when_child_removed) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
@@ -15,18 +15,18 @@ using namespace facebook;
|
||||
using facebook::yoga::test::TestUtil;
|
||||
|
||||
TEST(YogaTest, cloning_shared_root) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -46,7 +46,7 @@ TEST(YogaTest, cloning_shared_root) {
|
||||
ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child1));
|
||||
ASSERT_FLOAT_EQ(25, YGNodeLayoutGetHeight(root_child1));
|
||||
|
||||
const YGNodeRef root2 = YGNodeClone(root);
|
||||
YGNodeRef root2 = YGNodeClone(root);
|
||||
YGNodeStyleSetWidth(root2, 100);
|
||||
|
||||
ASSERT_EQ(2u, YGNodeGetChildCount(root2));
|
||||
@@ -67,8 +67,8 @@ TEST(YogaTest, cloning_shared_root) {
|
||||
|
||||
ASSERT_EQ(2u, YGNodeGetChildCount(root2));
|
||||
// Relayout with changed input should result in cloned children.
|
||||
const YGNodeRef root2_child0 = YGNodeGetChild(root2, 0);
|
||||
const YGNodeRef root2_child1 = YGNodeGetChild(root2, 1);
|
||||
YGNodeRef root2_child0 = YGNodeGetChild(root2, 0);
|
||||
YGNodeRef root2_child1 = YGNodeGetChild(root2, 1);
|
||||
ASSERT_NE(root_child0, root2_child0);
|
||||
ASSERT_NE(root_child1, root2_child1);
|
||||
|
||||
@@ -112,33 +112,33 @@ TEST(YogaTest, cloning_shared_root) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, mutating_children_of_a_clone_clones_only_after_layout) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
ASSERT_EQ(0u, YGNodeGetChildCount(root));
|
||||
|
||||
const YGNodeRef root2 = YGNodeClone(root);
|
||||
YGNodeRef root2 = YGNodeClone(root);
|
||||
ASSERT_EQ(0u, YGNodeGetChildCount(root2));
|
||||
|
||||
const YGNodeRef root2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root2, root2_child0, 0);
|
||||
|
||||
ASSERT_EQ(0u, YGNodeGetChildCount(root));
|
||||
ASSERT_EQ(1u, YGNodeGetChildCount(root2));
|
||||
|
||||
const YGNodeRef root3 = YGNodeClone(root2);
|
||||
YGNodeRef root3 = YGNodeClone(root2);
|
||||
ASSERT_EQ(1u, YGNodeGetChildCount(root2));
|
||||
ASSERT_EQ(1u, YGNodeGetChildCount(root3));
|
||||
ASSERT_EQ(YGNodeGetChild(root2, 0), YGNodeGetChild(root3, 0));
|
||||
|
||||
const YGNodeRef root3_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root3_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root3, root3_child1, 1);
|
||||
ASSERT_EQ(1u, YGNodeGetChildCount(root2));
|
||||
ASSERT_EQ(2u, YGNodeGetChildCount(root3));
|
||||
ASSERT_EQ(root3_child1, YGNodeGetChild(root3, 1));
|
||||
ASSERT_EQ(YGNodeGetChild(root2, 0), YGNodeGetChild(root3, 0));
|
||||
|
||||
const YGNodeRef root4 = YGNodeClone(root3);
|
||||
YGNodeRef root4 = YGNodeClone(root3);
|
||||
ASSERT_EQ(root3_child1, YGNodeGetChild(root4, 1));
|
||||
|
||||
YGNodeRemoveChild(root4, root3_child1);
|
||||
@@ -160,27 +160,27 @@ TEST(YogaTest, mutating_children_of_a_clone_clones_only_after_layout) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, cloning_two_levels) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 15);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexBasis(root_child1_0, 10);
|
||||
YGNodeStyleSetFlexGrow(root_child1_0, 1);
|
||||
YGNodeInsertChild(root_child1, root_child1_0, 0);
|
||||
|
||||
const YGNodeRef root_child1_1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexBasis(root_child1_1, 25);
|
||||
YGNodeInsertChild(root_child1, root_child1_1, 1);
|
||||
|
||||
@@ -191,9 +191,9 @@ TEST(YogaTest, cloning_two_levels) {
|
||||
ASSERT_FLOAT_EQ(35, YGNodeLayoutGetHeight(root_child1_0));
|
||||
ASSERT_FLOAT_EQ(25, YGNodeLayoutGetHeight(root_child1_1));
|
||||
|
||||
const YGNodeRef root2_child0 = YGNodeClone(root_child0);
|
||||
const YGNodeRef root2_child1 = YGNodeClone(root_child1);
|
||||
const YGNodeRef root2 = YGNodeClone(root);
|
||||
YGNodeRef root2_child0 = YGNodeClone(root_child0);
|
||||
YGNodeRef root2_child1 = YGNodeClone(root_child1);
|
||||
YGNodeRef root2 = YGNodeClone(root);
|
||||
|
||||
YGNodeStyleSetFlexGrow(root2_child0, 0);
|
||||
YGNodeStyleSetFlexBasis(root2_child0, 40);
|
||||
@@ -228,19 +228,19 @@ TEST(YogaTest, cloning_two_levels) {
|
||||
TEST(YogaTest, cloning_and_freeing) {
|
||||
TestUtil::startCountingNodes();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
const YGNodeRef root2 = YGNodeClone(root);
|
||||
YGNodeRef root2 = YGNodeClone(root);
|
||||
|
||||
// Freeing the original root should be safe as long as we don't free its
|
||||
// children.
|
||||
|
@@ -9,15 +9,15 @@
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
TEST(YogaTest, dont_cache_computed_flex_basis_between_layouts) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
YGConfigSetExperimentalFeatureEnabled(
|
||||
config, YGExperimentalFeatureWebFlexBasis, true);
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeightPercent(root, 100);
|
||||
YGNodeStyleSetWidthPercent(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
@@ -32,9 +32,9 @@ TEST(YogaTest, dont_cache_computed_flex_basis_between_layouts) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, recalculate_resolvedDimonsion_onchange) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeRef root_child0 = YGNodeNew();
|
||||
YGNodeStyleSetMinHeight(root_child0, 10);
|
||||
YGNodeStyleSetMaxHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -51,12 +51,12 @@ TEST(YogaTest, recalculate_resolvedDimonsion_onchange) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, relayout_containing_block_size_changes) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5);
|
||||
@@ -74,7 +74,7 @@ TEST(YogaTest, relayout_containing_block_size_changes) {
|
||||
YGNodeStyleSetHeight(root_child0, 500);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic);
|
||||
YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8);
|
||||
YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6);
|
||||
@@ -92,7 +92,7 @@ TEST(YogaTest, relayout_containing_block_size_changes) {
|
||||
YGNodeStyleSetHeight(root_child0_child0, 200);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeLeft, 2);
|
||||
YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeRight, 12);
|
||||
|
@@ -52,18 +52,18 @@ static YGSize measureText(
|
||||
|
||||
// Regression test for https://github.com/facebook/yoga/issues/824
|
||||
TEST(YogaTest, consistent_rounding_during_repeated_layouts) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
YGConfigSetPointScaleFactor(config, 2);
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, -1.49f);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef node0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef node0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, node0, 0);
|
||||
|
||||
const YGNodeRef node1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef node1 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(node1, measureText);
|
||||
YGNodeInsertChild(node0, node1, 0);
|
||||
|
||||
@@ -81,25 +81,25 @@ TEST(YogaTest, consistent_rounding_during_repeated_layouts) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, per_node_point_scale_factor) {
|
||||
const YGConfigRef config1 = YGConfigNew();
|
||||
YGConfigRef config1 = YGConfigNew();
|
||||
YGConfigSetPointScaleFactor(config1, 2);
|
||||
|
||||
const YGConfigRef config2 = YGConfigNew();
|
||||
YGConfigRef config2 = YGConfigNew();
|
||||
YGConfigSetPointScaleFactor(config2, 1);
|
||||
|
||||
const YGConfigRef config3 = YGConfigNew();
|
||||
YGConfigRef config3 = YGConfigNew();
|
||||
YGConfigSetPointScaleFactor(config3, 0.5f);
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config1);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config1);
|
||||
YGNodeStyleSetWidth(root, 11.5);
|
||||
YGNodeStyleSetHeight(root, 11.5);
|
||||
|
||||
const YGNodeRef node0 = YGNodeNewWithConfig(config2);
|
||||
YGNodeRef node0 = YGNodeNewWithConfig(config2);
|
||||
YGNodeStyleSetWidth(node0, 9.5);
|
||||
YGNodeStyleSetHeight(node0, 9.5);
|
||||
YGNodeInsertChild(root, node0, 0);
|
||||
|
||||
const YGNodeRef node1 = YGNodeNewWithConfig(config3);
|
||||
YGNodeRef node1 = YGNodeNewWithConfig(config3);
|
||||
YGNodeStyleSetWidth(node1, 7);
|
||||
YGNodeStyleSetHeight(node1, 7);
|
||||
YGNodeInsertChild(node0, node1, 0);
|
||||
|
@@ -45,10 +45,10 @@ static YGSize _measureFractial(
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_feature_with_custom_measure_func_floor) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGConfigRef config = YGConfigNew();
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _measureFloor);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
@@ -93,10 +93,10 @@ TEST(YogaTest, rounding_feature_with_custom_measure_func_floor) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_feature_with_custom_measure_func_ceil) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGConfigRef config = YGConfigNew();
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeSetMeasureFunc(root_child0, _measureCeil);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
@@ -115,11 +115,11 @@ TEST(YogaTest, rounding_feature_with_custom_measure_func_ceil) {
|
||||
TEST(
|
||||
YogaTest,
|
||||
rounding_feature_with_custom_measure_and_fractial_matching_scale) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGConfigRef config = YGConfigNew();
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 73.625);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeRelative);
|
||||
YGNodeSetMeasureFunc(root_child0, _measureFractial);
|
||||
|
@@ -9,8 +9,8 @@
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
TEST(YogaTest, copy_style_same) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
const YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeRef node1 = YGNodeNew();
|
||||
|
||||
YGNodeCopyStyle(node0, node1);
|
||||
|
||||
@@ -19,11 +19,11 @@ TEST(YogaTest, copy_style_same) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, copy_style_modified) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeRef node0 = YGNodeNew();
|
||||
ASSERT_EQ(YGFlexDirectionColumn, YGNodeStyleGetFlexDirection(node0));
|
||||
ASSERT_FALSE(YGNodeStyleGetMaxHeight(node0).unit != YGUnitUndefined);
|
||||
|
||||
const YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(node1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxHeight(node1, 10);
|
||||
|
||||
@@ -36,12 +36,12 @@ TEST(YogaTest, copy_style_modified) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, copy_style_modified_same) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(node0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxHeight(node0, 10);
|
||||
YGNodeCalculateLayout(node0, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
const YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeRef node1 = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(node1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxHeight(node1, 10);
|
||||
|
||||
@@ -52,7 +52,7 @@ TEST(YogaTest, copy_style_modified_same) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, initialise_flexShrink_flexGrow) {
|
||||
const YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeRef node0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexShrink(node0, 1);
|
||||
ASSERT_EQ(1, YGNodeStyleGetFlexShrink(node0));
|
||||
|
||||
|
@@ -9,12 +9,12 @@
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
TEST(YogaTest, zero_out_layout) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef child = YGNodeNew();
|
||||
YGNodeRef child = YGNodeNew();
|
||||
YGNodeInsertChild(root, child, 0);
|
||||
YGNodeStyleSetWidth(child, 100);
|
||||
YGNodeStyleSetHeight(child, 100);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<591db1b26522864a763069344b60bc4e>>
|
||||
* @generated SignedSource<<425ef3591b2f5cf0bc6d9daa9c5db96c>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGAbsolutePositionTest.html
|
||||
*/
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, absolute_layout_width_height_start_top) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeStart, 10);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10);
|
||||
@@ -58,14 +58,14 @@ TEST(YogaTest, absolute_layout_width_height_start_top) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_width_height_end_bottom) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeEnd, 10);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 10);
|
||||
@@ -102,14 +102,14 @@ TEST(YogaTest, absolute_layout_width_height_end_bottom) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_start_top_end_bottom) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeStart, 10);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10);
|
||||
@@ -146,14 +146,14 @@ TEST(YogaTest, absolute_layout_start_top_end_bottom) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_width_height_start_top_end_bottom) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeStart, 10);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10);
|
||||
@@ -192,22 +192,22 @@ TEST(YogaTest, absolute_layout_width_height_start_top_end_bottom) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetOverflow(root, YGOverflowHidden);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeStart, 0);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 0);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 100);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -251,9 +251,9 @@ TEST(YogaTest, do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hi
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_within_border) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMargin(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 10);
|
||||
@@ -270,7 +270,7 @@ TEST(YogaTest, absolute_layout_within_border) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 0);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 0);
|
||||
@@ -278,7 +278,7 @@ TEST(YogaTest, absolute_layout_within_border) {
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child1, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child1, YGEdgeRight, 0);
|
||||
YGNodeStyleSetPosition(root_child1, YGEdgeBottom, 0);
|
||||
@@ -286,7 +286,7 @@ TEST(YogaTest, absolute_layout_within_border) {
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child2, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child2, YGEdgeLeft, 0);
|
||||
YGNodeStyleSetPosition(root_child2, YGEdgeTop, 0);
|
||||
@@ -298,7 +298,7 @@ TEST(YogaTest, absolute_layout_within_border) {
|
||||
YGNodeStyleSetHeight(root_child2, 50);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child3, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child3, YGEdgeRight, 0);
|
||||
YGNodeStyleSetPosition(root_child3, YGEdgeBottom, 0);
|
||||
@@ -369,9 +369,9 @@ TEST(YogaTest, absolute_layout_within_border) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_align_items_and_justify_content_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -379,7 +379,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center) {
|
||||
YGNodeStyleSetWidth(root, 110);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
YGNodeStyleSetHeight(root_child0, 40);
|
||||
@@ -414,9 +414,9 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_align_items_and_justify_content_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -424,7 +424,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_flex_end) {
|
||||
YGNodeStyleSetWidth(root, 110);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
YGNodeStyleSetHeight(root_child0, 40);
|
||||
@@ -459,16 +459,16 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_justify_content_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexGrow(root, 1);
|
||||
YGNodeStyleSetWidth(root, 110);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
YGNodeStyleSetHeight(root_child0, 40);
|
||||
@@ -503,16 +503,16 @@ TEST(YogaTest, absolute_layout_justify_content_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_align_items_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexGrow(root, 1);
|
||||
YGNodeStyleSetWidth(root, 110);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
YGNodeStyleSetHeight(root_child0, 40);
|
||||
@@ -547,15 +547,15 @@ TEST(YogaTest, absolute_layout_align_items_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_align_items_center_on_child_only) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexGrow(root, 1);
|
||||
YGNodeStyleSetWidth(root, 110);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
@@ -591,9 +591,9 @@ TEST(YogaTest, absolute_layout_align_items_center_on_child_only) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_top_position) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -601,7 +601,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_top_po
|
||||
YGNodeStyleSetWidth(root, 110);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
@@ -637,9 +637,9 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_top_po
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_bottom_position) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -647,7 +647,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_bottom
|
||||
YGNodeStyleSetWidth(root, 110);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 10);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
@@ -683,9 +683,9 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_bottom
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_left_position) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -693,7 +693,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_left_p
|
||||
YGNodeStyleSetWidth(root, 110);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 5);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
@@ -729,9 +729,9 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_left_p
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_right_position) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -739,7 +739,7 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_right_
|
||||
YGNodeStyleSetWidth(root, 110);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeRight, 5);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
@@ -775,9 +775,9 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_right_
|
||||
}
|
||||
|
||||
TEST(YogaTest, position_root_with_rtl_should_position_withoutdirection) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root, YGEdgeLeft, 72);
|
||||
YGNodeStyleSetWidth(root, 52);
|
||||
@@ -802,28 +802,28 @@ TEST(YogaTest, position_root_with_rtl_should_position_withoutdirection) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_percentage_bottom_based_on_parent_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPositionPercent(root_child0, YGEdgeTop, 50);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child1, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPositionPercent(root_child1, YGEdgeBottom, 50);
|
||||
YGNodeStyleSetWidth(root_child1, 10);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child2, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPositionPercent(root_child2, YGEdgeTop, 10);
|
||||
YGNodeStyleSetPositionPercent(root_child2, YGEdgeBottom, 10);
|
||||
@@ -879,15 +879,15 @@ TEST(YogaTest, absolute_layout_percentage_bottom_based_on_parent_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_in_wrap_reverse_column_container) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
@@ -922,16 +922,16 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_column_container) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_in_wrap_reverse_row_container) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
@@ -966,15 +966,15 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_row_container) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_in_wrap_reverse_column_container_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
@@ -1010,16 +1010,16 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_column_container_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_in_wrap_reverse_row_container_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
@@ -1055,17 +1055,17 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_row_container_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_absolute_position_infinite_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 300);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 300);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child1, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPositionPercent(root_child1, YGEdgeLeft, 20);
|
||||
YGNodeStyleSetPositionPercent(root_child1, YGEdgeTop, 20);
|
||||
@@ -1112,16 +1112,16 @@ TEST(YogaTest, percent_absolute_position_infinite_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeTop, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeTop, 10);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeightPercent(root_child0, 50);
|
||||
@@ -1156,9 +1156,9 @@ TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent_and_align_items_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPadding(root, YGEdgeTop, 20);
|
||||
@@ -1166,7 +1166,7 @@ TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent_and_alig
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeightPercent(root_child0, 50);
|
||||
@@ -1201,15 +1201,15 @@ TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent_and_alig
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_padding_left) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeLeft, 100);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
@@ -1244,15 +1244,15 @@ TEST(YogaTest, absolute_layout_padding_left) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_padding_right) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeRight, 100);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
@@ -1287,15 +1287,15 @@ TEST(YogaTest, absolute_layout_padding_right) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_padding_top) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeTop, 100);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
@@ -1330,15 +1330,15 @@ TEST(YogaTest, absolute_layout_padding_top) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_padding_bottom) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeBottom, 100);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
@@ -1373,12 +1373,12 @@ TEST(YogaTest, absolute_layout_padding_bottom) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_padding) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10);
|
||||
@@ -1387,7 +1387,7 @@ TEST(YogaTest, absolute_layout_padding) {
|
||||
YGNodeStyleSetHeight(root_child0, 200);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic);
|
||||
YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 50);
|
||||
YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 50);
|
||||
@@ -1397,7 +1397,7 @@ TEST(YogaTest, absolute_layout_padding) {
|
||||
YGNodeStyleSetHeight(root_child0_child0, 200);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child0, 50);
|
||||
@@ -1452,12 +1452,12 @@ TEST(YogaTest, absolute_layout_padding) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_border) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10);
|
||||
@@ -1466,7 +1466,7 @@ TEST(YogaTest, absolute_layout_border) {
|
||||
YGNodeStyleSetHeight(root_child0, 200);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic);
|
||||
YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10);
|
||||
@@ -1476,7 +1476,7 @@ TEST(YogaTest, absolute_layout_border) {
|
||||
YGNodeStyleSetHeight(root_child0_child0, 200);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child0, 50);
|
||||
@@ -1531,15 +1531,15 @@ TEST(YogaTest, absolute_layout_border) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, absolute_layout_column_reverse_margin_border) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 5);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeRight, 3);
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<038f254f2917ef40f40cdc70c85ed972>>
|
||||
* @generated SignedSource<<71295a398c89ea424490884a05e2c77c>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignItemsTest.html
|
||||
*/
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, align_items_stretch) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -54,15 +54,15 @@ TEST(YogaTest, align_items_stretch) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_items_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -96,15 +96,15 @@ TEST(YogaTest, align_items_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_items_flex_start) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -138,15 +138,15 @@ TEST(YogaTest, align_items_flex_start) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_items_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -180,21 +180,21 @@ TEST(YogaTest, align_items_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -238,26 +238,26 @@ TEST(YogaTest, align_baseline) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
@@ -311,43 +311,43 @@ TEST(YogaTest, align_baseline_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_child_multiline) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 25);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 20);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child1, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child1, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child2, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child2, 20);
|
||||
YGNodeInsertChild(root_child1, root_child1_child2, 2);
|
||||
|
||||
const YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child3, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child3, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child3, 3);
|
||||
@@ -431,44 +431,44 @@ TEST(YogaTest, align_baseline_child_multiline) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_child_multiline_override) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 25);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 20);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child1_child1, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root_child1_child1, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child1, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child2, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child2, 20);
|
||||
YGNodeInsertChild(root_child1, root_child1_child2, 2);
|
||||
|
||||
const YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child1_child3, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root_child1_child3, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child3, 10);
|
||||
@@ -553,43 +553,43 @@ TEST(YogaTest, align_baseline_child_multiline_override) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_child_multiline_no_override_on_secondline) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow);
|
||||
YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 25);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 20);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child1, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child1, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child2, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child2, 20);
|
||||
YGNodeInsertChild(root_child1, root_child1_child2, 2);
|
||||
|
||||
const YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child1_child3, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root_child1_child3, 25);
|
||||
YGNodeStyleSetHeight(root_child1_child3, 10);
|
||||
@@ -674,27 +674,27 @@ TEST(YogaTest, align_baseline_child_multiline_no_override_on_secondline) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_child_top) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
@@ -748,27 +748,27 @@ TEST(YogaTest, align_baseline_child_top) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_child_top2) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPosition(root_child1, YGEdgeTop, 5);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
@@ -822,31 +822,31 @@ TEST(YogaTest, align_baseline_child_top2) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_double_nested_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 20);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 15);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
@@ -910,20 +910,20 @@ TEST(YogaTest, align_baseline_double_nested_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -967,16 +967,16 @@ TEST(YogaTest, align_baseline_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_child_margin) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 5);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5);
|
||||
@@ -985,12 +985,12 @@ TEST(YogaTest, align_baseline_child_margin) {
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child1_child0, YGEdgeLeft, 1);
|
||||
YGNodeStyleSetMargin(root_child1_child0, YGEdgeTop, 1);
|
||||
YGNodeStyleSetMargin(root_child1_child0, YGEdgeRight, 1);
|
||||
@@ -1048,9 +1048,9 @@ TEST(YogaTest, align_baseline_child_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_child_padding) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -1061,12 +1061,12 @@ TEST(YogaTest, align_baseline_child_padding) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPadding(root_child1, YGEdgeLeft, 5);
|
||||
YGNodeStyleSetPadding(root_child1, YGEdgeTop, 5);
|
||||
YGNodeStyleSetPadding(root_child1, YGEdgeRight, 5);
|
||||
@@ -1075,7 +1075,7 @@ TEST(YogaTest, align_baseline_child_padding) {
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
@@ -1129,9 +1129,9 @@ TEST(YogaTest, align_baseline_child_padding) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_multiline) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -1139,32 +1139,32 @@ TEST(YogaTest, align_baseline_multiline) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 50);
|
||||
YGNodeStyleSetHeight(root_child2, 20);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child2_child0, 10);
|
||||
YGNodeInsertChild(root_child2, root_child2_child0, 0);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 50);
|
||||
YGNodeStyleSetHeight(root_child3, 50);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
@@ -1250,41 +1250,41 @@ TEST(YogaTest, align_baseline_multiline) {
|
||||
TEST(YogaTest, align_baseline_multiline_column) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 20);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeStyleSetHeight(root_child2, 70);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child2_child0, 10);
|
||||
YGNodeInsertChild(root_child2, root_child2_child0, 0);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 50);
|
||||
YGNodeStyleSetHeight(root_child3, 20);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
@@ -1370,41 +1370,41 @@ TEST(YogaTest, align_baseline_multiline_column) {
|
||||
TEST(YogaTest, align_baseline_multiline_column2) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 20);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeStyleSetHeight(root_child2, 70);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child2_child0, 10);
|
||||
YGNodeInsertChild(root_child2, root_child2_child0, 0);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 50);
|
||||
YGNodeStyleSetHeight(root_child3, 20);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
@@ -1488,9 +1488,9 @@ TEST(YogaTest, align_baseline_multiline_column2) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_baseline_multiline_row_and_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignBaseline);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -1498,32 +1498,32 @@ TEST(YogaTest, align_baseline_multiline_row_and_column) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 50);
|
||||
YGNodeStyleSetHeight(root_child2, 20);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child2_child0, 10);
|
||||
YGNodeInsertChild(root_child2, root_child2_child0, 0);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 50);
|
||||
YGNodeStyleSetHeight(root_child3, 20);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
@@ -1607,20 +1607,20 @@ TEST(YogaTest, align_baseline_multiline_row_and_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_items_center_child_with_margin_bigger_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 52);
|
||||
YGNodeStyleSetHeight(root, 52);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root_child0, YGAlignCenter);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 52);
|
||||
@@ -1666,20 +1666,20 @@ TEST(YogaTest, align_items_center_child_with_margin_bigger_than_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_items_flex_end_child_with_margin_bigger_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 52);
|
||||
YGNodeStyleSetHeight(root, 52);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root_child0, YGAlignFlexEnd);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 52);
|
||||
@@ -1725,20 +1725,20 @@ TEST(YogaTest, align_items_flex_end_child_with_margin_bigger_than_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_items_center_child_without_margin_bigger_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 52);
|
||||
YGNodeStyleSetHeight(root, 52);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root_child0, YGAlignCenter);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 72);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 72);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -1782,20 +1782,20 @@ TEST(YogaTest, align_items_center_child_without_margin_bigger_than_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_items_flex_end_child_without_margin_bigger_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 52);
|
||||
YGNodeStyleSetHeight(root, 52);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root_child0, YGAlignFlexEnd);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 72);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 72);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -1839,26 +1839,26 @@ TEST(YogaTest, align_items_flex_end_child_without_margin_bigger_than_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_center_should_size_based_on_content) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 20);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child0, 20);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
@@ -1912,25 +1912,25 @@ TEST(YogaTest, align_center_should_size_based_on_content) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_stretch_should_size_based_on_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 20);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child0, 20);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
@@ -1984,23 +1984,23 @@ TEST(YogaTest, align_stretch_should_size_based_on_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_flex_start_with_shrinking_children) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root_child0, YGAlignFlexStart);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
@@ -2054,22 +2054,22 @@ TEST(YogaTest, align_flex_start_with_shrinking_children) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_flex_start_with_stretching_children) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
@@ -2123,23 +2123,23 @@ TEST(YogaTest, align_flex_start_with_stretching_children) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_flex_start_with_shrinking_children_with_stretch) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root_child0, YGAlignFlexStart);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
@@ -2193,23 +2193,23 @@ TEST(YogaTest, align_flex_start_with_shrinking_children_with_stretch) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_flex_end_with_row_reverse) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 75);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 3);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -2253,22 +2253,22 @@ TEST(YogaTest, align_flex_end_with_row_reverse) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_stretch_with_row_reverse) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 75);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 3);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<cf8b648c6ae6d97a36bd33a03cd624e9>>
|
||||
* @generated SignedSource<<43d956746b16865dfacb7b25e8fe367f>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignSelfTest.html
|
||||
*/
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, align_self_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignCenter);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
@@ -56,14 +56,14 @@ TEST(YogaTest, align_self_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_self_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
@@ -98,14 +98,14 @@ TEST(YogaTest, align_self_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_self_flex_start) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexStart);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
@@ -140,15 +140,15 @@ TEST(YogaTest, align_self_flex_start) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_self_flex_end_override_flex_start) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
@@ -183,27 +183,27 @@ TEST(YogaTest, align_self_flex_end_override_flex_start) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_self_baseline) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child0, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignSelf(root_child1, YGAlignBaseline);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<9dc8f0d4029732bc8849ded9af8b82dc>>
|
||||
* @generated SignedSource<<98875d3d64ab8d1a568e81773281be5c>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGAndroidNewsFeed.html
|
||||
*/
|
||||
|
||||
@@ -14,25 +14,25 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, android_news_feed) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignStretch);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 1080);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child0_child0, YGAlignStretch);
|
||||
YGNodeStyleSetAlignItems(root_child0_child0_child0_child0, YGAlignFlexStart);
|
||||
@@ -40,18 +40,18 @@ TEST(YogaTest, android_news_feed) {
|
||||
YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 24);
|
||||
YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0_child0_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child0, YGAlignStretch);
|
||||
YGNodeInsertChild(root_child0_child0_child0_child0, root_child0_child0_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child0_child0, YGAlignStretch);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0_child0_child0_child0, 120);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child0_child0_child0_child0, 120);
|
||||
YGNodeInsertChild(root_child0_child0_child0_child0_child0, root_child0_child0_child0_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child1, YGAlignStretch);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child0_child0_child1, 1);
|
||||
YGNodeStyleSetMargin(root_child0_child0_child0_child0_child1, YGEdgeRight, 36);
|
||||
@@ -61,22 +61,22 @@ TEST(YogaTest, android_news_feed) {
|
||||
YGNodeStyleSetPadding(root_child0_child0_child0_child0_child1, YGEdgeBottom, 18);
|
||||
YGNodeInsertChild(root_child0_child0_child0_child0, root_child0_child0_child0_child0_child1, 1);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0_child0_child0_child1_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child1_child0, YGAlignStretch);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child0_child0_child1_child0, 1);
|
||||
YGNodeInsertChild(root_child0_child0_child0_child0_child1, root_child0_child0_child0_child0_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0_child0_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0_child0_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child0_child0_child1_child1, YGAlignStretch);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child0_child0_child1_child1, 1);
|
||||
YGNodeInsertChild(root_child0_child0_child0_child0_child1, root_child0_child0_child0_child0_child1_child1, 1);
|
||||
|
||||
const YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child1, YGAlignStretch);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1);
|
||||
|
||||
const YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0_child1_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child1_child0, YGAlignStretch);
|
||||
YGNodeStyleSetAlignItems(root_child0_child0_child1_child0, YGAlignFlexStart);
|
||||
@@ -84,18 +84,18 @@ TEST(YogaTest, android_news_feed) {
|
||||
YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 24);
|
||||
YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child1_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child1_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0_child1_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child0, YGAlignStretch);
|
||||
YGNodeInsertChild(root_child0_child0_child1_child0, root_child0_child0_child1_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child1_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child1_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child0_child0, YGAlignStretch);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child1_child0_child0_child0, 72);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child1_child0_child0_child0, 72);
|
||||
YGNodeInsertChild(root_child0_child0_child1_child0_child0, root_child0_child0_child1_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child1_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child1_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child1, YGAlignStretch);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child1_child0_child1, 1);
|
||||
YGNodeStyleSetMargin(root_child0_child0_child1_child0_child1, YGEdgeRight, 36);
|
||||
@@ -105,13 +105,13 @@ TEST(YogaTest, android_news_feed) {
|
||||
YGNodeStyleSetPadding(root_child0_child0_child1_child0_child1, YGEdgeBottom, 18);
|
||||
YGNodeInsertChild(root_child0_child0_child1_child0, root_child0_child0_child1_child0_child1, 1);
|
||||
|
||||
const YGNodeRef root_child0_child0_child1_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child1_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0_child1_child0_child1_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child1_child0, YGAlignStretch);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child1_child0_child1_child0, 1);
|
||||
YGNodeInsertChild(root_child0_child0_child1_child0_child1, root_child0_child0_child1_child0_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child1_child0_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child1_child0_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child1_child0_child1_child1, YGAlignStretch);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child1_child0_child1_child1, 1);
|
||||
YGNodeInsertChild(root_child0_child0_child1_child0_child1, root_child0_child0_child1_child0_child1_child1, 1);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<970287ca9c64fc54b17123849a4ae648>>
|
||||
* @generated SignedSource<<bca5b9517b7a728b30eb070a33de0bdf>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGAspectRatioTest.html
|
||||
*/
|
||||
|
||||
@@ -16,53 +16,53 @@
|
||||
TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 300);
|
||||
YGNodeStyleSetHeight(root, 300);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetOverflow(root_child0, YGOverflowScroll);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 0);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0_child0, 2);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0_child0_child0, 0);
|
||||
YGNodeStyleSetAspectRatio(root_child0_child0_child0, 1 / 1);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child1, 5);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1);
|
||||
|
||||
const YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0_child2, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child2, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0_child0_child2, 0);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child2, 2);
|
||||
|
||||
const YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0_child2_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child2_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0_child0_child2_child0, 0);
|
||||
YGNodeStyleSetAspectRatio(root_child0_child0_child2_child0, 1 / 1);
|
||||
YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child2_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child2_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child2_child0_child0, 5);
|
||||
YGNodeInsertChild(root_child0_child0_child2_child0, root_child0_child0_child2_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child2_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child2_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0_child2_child0_child1, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0_child2_child0_child1, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0_child0_child2_child0_child1, 0);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<978290b757d2f39abc464e60100f422f>>
|
||||
* @generated SignedSource<<6b9e472d3a0bac5e3a5501788c9971c6>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGBorderTest.html
|
||||
*/
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, border_no_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetBorder(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeTop, 10);
|
||||
@@ -42,16 +42,16 @@ TEST(YogaTest, border_no_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, border_container_match_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetBorder(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeTop, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeRight, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeBottom, 10);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -85,9 +85,9 @@ TEST(YogaTest, border_container_match_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, border_flex_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetBorder(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeTop, 10);
|
||||
@@ -96,7 +96,7 @@ TEST(YogaTest, border_flex_child) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -130,9 +130,9 @@ TEST(YogaTest, border_flex_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, border_stretch_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetBorder(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetBorder(root, YGEdgeTop, 10);
|
||||
@@ -141,7 +141,7 @@ TEST(YogaTest, border_stretch_child) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -174,9 +174,9 @@ TEST(YogaTest, border_stretch_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, border_center_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -186,7 +186,7 @@ TEST(YogaTest, border_center_child) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<b0e26fab370a9a2b4b1fce0cf6f4dc4f>>
|
||||
* @generated SignedSource<<029b6e60daca98deb68e91f06cbd8c76>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGDimensionTest.html
|
||||
*/
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, wrap_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -53,15 +53,15 @@ TEST(YogaTest, wrap_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_grandchild) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 100);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<e6ffe7c755b4019d5e00aabf40727537>>
|
||||
* @generated SignedSource<<69ab4deb447f7daa2a701ed648532b50>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGDisplayTest.html
|
||||
*/
|
||||
|
||||
@@ -14,19 +14,19 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, display_none) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetDisplay(root_child1, YGDisplayNone);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -70,19 +70,19 @@ TEST(YogaTest, display_none) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, display_none_fixed_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 20);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeStyleSetDisplay(root_child1, YGDisplayNone);
|
||||
@@ -127,15 +127,15 @@ TEST(YogaTest, display_none_fixed_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, display_none_with_margin) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10);
|
||||
@@ -145,7 +145,7 @@ TEST(YogaTest, display_none_with_margin) {
|
||||
YGNodeStyleSetDisplay(root_child0, YGDisplayNone);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -188,35 +188,35 @@ TEST(YogaTest, display_none_with_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, display_none_with_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 0);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child1, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 0);
|
||||
YGNodeStyleSetDisplay(root_child1, YGDisplayNone);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child1_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1_child0, 0);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 20);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child2, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child2, 0);
|
||||
@@ -281,19 +281,19 @@ TEST(YogaTest, display_none_with_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, display_none_with_position) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetPosition(root_child1, YGEdgeTop, 10);
|
||||
YGNodeStyleSetDisplay(root_child1, YGDisplayNone);
|
||||
@@ -338,14 +338,14 @@ TEST(YogaTest, display_none_with_position) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, display_none_with_position_absolute) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<4a4f3b8a5b28cc42960d00a41e97fd45>>
|
||||
* @generated SignedSource<<66f3152eedefd8718b50d16ea931e255>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexTest.html
|
||||
*/
|
||||
|
||||
@@ -14,19 +14,19 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, flex_basis_flex_grow_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -69,21 +69,21 @@ TEST(YogaTest, flex_basis_flex_grow_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_shrink_flex_grow_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetWidth(root_child0, 500);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexShrink(root_child1, 1);
|
||||
YGNodeStyleSetWidth(root_child1, 500);
|
||||
YGNodeStyleSetHeight(root_child1, 100);
|
||||
@@ -128,21 +128,21 @@ TEST(YogaTest, flex_shrink_flex_grow_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_shrink_flex_grow_child_flex_shrink_other_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetWidth(root_child0, 500);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child1, 1);
|
||||
YGNodeStyleSetWidth(root_child1, 500);
|
||||
@@ -188,20 +188,20 @@ TEST(YogaTest, flex_shrink_flex_grow_child_flex_shrink_other_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_basis_flex_grow_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -244,19 +244,19 @@ TEST(YogaTest, flex_basis_flex_grow_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_basis_flex_shrink_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexBasis(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -299,20 +299,20 @@ TEST(YogaTest, flex_basis_flex_shrink_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_basis_flex_shrink_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexBasis(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -355,24 +355,24 @@ TEST(YogaTest, flex_basis_flex_shrink_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_shrink_to_zero) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetHeight(root, 75);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexShrink(root_child1, 1);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 50);
|
||||
YGNodeStyleSetHeight(root_child2, 50);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -426,25 +426,25 @@ TEST(YogaTest, flex_shrink_to_zero) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_basis_overrides_main_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -498,17 +498,17 @@ TEST(YogaTest, flex_basis_overrides_main_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_shrink_at_most) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0, 1);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -552,23 +552,23 @@ TEST(YogaTest, flex_grow_shrink_at_most) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_less_than_factor_one) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 0.2f);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 0.2f);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 0.4f);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<8bf1ef80d3dfc526833b9c14940bf618>>
|
||||
* @generated SignedSource<<736016d0832b2cf628b204cca95e0141>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexWrapTest.html
|
||||
*/
|
||||
|
||||
@@ -14,29 +14,29 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, wrap_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 30);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 30);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 30);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
@@ -100,30 +100,30 @@ TEST(YogaTest, wrap_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 30);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 30);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 30);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
@@ -187,31 +187,31 @@ TEST(YogaTest, wrap_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_row_align_items_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 30);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
@@ -275,31 +275,31 @@ TEST(YogaTest, wrap_row_align_items_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_row_align_items_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 30);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
@@ -363,21 +363,21 @@ TEST(YogaTest, wrap_row_align_items_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_wrap_children_with_min_main_overriding_flex_basis) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeStyleSetMinWidth(root_child0, 55);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexBasis(root_child1, 50);
|
||||
YGNodeStyleSetMinWidth(root_child1, 55);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
@@ -422,27 +422,27 @@ TEST(YogaTest, flex_wrap_children_with_min_main_overriding_flex_basis) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_wrap_wrap_to_child_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root_child0, YGAlignFlexStart);
|
||||
YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 100);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child0, 100);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 100);
|
||||
YGNodeStyleSetHeight(root_child1, 100);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -506,20 +506,20 @@ TEST(YogaTest, flex_wrap_wrap_to_child_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_wrap_align_stretch_fits_one_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 150);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -562,35 +562,35 @@ TEST(YogaTest, flex_wrap_align_stretch_fits_one_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_reverse_row_align_content_flex_start) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 40);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
|
||||
const YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child4, 30);
|
||||
YGNodeStyleSetHeight(root_child4, 50);
|
||||
YGNodeInsertChild(root, root_child4, 4);
|
||||
@@ -664,36 +664,36 @@ TEST(YogaTest, wrap_reverse_row_align_content_flex_start) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_reverse_row_align_content_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 40);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
|
||||
const YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child4, 30);
|
||||
YGNodeStyleSetHeight(root_child4, 50);
|
||||
YGNodeInsertChild(root, root_child4, 4);
|
||||
@@ -767,35 +767,35 @@ TEST(YogaTest, wrap_reverse_row_align_content_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_reverse_row_single_line_different_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 300);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 40);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
|
||||
const YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child4, 30);
|
||||
YGNodeStyleSetHeight(root_child4, 50);
|
||||
YGNodeInsertChild(root, root_child4, 4);
|
||||
@@ -869,36 +869,36 @@ TEST(YogaTest, wrap_reverse_row_single_line_different_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_reverse_row_align_content_stretch) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignStretch);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 40);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
|
||||
const YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child4, 30);
|
||||
YGNodeStyleSetHeight(root_child4, 50);
|
||||
YGNodeInsertChild(root, root_child4, 4);
|
||||
@@ -972,36 +972,36 @@ TEST(YogaTest, wrap_reverse_row_align_content_stretch) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_reverse_row_align_content_space_around) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignSpaceAround);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 40);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
|
||||
const YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child4, 30);
|
||||
YGNodeStyleSetHeight(root_child4, 50);
|
||||
YGNodeInsertChild(root, root_child4, 4);
|
||||
@@ -1075,36 +1075,36 @@ TEST(YogaTest, wrap_reverse_row_align_content_space_around) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_reverse_column_fixed_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 30);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 30);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 30);
|
||||
YGNodeStyleSetHeight(root_child2, 30);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child3, 30);
|
||||
YGNodeStyleSetHeight(root_child3, 40);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
|
||||
const YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child4, 30);
|
||||
YGNodeStyleSetHeight(root_child4, 50);
|
||||
YGNodeInsertChild(root, root_child4, 4);
|
||||
@@ -1178,25 +1178,25 @@ TEST(YogaTest, wrap_reverse_column_fixed_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrapped_row_within_align_items_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 150);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 80);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child1, 80);
|
||||
YGNodeStyleSetHeight(root_child0_child1, 80);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
@@ -1250,25 +1250,25 @@ TEST(YogaTest, wrapped_row_within_align_items_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrapped_row_within_align_items_flex_start) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 150);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 80);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child1, 80);
|
||||
YGNodeStyleSetHeight(root_child0_child1, 80);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
@@ -1322,25 +1322,25 @@ TEST(YogaTest, wrapped_row_within_align_items_flex_start) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrapped_row_within_align_items_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 150);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 80);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child1, 80);
|
||||
YGNodeStyleSetHeight(root_child0_child1, 80);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
@@ -1394,9 +1394,9 @@ TEST(YogaTest, wrapped_row_within_align_items_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrapped_column_max_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
@@ -1405,13 +1405,13 @@ TEST(YogaTest, wrapped_column_max_height) {
|
||||
YGNodeStyleSetWidth(root, 700);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 500);
|
||||
YGNodeStyleSetMaxHeight(root_child0, 200);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child1, YGEdgeLeft, 20);
|
||||
YGNodeStyleSetMargin(root_child1, YGEdgeTop, 20);
|
||||
YGNodeStyleSetMargin(root_child1, YGEdgeRight, 20);
|
||||
@@ -1420,7 +1420,7 @@ TEST(YogaTest, wrapped_column_max_height) {
|
||||
YGNodeStyleSetHeight(root_child1, 200);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 100);
|
||||
YGNodeStyleSetHeight(root_child2, 100);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -1474,9 +1474,9 @@ TEST(YogaTest, wrapped_column_max_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrapped_column_max_height_flex) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
@@ -1485,7 +1485,7 @@ TEST(YogaTest, wrapped_column_max_height_flex) {
|
||||
YGNodeStyleSetWidth(root, 700);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 0);
|
||||
@@ -1494,7 +1494,7 @@ TEST(YogaTest, wrapped_column_max_height_flex) {
|
||||
YGNodeStyleSetMaxHeight(root_child0, 200);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child1, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 0);
|
||||
@@ -1506,7 +1506,7 @@ TEST(YogaTest, wrapped_column_max_height_flex) {
|
||||
YGNodeStyleSetHeight(root_child1, 200);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 100);
|
||||
YGNodeStyleSetHeight(root_child2, 100);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -1560,32 +1560,32 @@ TEST(YogaTest, wrapped_column_max_height_flex) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_nodes_with_content_sizing_overflowing_margin) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root_child0, 85);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 40);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child0, 40);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0_child1, YGEdgeRight, 10);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
|
||||
const YGNodeRef root_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child1_child0, 40);
|
||||
YGNodeStyleSetHeight(root_child0_child1_child0, 40);
|
||||
YGNodeInsertChild(root_child0_child1, root_child0_child1_child0, 0);
|
||||
@@ -1659,32 +1659,32 @@ TEST(YogaTest, wrap_nodes_with_content_sizing_overflowing_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_nodes_with_content_sizing_margin_cross) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root_child0, 70);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 40);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child0, 40);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0_child1, YGEdgeTop, 10);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
|
||||
const YGNodeRef root_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child1_child0, 40);
|
||||
YGNodeStyleSetHeight(root_child0_child1_child0, 40);
|
||||
YGNodeInsertChild(root_child0_child1, root_child0_child1_child0, 0);
|
||||
@@ -1758,21 +1758,21 @@ TEST(YogaTest, wrap_nodes_with_content_sizing_margin_cross) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_with_min_cross_axis) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetMinHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 400);
|
||||
YGNodeStyleSetHeight(root_child0, 200);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 400);
|
||||
YGNodeStyleSetHeight(root_child1, 200);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1816,21 +1816,21 @@ TEST(YogaTest, wrap_with_min_cross_axis) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_with_max_cross_axis) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetMaxHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 400);
|
||||
YGNodeStyleSetHeight(root_child0, 200);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 400);
|
||||
YGNodeStyleSetHeight(root_child1, 200);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1874,14 +1874,14 @@ TEST(YogaTest, wrap_with_max_cross_axis) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, nowrap_expands_flexline_box_to_min_cross) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinHeight(root, 400);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 0);
|
||||
@@ -1916,15 +1916,15 @@ TEST(YogaTest, nowrap_expands_flexline_box_to_min_cross) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, wrap_does_not_impose_min_cross_onto_single_flexline) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexWrap(root, YGWrapWrap);
|
||||
YGNodeStyleSetMinHeight(root, 400);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 0);
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<e3c4624371fc0814532e9941d55c1a2e>>
|
||||
* @generated SignedSource<<112035ed7718c93e29fefe32eb90f7d5>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGIntrinsicSizeTest.html
|
||||
*/
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, contains_inner_text_long_word) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
YGNodeSetContext(root_child0, (void*)"LoremipsumdolorsitametconsecteturadipiscingelitSedeleifasdfettortoracauctorFuscerhoncusipsumtemporerosaliquamconsequatPraesentsoda");
|
||||
@@ -57,15 +57,15 @@ TEST(YogaTest, contains_inner_text_long_word) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_no_width_no_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
YGNodeSetContext(root_child0, (void*)"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eleifasd et tortor ac auctor. Integer at volutpat libero, sed elementum dui interdum id. Aliquam consectetur massa vel neque aliquet, quis consequat risus fringilla. Fusce rhoncus ipsum tempor eros aliquam, vel tempus metus ullamcorper. Nam at nulla sed tellus vestibulum fringilla vel sit amet ligula. Proin velit lectus, euismod sit amet quam vel ultricies dolor, vitae finibus lorem ipsum. Pellentesque molestie at mi sit amet dictum. Donec vehicula lacinia felis sit amet consectetur. Praesent sodales enim sapien, sed varius ipsum pellentesque vel. Aenean eu mi eu justo tincidunt finibus vel sit amet ipsum. Sed bibasdum purus vel ipsum sagittis, quis fermentum dolor lobortis. Etiam vulputate eleifasd lectus vel varius. Phasellus imperdiet lectus sit amet ipsum egestas, ut bibasdum ipsum malesuada. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed mollis eros sit amet elit porttitor, vel venenatis turpis venenatis. Nulla tempus tortor at eros efficitur, sit amet dapibus ipsum malesuada. Ut at mauris sed nunc malesuada convallis. Duis id sem vel magna varius eleifasd vel at est. Donec eget orci a ipsum tempor lobortis. Sed at consectetur ipsum.");
|
||||
@@ -100,15 +100,15 @@ TEST(YogaTest, contains_inner_text_no_width_no_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_no_width_no_height_long_word_in_paragraph) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
YGNodeSetContext(root_child0, (void*)"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed eleifasd et tortor ac auctor. Integer at volutpat libero, sed elementum dui interdum id. Aliquam consectetur massa vel neque aliquet, quis consequat risus fringilla. Fusce rhoncus ipsum tempor eros aliquam, vel tempus metus ullamcorper. Nam at nulla sed tellus vestibulum fringilla vel sit amet ligula. Proin velit lectus, euismod sit amet quam vel ultricies dolor, vitae finibus loremipsumloremipsumloremipsumloremipsumloremipsumloremipsumloremipsumloremipsumloremipsumloremipsumloremipsumloremipsumloremipsumlorem Pellentesque molestie at mi sit amet dictum. Donec vehicula lacinia felis sit amet consectetur. Praesent sodales enim sapien, sed varius ipsum pellentesque vel. Aenean eu mi eu justo tincidunt finibus vel sit amet ipsum. Sed bibasdum purus vel ipsum sagittis, quis fermentum dolor lobortis. Etiam vulputate eleifasd lectus vel varius. Phasellus imperdiet lectus sit amet ipsum egestas, ut bibasdum ipsum malesuada. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed mollis eros sit amet elit porttitor, vel venenatis turpis venenatis. Nulla tempus tortor at eros efficitur, sit amet dapibus ipsum malesuada. Ut at mauris sed nunc malesuada convallis. Duis id sem vel magna varius eleifasd vel at est. Donec eget orci a ipsum tempor lobortis. Sed at consectetur ipsum.");
|
||||
@@ -143,15 +143,15 @@ TEST(YogaTest, contains_inner_text_no_width_no_height_long_word_in_paragraph) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_fixed_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -187,15 +187,15 @@ TEST(YogaTest, contains_inner_text_fixed_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_no_width_fixed_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -231,15 +231,15 @@ TEST(YogaTest, contains_inner_text_no_width_fixed_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_fixed_width_fixed_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
@@ -276,15 +276,15 @@ TEST(YogaTest, contains_inner_text_fixed_width_fixed_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_max_width_max_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxWidth(root_child0, 50);
|
||||
YGNodeStyleSetMaxHeight(root_child0, 20);
|
||||
@@ -321,15 +321,15 @@ TEST(YogaTest, contains_inner_text_max_width_max_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_max_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxWidth(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -365,15 +365,15 @@ TEST(YogaTest, contains_inner_text_max_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_fixed_width_shorter_text) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -409,15 +409,15 @@ TEST(YogaTest, contains_inner_text_fixed_width_shorter_text) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_fixed_height_shorter_text) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -453,15 +453,15 @@ TEST(YogaTest, contains_inner_text_fixed_height_shorter_text) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, contains_inner_text_max_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 2000);
|
||||
YGNodeStyleSetHeight(root, 2000);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<af3f0a6458c3e157bbdfb7295838a07a>>
|
||||
* @generated SignedSource<<acb28ab0d3486089ff07a8763f92e22f>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGJustifyContentTest.html
|
||||
*/
|
||||
|
||||
@@ -14,23 +14,23 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, justify_content_row_flex_start) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -83,24 +83,24 @@ TEST(YogaTest, justify_content_row_flex_start) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_row_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -153,24 +153,24 @@ TEST(YogaTest, justify_content_row_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_row_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -223,24 +223,24 @@ TEST(YogaTest, justify_content_row_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_row_space_between) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -293,24 +293,24 @@ TEST(YogaTest, justify_content_row_space_between) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_row_space_around) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -363,22 +363,22 @@ TEST(YogaTest, justify_content_row_space_around) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_column_flex_start) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -431,23 +431,23 @@ TEST(YogaTest, justify_content_column_flex_start) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_column_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -500,23 +500,23 @@ TEST(YogaTest, justify_content_column_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_column_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -569,23 +569,23 @@ TEST(YogaTest, justify_content_column_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_column_space_between) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -638,23 +638,23 @@ TEST(YogaTest, justify_content_column_space_between) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_column_space_around) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -707,16 +707,16 @@ TEST(YogaTest, justify_content_column_space_around) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_row_min_width_and_margin) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMargin(root, YGEdgeLeft, 100);
|
||||
YGNodeStyleSetMinWidth(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -750,9 +750,9 @@ TEST(YogaTest, justify_content_row_min_width_and_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_row_max_width_and_margin) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -760,7 +760,7 @@ TEST(YogaTest, justify_content_row_max_width_and_margin) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetMaxWidth(root, 80);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -794,15 +794,15 @@ TEST(YogaTest, justify_content_row_max_width_and_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_column_min_height_and_margin) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 100);
|
||||
YGNodeStyleSetMinHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -836,16 +836,16 @@ TEST(YogaTest, justify_content_column_min_height_and_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_column_max_height_and_margin) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMargin(root, YGEdgeTop, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
YGNodeStyleSetMaxHeight(root, 80);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -879,23 +879,23 @@ TEST(YogaTest, justify_content_column_max_height_and_margin) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_column_space_evenly) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -948,24 +948,24 @@ TEST(YogaTest, justify_content_column_space_evenly) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_row_space_evenly) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1018,20 +1018,20 @@ TEST(YogaTest, justify_content_row_space_evenly) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_min_width_with_padding_child_width_greater_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignStretch);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 1000);
|
||||
YGNodeStyleSetHeight(root, 1584);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0, YGAlignStretch);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch);
|
||||
@@ -1040,7 +1040,7 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_greater_than_p
|
||||
YGNodeStyleSetMinWidth(root_child0_child0, 400);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 300);
|
||||
@@ -1096,20 +1096,20 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_greater_than_p
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_min_width_with_padding_child_width_lower_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignContent(root, YGAlignStretch);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 1080);
|
||||
YGNodeStyleSetHeight(root, 1584);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0, YGAlignStretch);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch);
|
||||
@@ -1118,7 +1118,7 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_lower_than_par
|
||||
YGNodeStyleSetMinWidth(root_child0_child0, 400);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 199);
|
||||
@@ -1174,25 +1174,25 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_lower_than_par
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_space_between_indefinite_container_dim_with_free_space) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 300);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root_child0, YGJustifySpaceBetween);
|
||||
YGNodeStyleSetMinWidth(root_child0, 200);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 50);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child0_child1, 50);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
@@ -1246,23 +1246,23 @@ TEST(YogaTest, justify_content_space_between_indefinite_container_dim_with_free_
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_flex_start_row_reverse) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 20);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1315,23 +1315,23 @@ TEST(YogaTest, justify_content_flex_start_row_reverse) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_flex_end_row_reverse) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 20);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1384,23 +1384,23 @@ TEST(YogaTest, justify_content_flex_end_row_reverse) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_row_flex_start) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 40);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1453,24 +1453,24 @@ TEST(YogaTest, justify_content_overflow_row_flex_start) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_row_flex_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 40);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1523,24 +1523,24 @@ TEST(YogaTest, justify_content_overflow_row_flex_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_row_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 40);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1593,24 +1593,24 @@ TEST(YogaTest, justify_content_overflow_row_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_row_space_between) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 40);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1663,24 +1663,24 @@ TEST(YogaTest, justify_content_overflow_row_space_between) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_row_space_around) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 40);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1733,24 +1733,24 @@ TEST(YogaTest, justify_content_overflow_row_space_around) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_row_space_evenly) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 40);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1803,24 +1803,24 @@ TEST(YogaTest, justify_content_overflow_row_space_evenly) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_row_reverse_space_around) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 40);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1873,24 +1873,24 @@ TEST(YogaTest, justify_content_overflow_row_reverse_space_around) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_row_reverse_space_evenly) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 40);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1943,25 +1943,25 @@ TEST(YogaTest, justify_content_overflow_row_reverse_space_evenly) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_row_space_evenly_auto_margin) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 102);
|
||||
YGNodeStyleSetHeight(root, 102);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child0, 40);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 40);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 40);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<1b44904274985a75bd1956bdd6e652a4>>
|
||||
* @generated SignedSource<<c84a7eb4af5be4fbe02e35032e98f64f>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGMarginTest.html
|
||||
*/
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, margin_start) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -56,14 +56,14 @@ TEST(YogaTest, margin_start) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_top) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -97,16 +97,16 @@ TEST(YogaTest, margin_top) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -140,15 +140,15 @@ TEST(YogaTest, margin_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_bottom) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -182,15 +182,15 @@ TEST(YogaTest, margin_bottom) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_and_flex_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10);
|
||||
@@ -225,14 +225,14 @@ TEST(YogaTest, margin_and_flex_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_and_flex_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10);
|
||||
@@ -267,15 +267,15 @@ TEST(YogaTest, margin_and_flex_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_and_stretch_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10);
|
||||
@@ -310,14 +310,14 @@ TEST(YogaTest, margin_and_stretch_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_and_stretch_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10);
|
||||
@@ -352,20 +352,20 @@ TEST(YogaTest, margin_and_stretch_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_with_sibling_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -408,19 +408,19 @@ TEST(YogaTest, margin_with_sibling_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_with_sibling_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -463,21 +463,21 @@ TEST(YogaTest, margin_with_sibling_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_bottom) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -521,21 +521,21 @@ TEST(YogaTest, margin_auto_bottom) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_top) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -579,22 +579,22 @@ TEST(YogaTest, margin_auto_top) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_bottom_and_top) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -638,22 +638,22 @@ TEST(YogaTest, margin_auto_bottom_and_top) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_bottom_and_top_justify_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -697,27 +697,27 @@ TEST(YogaTest, margin_auto_bottom_and_top_justify_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_multiple_children_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child1, YGEdgeTop);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 50);
|
||||
YGNodeStyleSetHeight(root_child2, 50);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -771,28 +771,28 @@ TEST(YogaTest, margin_auto_multiple_children_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_multiple_children_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child1, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 50);
|
||||
YGNodeStyleSetHeight(root_child2, 50);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -846,23 +846,23 @@ TEST(YogaTest, margin_auto_multiple_children_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_left_and_right_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -906,21 +906,21 @@ TEST(YogaTest, margin_auto_left_and_right_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_left_and_right) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -964,23 +964,23 @@ TEST(YogaTest, margin_auto_left_and_right) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_start_and_end_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeStart);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeEnd);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1024,21 +1024,21 @@ TEST(YogaTest, margin_auto_start_and_end_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_start_and_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeStart);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeEnd);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1082,22 +1082,22 @@ TEST(YogaTest, margin_auto_start_and_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_left_and_right_column_and_center) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1141,21 +1141,21 @@ TEST(YogaTest, margin_auto_left_and_right_column_and_center) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_left) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1199,21 +1199,21 @@ TEST(YogaTest, margin_auto_left) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_right) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1257,22 +1257,22 @@ TEST(YogaTest, margin_auto_right) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_left_and_right_stretch) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1316,21 +1316,21 @@ TEST(YogaTest, margin_auto_left_and_right_stretch) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_top_and_bottom_stretch) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1374,14 +1374,14 @@ TEST(YogaTest, margin_auto_top_and_bottom_stretch) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_should_not_be_part_of_max_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 250);
|
||||
YGNodeStyleSetHeight(root, 250);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeTop, 20);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
@@ -1417,14 +1417,14 @@ TEST(YogaTest, margin_should_not_be_part_of_max_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_should_not_be_part_of_max_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 250);
|
||||
YGNodeStyleSetHeight(root, 250);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 20);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetMaxWidth(root_child0, 100);
|
||||
@@ -1460,15 +1460,15 @@ TEST(YogaTest, margin_should_not_be_part_of_max_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_left_right_child_bigger_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 52);
|
||||
YGNodeStyleSetHeight(root, 52);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child0, 72);
|
||||
@@ -1504,15 +1504,15 @@ TEST(YogaTest, margin_auto_left_right_child_bigger_than_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_left_child_bigger_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 52);
|
||||
YGNodeStyleSetHeight(root, 52);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeStyleSetWidth(root_child0, 72);
|
||||
YGNodeStyleSetHeight(root_child0, 72);
|
||||
@@ -1547,15 +1547,15 @@ TEST(YogaTest, margin_auto_left_child_bigger_than_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_fix_left_auto_right_child_bigger_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 52);
|
||||
YGNodeStyleSetHeight(root, 52);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight);
|
||||
YGNodeStyleSetWidth(root_child0, 72);
|
||||
@@ -1591,15 +1591,15 @@ TEST(YogaTest, margin_fix_left_auto_right_child_bigger_than_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_left_fix_right_child_bigger_than_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 52);
|
||||
YGNodeStyleSetHeight(root, 52);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10);
|
||||
YGNodeStyleSetWidth(root_child0, 72);
|
||||
@@ -1635,22 +1635,22 @@ TEST(YogaTest, margin_auto_left_fix_right_child_bigger_than_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_top_stretching_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 0);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1694,22 +1694,22 @@ TEST(YogaTest, margin_auto_top_stretching_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_left_stretching_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 0);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -1753,21 +1753,21 @@ TEST(YogaTest, margin_auto_left_stretching_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, margin_auto_overflowing_container) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 150);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 150);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<46c9872354219da66eb4e3a834edf2e9>>
|
||||
* @generated SignedSource<<0054f2d41727e7a0707701c6d7640cb6>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGMinMaxDimensionTest.html
|
||||
*/
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, max_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMaxWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -55,15 +55,15 @@ TEST(YogaTest, max_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, max_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetMaxHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -99,19 +99,19 @@ TEST(YogaTest, max_height) {
|
||||
TEST(YogaTest, min_height) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMinHeight(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -156,20 +156,20 @@ TEST(YogaTest, min_height) {
|
||||
TEST(YogaTest, min_width) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMinWidth(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -212,16 +212,16 @@ TEST(YogaTest, min_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_min_max) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetMinHeight(root, 100);
|
||||
YGNodeStyleSetMaxHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
YGNodeStyleSetHeight(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -255,16 +255,16 @@ TEST(YogaTest, justify_content_min_max) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, align_items_min_max) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinWidth(root, 100);
|
||||
YGNodeStyleSetMaxWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 60);
|
||||
YGNodeStyleSetHeight(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -298,25 +298,25 @@ TEST(YogaTest, align_items_min_max) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, justify_content_overflow_min_max) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinHeight(root, 100);
|
||||
YGNodeStyleSetMaxHeight(root, 110);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 50);
|
||||
YGNodeStyleSetHeight(root_child2, 50);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -370,20 +370,20 @@ TEST(YogaTest, justify_content_overflow_min_max) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_to_min) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetMinHeight(root, 100);
|
||||
YGNodeStyleSetMaxHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -426,20 +426,20 @@ TEST(YogaTest, flex_grow_to_min) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_in_at_most_container) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0_child0, 0);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -483,13 +483,13 @@ TEST(YogaTest, flex_grow_in_at_most_container) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 0);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
@@ -524,18 +524,18 @@ TEST(YogaTest, flex_grow_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_within_constrained_min_max_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinHeight(root, 100);
|
||||
YGNodeStyleSetMaxHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -578,19 +578,19 @@ TEST(YogaTest, flex_grow_within_constrained_min_max_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_within_max_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxWidth(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 20);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -634,19 +634,19 @@ TEST(YogaTest, flex_grow_within_max_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_within_constrained_max_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxWidth(root_child0, 300);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 20);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -690,21 +690,21 @@ TEST(YogaTest, flex_grow_within_constrained_max_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_root_ignored) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetFlexGrow(root, 1);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetMinHeight(root, 100);
|
||||
YGNodeStyleSetMaxHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 200);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 100);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -747,26 +747,26 @@ TEST(YogaTest, flex_root_ignored) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_root_minimized) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetMinHeight(root, 100);
|
||||
YGNodeStyleSetMaxHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMinHeight(root_child0, 100);
|
||||
YGNodeStyleSetMaxHeight(root_child0, 500);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0_child0, 200);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0_child1, 100);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -819,25 +819,25 @@ TEST(YogaTest, flex_grow_root_minimized) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_height_maximized) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMinHeight(root_child0, 100);
|
||||
YGNodeStyleSetMaxHeight(root_child0, 500);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0_child0, 200);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0_child1, 100);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -890,19 +890,19 @@ TEST(YogaTest, flex_grow_height_maximized) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_within_constrained_min_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -945,17 +945,17 @@ TEST(YogaTest, flex_grow_within_constrained_min_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_within_constrained_min_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -998,24 +998,24 @@ TEST(YogaTest, flex_grow_within_constrained_min_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_within_constrained_max_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetMaxWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexShrink(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0_child0, 100);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child1, 50);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1068,19 +1068,19 @@ TEST(YogaTest, flex_grow_within_constrained_max_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, flex_grow_within_constrained_max_column) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetMaxHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child1, 50);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1123,21 +1123,21 @@ TEST(YogaTest, flex_grow_within_constrained_max_column) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, child_min_max_width_flexing) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 120);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 0);
|
||||
YGNodeStyleSetMinWidth(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 50);
|
||||
YGNodeStyleSetMaxWidth(root_child1, 20);
|
||||
@@ -1182,9 +1182,9 @@ TEST(YogaTest, child_min_max_width_flexing) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, min_width_overrides_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 50);
|
||||
YGNodeStyleSetMinWidth(root, 100);
|
||||
@@ -1208,9 +1208,9 @@ TEST(YogaTest, min_width_overrides_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, max_width_overrides_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetMaxWidth(root, 100);
|
||||
@@ -1234,9 +1234,9 @@ TEST(YogaTest, max_width_overrides_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, min_height_overrides_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
YGNodeStyleSetMinHeight(root, 100);
|
||||
@@ -1260,9 +1260,9 @@ TEST(YogaTest, min_height_overrides_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, max_height_overrides_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
YGNodeStyleSetMaxHeight(root, 100);
|
||||
@@ -1286,15 +1286,15 @@ TEST(YogaTest, max_height_overrides_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, min_max_percent_no_width_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMinWidthPercent(root_child0, 10);
|
||||
YGNodeStyleSetMaxWidthPercent(root_child0, 10);
|
||||
YGNodeStyleSetMinHeightPercent(root_child0, 10);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<a9811894ca1ca801583ca4a59b0d4c7e>>
|
||||
* @generated SignedSource<<6b47783e0e0befdd02efbfa83da49403>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGPaddingTest.html
|
||||
*/
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, padding_no_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetPadding(root, YGEdgeTop, 10);
|
||||
@@ -42,16 +42,16 @@ TEST(YogaTest, padding_no_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, padding_container_match_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetPadding(root, YGEdgeTop, 10);
|
||||
YGNodeStyleSetPadding(root, YGEdgeRight, 10);
|
||||
YGNodeStyleSetPadding(root, YGEdgeBottom, 10);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -85,9 +85,9 @@ TEST(YogaTest, padding_container_match_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, padding_flex_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetPadding(root, YGEdgeTop, 10);
|
||||
@@ -96,7 +96,7 @@ TEST(YogaTest, padding_flex_child) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -130,9 +130,9 @@ TEST(YogaTest, padding_flex_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, padding_stretch_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetPadding(root, YGEdgeTop, 10);
|
||||
@@ -141,7 +141,7 @@ TEST(YogaTest, padding_stretch_child) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -174,9 +174,9 @@ TEST(YogaTest, padding_stretch_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, padding_center_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
@@ -186,7 +186,7 @@ TEST(YogaTest, padding_center_child) {
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -220,16 +220,16 @@ TEST(YogaTest, padding_center_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, child_with_padding_align_end) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexEnd);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 20);
|
||||
YGNodeStyleSetPadding(root_child0, YGEdgeTop, 20);
|
||||
YGNodeStyleSetPadding(root_child0, YGEdgeRight, 20);
|
||||
@@ -267,16 +267,16 @@ TEST(YogaTest, child_with_padding_align_end) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, physical_and_relative_edge_defined) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPadding(root, YGEdgeLeft, 20);
|
||||
YGNodeStyleSetPadding(root, YGEdgeEnd, 50);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<63df2e0a9c41d2ef01b78a3d4ac1bf01>>
|
||||
* @generated SignedSource<<6b01edcfd82ee39d61cfcadd0b312a36>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGPercentageTest.html
|
||||
*/
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, percentage_width_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 30);
|
||||
YGNodeStyleSetHeightPercent(root_child0, 30);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -56,15 +56,15 @@ TEST(YogaTest, percentage_width_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_position_left_top) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 400);
|
||||
YGNodeStyleSetHeight(root, 400);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetPositionPercent(root_child0, YGEdgeTop, 20);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 45);
|
||||
@@ -100,15 +100,15 @@ TEST(YogaTest, percentage_position_left_top) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_position_bottom_right) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 500);
|
||||
YGNodeStyleSetHeight(root, 500);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionPercent(root_child0, YGEdgeRight, 20);
|
||||
YGNodeStyleSetPositionPercent(root_child0, YGEdgeBottom, 10);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 55);
|
||||
@@ -144,20 +144,20 @@ TEST(YogaTest, percentage_position_bottom_right) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_flex_basis) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 25);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -201,19 +201,19 @@ TEST(YogaTest, percentage_flex_basis) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_flex_basis_cross) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 25);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -259,19 +259,19 @@ TEST(YogaTest, percentage_flex_basis_cross) {
|
||||
TEST(YogaTest, percentage_flex_basis_cross_min_height) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMinHeightPercent(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 2);
|
||||
YGNodeStyleSetMinHeightPercent(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
@@ -315,21 +315,21 @@ TEST(YogaTest, percentage_flex_basis_cross_min_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_flex_basis_main_max_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 10);
|
||||
YGNodeStyleSetMaxHeightPercent(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 4);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 10);
|
||||
YGNodeStyleSetMaxHeightPercent(root_child1, 20);
|
||||
@@ -374,20 +374,20 @@ TEST(YogaTest, percentage_flex_basis_main_max_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_flex_basis_cross_max_height) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 10);
|
||||
YGNodeStyleSetMaxHeightPercent(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 4);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 10);
|
||||
YGNodeStyleSetMaxHeightPercent(root_child1, 20);
|
||||
@@ -432,21 +432,21 @@ TEST(YogaTest, percentage_flex_basis_cross_max_height) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_flex_basis_main_max_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 15);
|
||||
YGNodeStyleSetMaxWidthPercent(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 4);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 10);
|
||||
YGNodeStyleSetMaxWidthPercent(root_child1, 20);
|
||||
@@ -491,20 +491,20 @@ TEST(YogaTest, percentage_flex_basis_main_max_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_flex_basis_cross_max_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 10);
|
||||
YGNodeStyleSetMaxWidthPercent(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 4);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 15);
|
||||
YGNodeStyleSetMaxWidthPercent(root_child1, 20);
|
||||
@@ -549,21 +549,21 @@ TEST(YogaTest, percentage_flex_basis_cross_max_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_flex_basis_main_min_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 15);
|
||||
YGNodeStyleSetMinWidthPercent(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 4);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 10);
|
||||
YGNodeStyleSetMinWidthPercent(root_child1, 20);
|
||||
@@ -608,20 +608,20 @@ TEST(YogaTest, percentage_flex_basis_main_min_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_flex_basis_cross_min_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 10);
|
||||
YGNodeStyleSetMinWidthPercent(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 4);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 15);
|
||||
YGNodeStyleSetMinWidthPercent(root_child1, 20);
|
||||
@@ -666,14 +666,14 @@ TEST(YogaTest, percentage_flex_basis_cross_min_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_values) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child0, 10);
|
||||
YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 5);
|
||||
@@ -687,7 +687,7 @@ TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_val
|
||||
YGNodeStyleSetMinWidthPercent(root_child0, 60);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 5);
|
||||
YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 5);
|
||||
YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 5);
|
||||
@@ -699,7 +699,7 @@ TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_val
|
||||
YGNodeStyleSetWidthPercent(root_child0_child0, 50);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeLeft, 5);
|
||||
YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeTop, 5);
|
||||
YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeRight, 5);
|
||||
@@ -711,7 +711,7 @@ TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_val
|
||||
YGNodeStyleSetWidthPercent(root_child0_child0_child0, 45);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 4);
|
||||
YGNodeStyleSetFlexBasisPercent(root_child1, 15);
|
||||
YGNodeStyleSetMinWidthPercent(root_child1, 20);
|
||||
@@ -776,14 +776,14 @@ TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_val
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_margin_should_calculate_based_only_on_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetMarginPercent(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetMarginPercent(root_child0, YGEdgeTop, 10);
|
||||
@@ -791,7 +791,7 @@ TEST(YogaTest, percentage_margin_should_calculate_based_only_on_width) {
|
||||
YGNodeStyleSetMarginPercent(root_child0, YGEdgeBottom, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 10);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -835,14 +835,14 @@ TEST(YogaTest, percentage_margin_should_calculate_based_only_on_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_padding_should_calculate_based_only_on_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetPaddingPercent(root_child0, YGEdgeLeft, 10);
|
||||
YGNodeStyleSetPaddingPercent(root_child0, YGEdgeTop, 10);
|
||||
@@ -850,7 +850,7 @@ TEST(YogaTest, percentage_padding_should_calculate_based_only_on_width) {
|
||||
YGNodeStyleSetPaddingPercent(root_child0, YGEdgeBottom, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 10);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 10);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -894,14 +894,14 @@ TEST(YogaTest, percentage_padding_should_calculate_based_only_on_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_absolute_position) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 30);
|
||||
YGNodeStyleSetPositionPercent(root_child0, YGEdgeTop, 10);
|
||||
@@ -938,12 +938,12 @@ TEST(YogaTest, percentage_absolute_position) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_width_height_undefined_parent_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeightPercent(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -977,27 +977,27 @@ TEST(YogaTest, percentage_width_height_undefined_parent_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_within_flex_grow) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 350);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child1_child0, 100);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child2, 100);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1060,30 +1060,30 @@ TEST(YogaTest, percent_within_flex_grow) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percentage_container_in_wrapping_container) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 200);
|
||||
YGNodeStyleSetHeight(root, 200);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter);
|
||||
YGNodeStyleSetWidthPercent(root_child0_child0, 100);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child0, 50);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child0_child0_child1, 50);
|
||||
YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1);
|
||||
@@ -1147,14 +1147,14 @@ TEST(YogaTest, percentage_container_in_wrapping_container) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_absolute_position) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 50);
|
||||
@@ -1162,11 +1162,11 @@ TEST(YogaTest, percent_absolute_position) {
|
||||
YGNodeStyleSetHeight(root_child0, 50);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0_child0, 100);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0_child1, 100);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -1219,16 +1219,16 @@ TEST(YogaTest, percent_absolute_position) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_of_minmax_main) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinWidth(root, 60);
|
||||
YGNodeStyleSetMaxWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -1264,15 +1264,15 @@ TEST(YogaTest, percent_of_minmax_main) {
|
||||
TEST(YogaTest, percent_of_min_main) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -1308,25 +1308,25 @@ TEST(YogaTest, percent_of_min_main) {
|
||||
TEST(YogaTest, percent_of_min_main_multiple) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child1, 50);
|
||||
YGNodeStyleSetHeight(root_child1, 20);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child2, 50);
|
||||
YGNodeStyleSetHeight(root_child2, 20);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -1382,15 +1382,15 @@ TEST(YogaTest, percent_of_min_main_multiple) {
|
||||
TEST(YogaTest, percent_of_max_main) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMaxWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -1424,15 +1424,15 @@ TEST(YogaTest, percent_of_max_main) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_of_minmax_cross_stretched) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinWidth(root, 60);
|
||||
YGNodeStyleSetMaxWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -1466,15 +1466,15 @@ TEST(YogaTest, percent_of_minmax_cross_stretched) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_absolute_of_minmax_cross_stretched) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinWidth(root, 60);
|
||||
YGNodeStyleSetMaxWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
@@ -1509,16 +1509,16 @@ TEST(YogaTest, percent_absolute_of_minmax_cross_stretched) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_of_minmax_cross_unstretched) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinWidth(root, 60);
|
||||
YGNodeStyleSetMaxWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -1554,15 +1554,15 @@ TEST(YogaTest, percent_of_minmax_cross_unstretched) {
|
||||
TEST(YogaTest, percent_of_min_cross_unstretched) {
|
||||
GTEST_SKIP();
|
||||
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMinWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
@@ -1596,15 +1596,15 @@ TEST(YogaTest, percent_of_min_cross_unstretched) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, percent_of_max_cross_unstretched) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetMaxWidth(root, 60);
|
||||
YGNodeStyleSetHeight(root, 50);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidthPercent(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<399e1b13d86b9e83530955c954462beb>>
|
||||
* @generated SignedSource<<e3f7431374baac61d52853a9bbf348f0>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGRoundingTest.html
|
||||
*/
|
||||
|
||||
@@ -14,23 +14,23 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, rounding_flex_basis_flex_grow_row_width_of_100) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -83,31 +83,31 @@ TEST(YogaTest, rounding_flex_basis_flex_grow_row_width_of_100) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_flex_basis_flex_grow_row_prime_number_width) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 113);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
||||
const YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child3 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child3, 1);
|
||||
YGNodeInsertChild(root, root_child3, 3);
|
||||
|
||||
const YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child4 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child4, 1);
|
||||
YGNodeInsertChild(root, root_child4, 4);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -180,24 +180,24 @@ TEST(YogaTest, rounding_flex_basis_flex_grow_row_prime_number_width) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_flex_basis_flex_shrink_row) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 101);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexShrink(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexBasis(root_child1, 25);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexBasis(root_child2, 25);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -250,25 +250,25 @@ TEST(YogaTest, rounding_flex_basis_flex_shrink_row) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_flex_basis_overrides_main_size) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 113);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -322,25 +322,25 @@ TEST(YogaTest, rounding_flex_basis_overrides_main_size) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_total_fractial) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 87.4f);
|
||||
YGNodeStyleSetHeight(root, 113.4f);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 0.7f);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50.3f);
|
||||
YGNodeStyleSetHeight(root_child0, 20.3f);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1.6f);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1.1f);
|
||||
YGNodeStyleSetHeight(root_child2, 10.7f);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -394,39 +394,39 @@ TEST(YogaTest, rounding_total_fractial) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_total_fractial_nested) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 87.4f);
|
||||
YGNodeStyleSetHeight(root, 113.4f);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 0.7f);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50.3f);
|
||||
YGNodeStyleSetHeight(root_child0, 20.3f);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0_child0, 0.3f);
|
||||
YGNodeStyleSetPosition(root_child0_child0, YGEdgeBottom, 13.3f);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 9.9f);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0_child1, 4);
|
||||
YGNodeStyleSetFlexBasis(root_child0_child1, 0.3f);
|
||||
YGNodeStyleSetPosition(root_child0_child1, YGEdgeTop, 13.3f);
|
||||
YGNodeStyleSetHeight(root_child0_child1, 1.1f);
|
||||
YGNodeInsertChild(root_child0, root_child0_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1.6f);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1.1f);
|
||||
YGNodeStyleSetHeight(root_child2, 10.7f);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -500,25 +500,25 @@ TEST(YogaTest, rounding_total_fractial_nested) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_fractial_input_1) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 113.4f);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -572,25 +572,25 @@ TEST(YogaTest, rounding_fractial_input_1) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_fractial_input_2) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 113.6f);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -644,26 +644,26 @@ TEST(YogaTest, rounding_fractial_input_2) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_fractial_input_3) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root, YGEdgeTop, 0.3f);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 113.4f);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -717,26 +717,26 @@ TEST(YogaTest, rounding_fractial_input_3) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_fractial_input_4) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetPosition(root, YGEdgeTop, 0.7f);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 113.4f);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetFlexBasis(root_child0, 50);
|
||||
YGNodeStyleSetHeight(root_child0, 20);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -790,29 +790,29 @@ TEST(YogaTest, rounding_fractial_input_4) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_inner_node_controversy_horizontal) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 320);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetHeight(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetHeight(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1_child0, 1);
|
||||
YGNodeStyleSetHeight(root_child1_child0, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetHeight(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -876,28 +876,28 @@ TEST(YogaTest, rounding_inner_node_controversy_horizontal) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_inner_node_controversy_vertical) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetHeight(root, 320);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetWidth(root_child0, 10);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetWidth(root_child1, 10);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1_child0, 1);
|
||||
YGNodeStyleSetWidth(root_child1_child0, 10);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetWidth(root_child2, 10);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
@@ -961,45 +961,45 @@ TEST(YogaTest, rounding_inner_node_controversy_vertical) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, rounding_inner_node_controversy_combined) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 640);
|
||||
YGNodeStyleSetHeight(root, 320);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child0, 1);
|
||||
YGNodeStyleSetHeightPercent(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1, 1);
|
||||
YGNodeStyleSetHeightPercent(root_child1, 100);
|
||||
YGNodeInsertChild(root, root_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1_child0, 1);
|
||||
YGNodeStyleSetWidthPercent(root_child1_child0, 100);
|
||||
YGNodeInsertChild(root_child1, root_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1_child1, 1);
|
||||
YGNodeStyleSetWidthPercent(root_child1_child1, 100);
|
||||
YGNodeInsertChild(root_child1, root_child1_child1, 1);
|
||||
|
||||
const YGNodeRef root_child1_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child1_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1_child1_child0, 1);
|
||||
YGNodeStyleSetWidthPercent(root_child1_child1_child0, 100);
|
||||
YGNodeInsertChild(root_child1_child1, root_child1_child1_child0, 0);
|
||||
|
||||
const YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child1_child2, 1);
|
||||
YGNodeStyleSetWidthPercent(root_child1_child2, 100);
|
||||
YGNodeInsertChild(root_child1, root_child1_child2, 2);
|
||||
|
||||
const YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child2 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetFlexGrow(root_child2, 1);
|
||||
YGNodeStyleSetHeightPercent(root_child2, 100);
|
||||
YGNodeInsertChild(root, root_child2, 2);
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* clang-format off
|
||||
* @generated SignedSource<<c391829fbc99f7a80f2f0a2a1fb7178b>>
|
||||
* @generated SignedSource<<e7f54d23d9c9dd1429f45927ac93b715>>
|
||||
* generated by gentest/gentest-driver.ts from gentest/fixtures/YGSizeOverflowTest.html
|
||||
*/
|
||||
|
||||
@@ -14,17 +14,17 @@
|
||||
#include "../util/TestUtil.h"
|
||||
|
||||
TEST(YogaTest, nested_overflowing_child) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 200);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 200);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -68,19 +68,19 @@ TEST(YogaTest, nested_overflowing_child) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, nested_overflowing_child_in_constraint_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 200);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 200);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
@@ -124,18 +124,18 @@ TEST(YogaTest, nested_overflowing_child_in_constraint_parent) {
|
||||
}
|
||||
|
||||
TEST(YogaTest, parent_wrap_child_size_overflowing_parent) {
|
||||
const YGConfigRef config = YGConfigNew();
|
||||
YGConfigRef config = YGConfigNew();
|
||||
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute);
|
||||
YGNodeStyleSetWidth(root, 100);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
const YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0, 100);
|
||||
YGNodeInsertChild(root, root_child0, 0);
|
||||
|
||||
const YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config);
|
||||
YGNodeStyleSetWidth(root_child0_child0, 100);
|
||||
YGNodeStyleSetHeight(root_child0_child0, 200);
|
||||
YGNodeInsertChild(root_child0, root_child0_child0, 0);
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user