Made relevant JS tests transpile to C ; [src/Layout.c]: print_css_node_rec(): print alignContent ; [src/Layout-test-utils.c]: add_failed_test(): Sets failed_test->next to NULL, otherwise the test crashes if there's one and only one failure ; Added type casts so that it can be compiled as C++ by MSVC on Windows ; [Makefile]: Added c_test_msvc target when running in Windows so that the test executable can be built and debugged with Visual Studio on Windows ;

This commit is contained in:
Pierre Renaux
2015-05-09 13:03:21 +08:00
parent c7fbf44474
commit 14e264f5be
9 changed files with 513 additions and 34 deletions

View File

@@ -142,6 +142,14 @@ static void print_css_node_rec(
printf("alignItems: 'stretch', ");
}
if (node->style.align_content == CSS_ALIGN_CENTER) {
printf("alignContent: 'center', ");
} else if (node->style.align_content == CSS_ALIGN_FLEX_END) {
printf("alignContent: 'flex-end', ");
} else if (node->style.align_content == CSS_ALIGN_STRETCH) {
printf("alignContent: 'stretch', ");
}
if (node->style.align_self == CSS_ALIGN_FLEX_START) {
printf("alignSelf: 'flex-start', ");
} else if (node->style.align_self == CSS_ALIGN_CENTER) {