Update tests to expect align-items: stretch as default instead of flex-start #13
@@ -18,7 +18,7 @@ static bool eq(float a, float b) {
|
||||
}
|
||||
|
||||
void init_css_node(css_node_t *node) {
|
||||
node->style.align_items = CSS_ALIGN_FLEX_START;
|
||||
node->style.align_items = CSS_ALIGN_STRETCH;
|
||||
|
||||
// Some of the fields default to undefined and not 0
|
||||
node->style.dimensions[CSS_WIDTH] = CSS_UNDEFINED;
|
||||
|
@@ -2752,7 +2752,7 @@ int main()
|
||||
node_1 = node_0->get_child(node_0->context, 0);
|
||||
node_1->layout.position[CSS_TOP] = 0;
|
||||
node_1->layout.position[CSS_LEFT] = 0;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 100.453125;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 100;
|
||||
node_1->layout.dimensions[CSS_HEIGHT] = 36;
|
||||
}
|
||||
}
|
||||
@@ -2800,7 +2800,7 @@ int main()
|
||||
node_1 = node_0->get_child(node_0->context, 0);
|
||||
node_1->layout.position[CSS_TOP] = 20;
|
||||
node_1->layout.position[CSS_LEFT] = 20;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 100.453125;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 60;
|
||||
node_1->layout.dimensions[CSS_HEIGHT] = 36;
|
||||
init_css_node_children(node_1, 1);
|
||||
{
|
||||
@@ -2808,7 +2808,7 @@ int main()
|
||||
node_2 = node_1->get_child(node_1->context, 0);
|
||||
node_2->layout.position[CSS_TOP] = 0;
|
||||
node_2->layout.position[CSS_LEFT] = 0;
|
||||
node_2->layout.dimensions[CSS_WIDTH] = 100.453125;
|
||||
node_2->layout.dimensions[CSS_WIDTH] = 60;
|
||||
node_2->layout.dimensions[CSS_HEIGHT] = 36;
|
||||
}
|
||||
}
|
||||
@@ -3069,12 +3069,12 @@ int main()
|
||||
node_1 = node_0->get_child(node_0->context, 0);
|
||||
node_1->layout.position[CSS_TOP] = 0;
|
||||
node_1->layout.position[CSS_LEFT] = 0;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 0;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 100;
|
||||
node_1->layout.dimensions[CSS_HEIGHT] = 25;
|
||||
node_1 = node_0->get_child(node_0->context, 1);
|
||||
node_1->layout.position[CSS_TOP] = 25;
|
||||
node_1->layout.position[CSS_LEFT] = 0;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 0;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 100;
|
||||
node_1->layout.dimensions[CSS_HEIGHT] = 75;
|
||||
}
|
||||
}
|
||||
@@ -3110,12 +3110,12 @@ int main()
|
||||
node_1 = node_0->get_child(node_0->context, 0);
|
||||
node_1->layout.position[CSS_TOP] = 0;
|
||||
node_1->layout.position[CSS_LEFT] = 0;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 0;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 100;
|
||||
node_1->layout.dimensions[CSS_HEIGHT] = 0;
|
||||
node_1 = node_0->get_child(node_0->context, 1);
|
||||
node_1->layout.position[CSS_TOP] = 0;
|
||||
node_1->layout.position[CSS_LEFT] = 0;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 0;
|
||||
node_1->layout.dimensions[CSS_WIDTH] = 100;
|
||||
node_1->layout.dimensions[CSS_HEIGHT] = 0;
|
||||
}
|
||||
}
|
||||
|
@@ -831,7 +831,7 @@ describe('Layout', function() {
|
||||
{style: {measure: text(texts.big)}}
|
||||
]},
|
||||
{width: 100, height: textSizes.bigHeight, top: 0, left: 0, children: [
|
||||
{width: textSizes.bigMinWidth, height: textSizes.bigHeight, top: 0, left: 0}
|
||||
{width: 100, height: textSizes.bigHeight, top: 0, left: 0}
|
||||
]}
|
||||
);
|
||||
});
|
||||
@@ -844,8 +844,8 @@ describe('Layout', function() {
|
||||
]}
|
||||
]},
|
||||
{width: 100, height: 40 + textSizes.bigHeight, top: 0, left: 0, children: [
|
||||
{width: textSizes.bigMinWidth, height: textSizes.bigHeight, top: 20, left: 20, children: [
|
||||
{width: textSizes.bigMinWidth, height: textSizes.bigHeight, top: 0, left: 0}
|
||||
{width: 60, height: textSizes.bigHeight, top: 20, left: 20, children: [
|
||||
{width: 60, height: textSizes.bigHeight, top: 0, left: 0}
|
||||
]}
|
||||
]}
|
||||
);
|
||||
@@ -923,8 +923,8 @@ describe('Layout', function() {
|
||||
{style: {flex: 7.5}}
|
||||
]},
|
||||
{width: 100, height: 100, top: 0, left: 0, children: [
|
||||
{width: 0, height: 25, top: 0, left: 0},
|
||||
{width: 0, height: 75, top: 25, left: 0},
|
||||
{width: 100, height: 25, top: 0, left: 0},
|
||||
{width: 100, height: 75, top: 25, left: 0},
|
||||
]}
|
||||
);
|
||||
});
|
||||
@@ -936,8 +936,8 @@ describe('Layout', function() {
|
||||
{style: {flex: 0}}
|
||||
]},
|
||||
{width: 100, height: 100, top: 0, left: 0, children: [
|
||||
{width: 0, height: 0, top: 0, left: 0},
|
||||
{width: 0, height: 0, top: 0, left: 0},
|
||||
{width: 100, height: 0, top: 0, left: 0},
|
||||
{width: 100, height: 0, top: 0, left: 0},
|
||||
]}
|
||||
);
|
||||
});
|
||||
|
@@ -7,7 +7,7 @@ public class CSSStyle {
|
||||
|
||||
public CSSFlexDirection flexDirection = CSSFlexDirection.COLUMN;
|
||||
public CSSJustify justifyContent = CSSJustify.FLEX_START;
|
||||
public CSSAlign alignItems = CSSAlign.FLEX_START;
|
||||
public CSSAlign alignItems = CSSAlign.STRETCH;
|
||||
public CSSAlign alignSelf = CSSAlign.AUTO;
|
||||
public CSSPositionType positionType = CSSPositionType.RELATIVE;
|
||||
public float flex;
|
||||
|
@@ -2967,7 +2967,7 @@ public class LayoutEngineTest {
|
||||
node_1 = node_0.getChildAt(0);
|
||||
node_1.layout.y = 0;
|
||||
node_1.layout.x = 0;
|
||||
node_1.layout.width = 100.453125f;
|
||||
node_1.layout.width = 100;
|
||||
node_1.layout.height = 36;
|
||||
}
|
||||
}
|
||||
@@ -3017,7 +3017,7 @@ public class LayoutEngineTest {
|
||||
node_1 = node_0.getChildAt(0);
|
||||
node_1.layout.y = 20;
|
||||
node_1.layout.x = 20;
|
||||
node_1.layout.width = 100.453125f;
|
||||
node_1.layout.width = 60;
|
||||
node_1.layout.height = 36;
|
||||
addChildren(node_1, 1);
|
||||
{
|
||||
@@ -3025,7 +3025,7 @@ public class LayoutEngineTest {
|
||||
node_2 = node_1.getChildAt(0);
|
||||
node_2.layout.y = 0;
|
||||
node_2.layout.x = 0;
|
||||
node_2.layout.width = 100.453125f;
|
||||
node_2.layout.width = 60;
|
||||
node_2.layout.height = 36;
|
||||
}
|
||||
}
|
||||
@@ -3298,12 +3298,12 @@ public class LayoutEngineTest {
|
||||
node_1 = node_0.getChildAt(0);
|
||||
node_1.layout.y = 0;
|
||||
node_1.layout.x = 0;
|
||||
node_1.layout.width = 0;
|
||||
node_1.layout.width = 100;
|
||||
node_1.layout.height = 25;
|
||||
node_1 = node_0.getChildAt(1);
|
||||
node_1.layout.y = 25;
|
||||
node_1.layout.x = 0;
|
||||
node_1.layout.width = 0;
|
||||
node_1.layout.width = 100;
|
||||
node_1.layout.height = 75;
|
||||
}
|
||||
}
|
||||
@@ -3341,12 +3341,12 @@ public class LayoutEngineTest {
|
||||
node_1 = node_0.getChildAt(0);
|
||||
node_1.layout.y = 0;
|
||||
node_1.layout.x = 0;
|
||||
node_1.layout.width = 0;
|
||||
node_1.layout.width = 100;
|
||||
node_1.layout.height = 0;
|
||||
node_1 = node_0.getChildAt(1);
|
||||
node_1.layout.y = 0;
|
||||
node_1.layout.x = 0;
|
||||
node_1.layout.width = 0;
|
||||
node_1.layout.width = 100;
|
||||
node_1.layout.height = 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user