Update C version

This commit is contained in:
Christopher Chedeau
2015-02-04 07:50:15 -08:00
parent 9ccb4b6c42
commit 5f8c3b0eb7
2 changed files with 53 additions and 7 deletions

View File

@@ -375,7 +375,7 @@ int main()
}
}
test("should layout node with flex", root_node, root_layout);
test("should layout node with just flex", root_node, root_layout);
}
{
@@ -3724,6 +3724,48 @@ int main()
test("should layout flex-wrap", root_node, root_layout);
}
{
css_node_t *root_node = new_test_css_node();
{
css_node_t *node_0 = root_node;
node_0->style.flex_wrap = CSS_WRAP;
node_0->style.dimensions[CSS_HEIGHT] = 100;
init_css_node_children(node_0, 2);
{
css_node_t *node_1;
node_1 = node_0->get_child(node_0->context, 0);
node_1->style.dimensions[CSS_HEIGHT] = 100;
node_1 = node_0->get_child(node_0->context, 1);
node_1->style.dimensions[CSS_HEIGHT] = 200;
}
}
css_node_t *root_layout = new_test_css_node();
{
css_node_t *node_0 = root_layout;
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 0;
node_0->layout.dimensions[CSS_HEIGHT] = 100;
init_css_node_children(node_0, 2);
{
css_node_t *node_1;
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_HEIGHT] = 100;
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_HEIGHT] = 200;
}
}
test("should layout flex wrap with a line bigger than container", root_node, root_layout);
}
/** END_GENERATED **/
return tests_finished();
}