From a047e4d5feda387a48e0d4b2309775c2d829b309 Mon Sep 17 00:00:00 2001 From: Alex Kotliarskyi Date: Fri, 26 Sep 2014 16:22:44 -0700 Subject: [PATCH] Automated script to transpile code and tests to C --- Makefile | 5 + src/Layout-test-utils.c | 22 +- src/Layout-test-utils.js | 54 +- src/Layout.c | 3 +- src/Layout.js | 3 + src/__tests__/Layout-test.c | 3304 +------------------------- src/__tests__/Layout-test.js | 5 +- src/{transpile.html => transpile.js} | 123 +- 8 files changed, 133 insertions(+), 3386 deletions(-) rename src/{transpile.html => transpile.js} (69%) diff --git a/Makefile b/Makefile index 20187e3a..bf0ed728 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ FILES=src/__tests__/Layout-test.c src/Layout.c src/Layout-test-utils.c +all: c test + +c: + @node ./src/transpile.js + test: @gcc -Weverything -Werror -Wno-padded $(FILES) && ./a.out @rm a.out diff --git a/src/Layout-test-utils.c b/src/Layout-test-utils.c index b71dd4ce..1f9c4fc5 100644 --- a/src/Layout-test-utils.c +++ b/src/Layout-test-utils.c @@ -2,6 +2,16 @@ #include "Layout-test-utils.h" #include + /** START_GENERATED **/ +#define SMALL_WIDTH 34.671875 +#define SMALL_HEIGHT 18 +#define BIG_WIDTH 172.421875 +#define BIG_HEIGHT 36 +#define BIG_MIN_WIDTH 100.453125 +#define SMALL_TEXT "small" +#define LONG_TEXT "loooooooooong with space" + /** END_GENERATED **/ + typedef struct failed_test_t { struct failed_test_t *next; const char *name; @@ -52,14 +62,14 @@ css_dim_t measure(void *context, float width) { if (width != width) { width = 1000000; } - if (strcmp(text, "small") == 0) { - dim.dimensions[CSS_WIDTH] = fminf(33, width); - dim.dimensions[CSS_HEIGHT] = 18; + if (strcmp(text, SMALL_TEXT) == 0) { + dim.dimensions[CSS_WIDTH] = fminf(SMALL_WIDTH, width); + dim.dimensions[CSS_HEIGHT] = SMALL_HEIGHT; return dim; } - if (strcmp(text, "loooooooooong with space") == 0) { - dim.dimensions[CSS_WIDTH] = width >= 171 ? 171 : fmaxf(100, width); - dim.dimensions[CSS_HEIGHT] = width >= 171 ? 18 : 36; + if (strcmp(text, LONG_TEXT) == 0) { + dim.dimensions[CSS_WIDTH] = width >= BIG_WIDTH ? BIG_WIDTH : fmaxf(BIG_MIN_WIDTH, width); + dim.dimensions[CSS_HEIGHT] = width >= BIG_WIDTH ? SMALL_HEIGHT : BIG_HEIGHT; return dim; } diff --git a/src/Layout-test-utils.js b/src/Layout-test-utils.js index 1f43099b..3f2a2b60 100644 --- a/src/Layout-test-utils.js +++ b/src/Layout-test-utils.js @@ -1,7 +1,11 @@ -/** @nolint */ +/* globals document, computeLayout */ var layoutTestUtils = (function() { - var iframe = (function() { + var cachedIframe; + function getIframe() { + if (cachedIframe) { + return cachedIframe; + } var iframe = document.createElement('iframe'); document.body.appendChild(iframe); var doc = iframe.contentDocument; @@ -29,15 +33,14 @@ var layoutTestUtils = (function() { } */} + '').slice(15, -4); doc.head.appendChild(style); - + cachedIframe = iframe; return iframe; - })(); - var body = iframe.contentDocument.body; + } - var iframeText = document.createElement('iframe'); - document.body.appendChild(iframeText); - var realComputeLayout = computeLayout; + if (typeof computeLayout === 'function') { + var realComputeLayout = computeLayout; + } function computeCSSLayout(rootNode) { function fillNodes(node) { @@ -74,7 +77,7 @@ var layoutTestUtils = (function() { } function computeDOMLayout(node) { - var body = iframe.contentDocument.body; + var body = getIframe().contentDocument.body; function transfer(div, node, name, ext) { if (name in node.style) { @@ -229,7 +232,11 @@ var layoutTestUtils = (function() { return node; } + var iframeText; function measureTextSizes(text, width) { + iframeText = iframeText || document.createElement('iframe'); + document.body.appendChild(iframeText); + var body = iframeText.contentDocument.body; if (width === undefined || width !== width) { width = Infinity; @@ -262,13 +269,24 @@ var layoutTestUtils = (function() { big: 'loooooooooong with space', }; - var textSizes = { - smallWidth: measureTextSizes(texts.small, 0).width, - smallHeight: measureTextSizes(texts.small, 0).height, - bigWidth: measureTextSizes(texts.big).width, - bigHeight: measureTextSizes(texts.big, 0).height, - bigMinWidth: measureTextSizes(texts.big, 0).width, - }; + var textSizes; + if (typeof require === 'function') { + textSizes = { + smallWidth: 34.671875, + smallHeight: 18, + bigWidth: 172.421875, + bigHeight: 36, + bigMinWidth: 100.453125 + }; + } else { + textSizes = { + smallWidth: measureTextSizes(texts.small, 0).width, + smallHeight: measureTextSizes(texts.small, 0).height, + bigWidth: measureTextSizes(texts.big).width, + bigHeight: measureTextSizes(texts.big, 0).height, + bigMinWidth: measureTextSizes(texts.big, 0).width, + }; + } return { texts: texts, @@ -317,3 +335,7 @@ var layoutTestUtils = (function() { } } })(); + +if (typeof module !== 'undefined') { + module.exports = layoutTestUtils; +} diff --git a/src/Layout.c b/src/Layout.c index 8574dcad..a6035801 100644 --- a/src/Layout.c +++ b/src/Layout.c @@ -322,6 +322,7 @@ static float getRelativePosition(css_node_t *node, css_flex_direction_t axis) { } static void layoutNodeImpl(css_node_t *node, float parentMaxWidth) { + /** START_GENERATED **/ css_flex_direction_t mainAxis = getFlexDirection(node); css_flex_direction_t crossAxis = mainAxis == CSS_FLEX_DIRECTION_ROW ? CSS_FLEX_DIRECTION_COLUMN : @@ -672,6 +673,7 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth) { } } } + /** END_GENERATED **/ } void layoutNode(css_node_t *node, float parentMaxWidth) { @@ -702,4 +704,3 @@ void layoutNode(css_node_t *node, float parentMaxWidth) { layout->last_position[CSS_LEFT] = layout->position[CSS_LEFT]; } } - diff --git a/src/Layout.js b/src/Layout.js index 42a66ca9..27c3cf29 100755 --- a/src/Layout.js +++ b/src/Layout.js @@ -551,4 +551,7 @@ var computeLayout = (function() { }; })(); +if (typeof module === 'object') { + module.exports = computeLayout; +} diff --git a/src/__tests__/Layout-test.c b/src/__tests__/Layout-test.c index b362580e..bc39ac3d 100644 --- a/src/__tests__/Layout-test.c +++ b/src/__tests__/Layout-test.c @@ -5,6 +5,7 @@ int main() { + /** START_GENERATED **/ { css_node_t *root_node = new_test_css_node(); { @@ -3224,3307 +3225,6 @@ int main() test("should layout node with text and position absolute", root_node, root_layout); } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_0->style.dimensions[CSS_WIDTH] = 620; - node_0->style.dimensions[CSS_HEIGHT] = 595; - node_0->style.margin[CSS_BOTTOM] = 13; - node_0->style.padding[CSS_LEFT] = 7; - node_0->style.padding[CSS_TOP] = 7; - node_0->style.padding[CSS_RIGHT] = 7; - node_0->style.padding[CSS_BOTTOM] = 7; - node_0->style.border[CSS_RIGHT] = 3; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - 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] = 620; - node_0->layout.dimensions[CSS_HEIGHT] = 595; - } - - test("Random #0", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.dimensions[CSS_WIDTH] = 603; - node_0->style.margin[CSS_LEFT] = -5; - node_0->style.padding[CSS_TOP] = 18; - node_0->style.padding[CSS_BOTTOM] = 14; - node_0->style.border[CSS_LEFT] = 2; - node_0->style.border[CSS_TOP] = 2; - node_0->style.border[CSS_RIGHT] = 2; - node_0->style.border[CSS_BOTTOM] = 2; - node_0->style.border[CSS_LEFT] = 2; - node_0->style.position[CSS_TOP] = 6; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 6; - node_0->layout.position[CSS_LEFT] = -5; - node_0->layout.dimensions[CSS_WIDTH] = 603; - node_0->layout.dimensions[CSS_HEIGHT] = 54; - } - - test("Random #1", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #2", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.dimensions[CSS_HEIGHT] = 338; - node_0->style.margin[CSS_LEFT] = -5; - node_0->style.margin[CSS_TOP] = -5; - node_0->style.margin[CSS_RIGHT] = -5; - node_0->style.margin[CSS_BOTTOM] = -5; - node_0->style.margin[CSS_TOP] = 18; - node_0->style.padding[CSS_LEFT] = 10; - node_0->style.padding[CSS_RIGHT] = 13; - node_0->style.border[CSS_TOP] = 3; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 18; - node_0->layout.position[CSS_LEFT] = -5; - node_0->layout.dimensions[CSS_WIDTH] = 195.421875; - node_0->layout.dimensions[CSS_HEIGHT] = 338; - } - - test("Random #3", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.dimensions[CSS_WIDTH] = 255; - node_0->style.margin[CSS_RIGHT] = -6; - node_0->style.margin[CSS_BOTTOM] = -3; - node_0->style.padding[CSS_LEFT] = 4; - node_0->style.padding[CSS_TOP] = 4; - node_0->style.padding[CSS_RIGHT] = 4; - node_0->style.padding[CSS_BOTTOM] = 4; - node_0->style.padding[CSS_TOP] = 8; - node_0->style.border[CSS_LEFT] = 2; - node_0->style.border[CSS_TOP] = 2; - node_0->style.border[CSS_RIGHT] = 2; - node_0->style.border[CSS_BOTTOM] = 2; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.border[CSS_RIGHT] = 2; - node_0->style.border[CSS_BOTTOM] = 1; - } - - 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] = 255; - node_0->layout.dimensions[CSS_HEIGHT] = 15; - } - - test("Random #4", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.dimensions[CSS_HEIGHT] = 116; - node_0->style.margin[CSS_TOP] = 10; - 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.justify_content = CSS_JUSTIFY_CENTER; - node_1->style.align_self = CSS_ALIGN_FLEX_START; - node_1->style.dimensions[CSS_HEIGHT] = 633; - node_1->style.margin[CSS_LEFT] = 19; - node_1->style.margin[CSS_TOP] = 19; - node_1->style.margin[CSS_RIGHT] = 19; - node_1->style.margin[CSS_BOTTOM] = 19; - node_1->style.margin[CSS_LEFT] = 3; - node_1->style.margin[CSS_TOP] = 17; - node_1->style.margin[CSS_RIGHT] = 8; - node_1->style.border[CSS_LEFT] = 2; - node_1->style.border[CSS_BOTTOM] = 0; - node_1->style.position[CSS_LEFT] = -10; - node_1->style.position[CSS_TOP] = 8; - node_1->measure = measure; - node_1->context = "small"; - node_1 = node_0->get_child(node_0->context, 1); - node_1->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_1->style.justify_content = CSS_JUSTIFY_FLEX_END; - node_1->style.align_items = CSS_ALIGN_FLEX_END; - node_1->style.position_type = CSS_POSITION_ABSOLUTE; - node_1->style.margin[CSS_LEFT] = 4; - node_1->style.margin[CSS_TOP] = 13; - node_1->style.margin[CSS_RIGHT] = -2; - node_1->style.margin[CSS_BOTTOM] = 1; - node_1->style.padding[CSS_LEFT] = 2; - node_1->style.padding[CSS_TOP] = 2; - node_1->style.padding[CSS_RIGHT] = 2; - node_1->style.padding[CSS_BOTTOM] = 2; - node_1->style.padding[CSS_RIGHT] = 5; - node_1->style.border[CSS_TOP] = 3; - node_1->style.border[CSS_BOTTOM] = 3; - node_1->style.position[CSS_LEFT] = -7; - node_1->style.position[CSS_TOP] = -10; - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 10; - node_0->layout.position[CSS_LEFT] = 0; - node_0->layout.dimensions[CSS_WIDTH] = 47.671875; - node_0->layout.dimensions[CSS_HEIGHT] = 116; - 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] = 25; - node_1->layout.position[CSS_LEFT] = -7; - node_1->layout.dimensions[CSS_WIDTH] = 36.671875; - node_1->layout.dimensions[CSS_HEIGHT] = 633; - node_1 = node_0->get_child(node_0->context, 1); - node_1->layout.position[CSS_TOP] = 3; - node_1->layout.position[CSS_LEFT] = -3; - node_1->layout.dimensions[CSS_WIDTH] = 7; - node_1->layout.dimensions[CSS_HEIGHT] = 10; - } - } - - test("Random #5", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node_0->style.dimensions[CSS_WIDTH] = 426; - node_0->style.dimensions[CSS_HEIGHT] = 497; - node_0->style.margin[CSS_TOP] = 1; - node_0->style.margin[CSS_RIGHT] = 14; - node_0->style.padding[CSS_RIGHT] = 7; - node_0->style.border[CSS_LEFT] = 2; - node_0->style.border[CSS_RIGHT] = 2; - node_0->style.position[CSS_TOP] = -1; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - 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] = 426; - node_0->layout.dimensions[CSS_HEIGHT] = 497; - } - - test("Random #6", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #7", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node_0->style.align_items = CSS_ALIGN_STRETCH; - node_0->style.dimensions[CSS_HEIGHT] = 757; - node_0->style.margin[CSS_LEFT] = 8; - node_0->style.margin[CSS_TOP] = 6; - node_0->style.margin[CSS_RIGHT] = -1; - node_0->style.margin[CSS_BOTTOM] = 15; - node_0->style.border[CSS_LEFT] = 2; - node_0->style.border[CSS_TOP] = 1; - node_0->style.border[CSS_BOTTOM] = 0; - node_0->style.position[CSS_LEFT] = 5; - node_0->style.position[CSS_TOP] = -2; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node_1->style.align_items = CSS_ALIGN_CENTER; - node_1->style.margin[CSS_LEFT] = 16; - node_1->style.margin[CSS_TOP] = 16; - node_1->style.margin[CSS_RIGHT] = 16; - node_1->style.margin[CSS_BOTTOM] = 16; - node_1->style.margin[CSS_LEFT] = 11; - node_1->style.margin[CSS_TOP] = -2; - node_1->style.padding[CSS_LEFT] = 3; - node_1->style.padding[CSS_TOP] = 3; - node_1->style.padding[CSS_RIGHT] = 3; - node_1->style.padding[CSS_BOTTOM] = 3; - node_1->style.padding[CSS_TOP] = 18; - node_1->style.border[CSS_TOP] = 1; - node_1->style.border[CSS_BOTTOM] = 3; - node_1->style.position[CSS_LEFT] = -7; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - node_2 = node_1->get_child(node_1->context, 0); - node_2->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_2->style.align_self = CSS_ALIGN_STRETCH; - node_2->style.dimensions[CSS_HEIGHT] = 626; - node_2->style.margin[CSS_LEFT] = 18; - node_2->style.margin[CSS_TOP] = 18; - node_2->style.margin[CSS_RIGHT] = 18; - node_2->style.margin[CSS_BOTTOM] = 18; - node_2->style.margin[CSS_BOTTOM] = 0; - node_2->style.padding[CSS_RIGHT] = 2; - node_2->style.border[CSS_RIGHT] = 3; - node_2->measure = measure; - node_2->context = "small"; - } - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 4; - node_0->layout.position[CSS_LEFT] = 13; - node_0->layout.dimensions[CSS_WIDTH] = 110.671875; - node_0->layout.dimensions[CSS_HEIGHT] = 757; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = 35.5; - node_1->layout.position[CSS_LEFT] = 6; - node_1->layout.dimensions[CSS_WIDTH] = 81.671875; - node_1->layout.dimensions[CSS_HEIGHT] = 669; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - node_2 = node_1->get_child(node_1->context, 0); - node_2->layout.position[CSS_TOP] = 37; - node_2->layout.position[CSS_LEFT] = 21; - node_2->layout.dimensions[CSS_WIDTH] = 39.671875; - node_2->layout.dimensions[CSS_HEIGHT] = 626; - } - } - } - - test("Random #8", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #9", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #10", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.align_items = CSS_ALIGN_FLEX_END; - node_0->style.dimensions[CSS_WIDTH] = 179; - node_0->style.margin[CSS_TOP] = 7; - node_0->style.padding[CSS_LEFT] = 5; - node_0->style.padding[CSS_TOP] = 17; - node_0->style.padding[CSS_BOTTOM] = 16; - node_0->style.border[CSS_TOP] = 0; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->style.position[CSS_LEFT] = -4; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_1->style.align_self = CSS_ALIGN_CENTER; - node_1->style.dimensions[CSS_WIDTH] = 277; - node_1->style.margin[CSS_RIGHT] = 6; - node_1->style.margin[CSS_BOTTOM] = -10; - node_1->style.padding[CSS_LEFT] = 4; - node_1->style.padding[CSS_TOP] = 4; - node_1->style.padding[CSS_RIGHT] = 4; - node_1->style.padding[CSS_BOTTOM] = 4; - node_1->style.padding[CSS_LEFT] = 11; - node_1->style.border[CSS_LEFT] = 1; - node_1->style.border[CSS_TOP] = 1; - node_1->style.border[CSS_RIGHT] = 1; - node_1->style.border[CSS_BOTTOM] = 1; - node_1->style.border[CSS_TOP] = 1; - node_1->style.position[CSS_TOP] = 1; - node_1->measure = measure; - node_1->context = "small"; - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 7; - node_0->layout.position[CSS_LEFT] = -4; - node_0->layout.dimensions[CSS_WIDTH] = 179; - node_0->layout.dimensions[CSS_HEIGHT] = 52; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = 18; - node_1->layout.position[CSS_LEFT] = -49.5; - node_1->layout.dimensions[CSS_WIDTH] = 277; - node_1->layout.dimensions[CSS_HEIGHT] = 28; - } - } - - test("Random #11", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_HEIGHT] = 948; - node_0->style.margin[CSS_LEFT] = 10; - node_0->style.margin[CSS_TOP] = 10; - node_0->style.margin[CSS_RIGHT] = 10; - node_0->style.margin[CSS_BOTTOM] = 10; - node_0->style.margin[CSS_TOP] = 6; - node_0->style.margin[CSS_BOTTOM] = -2; - node_0->style.padding[CSS_LEFT] = 7; - node_0->style.padding[CSS_TOP] = 9; - node_0->style.padding[CSS_RIGHT] = 9; - node_0->style.border[CSS_TOP] = 3; - node_0->style.position[CSS_LEFT] = -8; - node_0->style.position[CSS_TOP] = 0; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 6; - node_0->layout.position[CSS_LEFT] = 2; - node_0->layout.dimensions[CSS_WIDTH] = 188.421875; - node_0->layout.dimensions[CSS_HEIGHT] = 948; - } - - test("Random #12", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node_0->style.dimensions[CSS_WIDTH] = 551; - node_0->style.margin[CSS_LEFT] = -9; - node_0->style.margin[CSS_TOP] = -9; - node_0->style.margin[CSS_RIGHT] = -9; - node_0->style.margin[CSS_BOTTOM] = -9; - node_0->style.margin[CSS_TOP] = 12; - node_0->style.border[CSS_TOP] = 1; - node_0->style.position[CSS_LEFT] = 8; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 12; - node_0->layout.position[CSS_LEFT] = -1; - node_0->layout.dimensions[CSS_WIDTH] = 551; - node_0->layout.dimensions[CSS_HEIGHT] = 19; - } - - test("Random #13", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - node_2 = node_1->get_child(node_1->context, 0); - node_2->style.flex = 0; - node_2->measure = measure; - node_2->context = "loooooooooong with space"; - } - } - } - - 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] = 172.421875; - node_0->layout.dimensions[CSS_HEIGHT] = 36; - init_css_node_children(node_0, 1); - { - 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] = 172.421875; - node_1->layout.dimensions[CSS_HEIGHT] = 36; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - 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] = 0; - node_2->layout.dimensions[CSS_HEIGHT] = 36; - } - } - } - - test("Random #14", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.dimensions[CSS_WIDTH] = 809; - node_0->style.margin[CSS_LEFT] = 6; - node_0->style.margin[CSS_TOP] = 8; - node_0->style.margin[CSS_RIGHT] = 6; - node_0->style.padding[CSS_RIGHT] = 16; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 8; - node_0->layout.position[CSS_LEFT] = 6; - node_0->layout.dimensions[CSS_WIDTH] = 809; - node_0->layout.dimensions[CSS_HEIGHT] = 18; - } - - test("Random #15", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #16", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #17", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #18", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_0->style.margin[CSS_LEFT] = 6; - node_0->style.margin[CSS_TOP] = 6; - node_0->style.margin[CSS_RIGHT] = 6; - node_0->style.margin[CSS_BOTTOM] = 6; - node_0->style.margin[CSS_RIGHT] = 5; - node_0->style.margin[CSS_BOTTOM] = 7; - node_0->style.padding[CSS_RIGHT] = 10; - node_0->style.position[CSS_LEFT] = 8; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 6; - node_0->layout.position[CSS_LEFT] = 14; - node_0->layout.dimensions[CSS_WIDTH] = 10; - node_0->layout.dimensions[CSS_HEIGHT] = 0; - } - - test("Random #19", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_WIDTH] = 161; - node_0->style.dimensions[CSS_HEIGHT] = 261; - node_0->style.margin[CSS_LEFT] = 3; - node_0->style.margin[CSS_RIGHT] = 4; - node_0->style.padding[CSS_TOP] = 2; - node_0->style.border[CSS_LEFT] = 3; - node_0->style.border[CSS_TOP] = 3; - node_0->style.border[CSS_RIGHT] = 3; - node_0->style.border[CSS_BOTTOM] = 3; - node_0->style.border[CSS_RIGHT] = 0; - node_0->style.border[CSS_BOTTOM] = 2; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_1->style.flex = 1; - node_1->style.dimensions[CSS_WIDTH] = 860; - node_1->style.dimensions[CSS_HEIGHT] = 424; - node_1->style.margin[CSS_LEFT] = 10; - node_1->style.margin[CSS_TOP] = 10; - node_1->style.margin[CSS_RIGHT] = 10; - node_1->style.margin[CSS_BOTTOM] = 10; - node_1->style.margin[CSS_TOP] = 5; - node_1->style.margin[CSS_RIGHT] = -7; - node_1->style.padding[CSS_LEFT] = 5; - node_1->style.padding[CSS_TOP] = 5; - node_1->style.padding[CSS_RIGHT] = 5; - node_1->style.padding[CSS_BOTTOM] = 5; - node_1->style.padding[CSS_LEFT] = 5; - node_1->style.padding[CSS_TOP] = 15; - node_1->style.padding[CSS_BOTTOM] = 9; - node_1->style.border[CSS_TOP] = 2; - node_1->style.border[CSS_BOTTOM] = 3; - node_1->style.position[CSS_LEFT] = 4; - node_1->measure = measure; - node_1->context = "small"; - } - } - - 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] = 3; - node_0->layout.dimensions[CSS_WIDTH] = 161; - node_0->layout.dimensions[CSS_HEIGHT] = 261; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = 10; - node_1->layout.position[CSS_LEFT] = 17; - node_1->layout.dimensions[CSS_WIDTH] = 155; - node_1->layout.dimensions[CSS_HEIGHT] = 424; - } - } - - test("Random #20", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_WIDTH] = 596; - node_0->style.margin[CSS_TOP] = 12; - node_0->style.margin[CSS_RIGHT] = 6; - node_0->style.margin[CSS_BOTTOM] = 16; - node_0->style.padding[CSS_LEFT] = 15; - node_0->style.padding[CSS_TOP] = 15; - node_0->style.padding[CSS_RIGHT] = 15; - node_0->style.padding[CSS_BOTTOM] = 15; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.border[CSS_TOP] = 1; - node_0->style.border[CSS_RIGHT] = 1; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->style.position[CSS_LEFT] = -7; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 12; - node_0->layout.position[CSS_LEFT] = -7; - node_0->layout.dimensions[CSS_WIDTH] = 596; - node_0->layout.dimensions[CSS_HEIGHT] = 50; - } - - test("Random #21", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #22", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #23", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_HEIGHT] = 605; - node_0->style.margin[CSS_BOTTOM] = 10; - node_0->style.padding[CSS_LEFT] = 6; - node_0->style.padding[CSS_TOP] = 6; - node_0->style.padding[CSS_RIGHT] = 6; - node_0->style.padding[CSS_BOTTOM] = 6; - node_0->style.padding[CSS_TOP] = 4; - node_0->style.position[CSS_LEFT] = 0; - node_0->style.position[CSS_TOP] = 7; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 7; - node_0->layout.position[CSS_LEFT] = 0; - node_0->layout.dimensions[CSS_WIDTH] = 46.671875; - node_0->layout.dimensions[CSS_HEIGHT] = 605; - } - - test("Random #24", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node_0->style.dimensions[CSS_HEIGHT] = 846; - node_0->style.margin[CSS_LEFT] = 19; - node_0->style.margin[CSS_TOP] = 19; - node_0->style.margin[CSS_RIGHT] = 19; - node_0->style.margin[CSS_BOTTOM] = 19; - node_0->style.margin[CSS_LEFT] = -7; - node_0->style.padding[CSS_LEFT] = 18; - node_0->style.padding[CSS_TOP] = 6; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 19; - node_0->layout.position[CSS_LEFT] = -7; - node_0->layout.dimensions[CSS_WIDTH] = 18; - node_0->layout.dimensions[CSS_HEIGHT] = 846; - } - - test("Random #25", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_WIDTH] = 726; - node_0->style.margin[CSS_LEFT] = 16; - node_0->style.margin[CSS_TOP] = 16; - node_0->style.margin[CSS_RIGHT] = 16; - node_0->style.margin[CSS_BOTTOM] = 16; - node_0->style.margin[CSS_TOP] = 15; - node_0->style.margin[CSS_BOTTOM] = 1; - node_0->style.border[CSS_LEFT] = 2; - node_0->style.border[CSS_TOP] = 2; - node_0->style.border[CSS_RIGHT] = 2; - node_0->style.border[CSS_BOTTOM] = 2; - node_0->style.border[CSS_TOP] = 1; - node_0->style.position[CSS_LEFT] = -1; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 15; - node_0->layout.position[CSS_LEFT] = 15; - node_0->layout.dimensions[CSS_WIDTH] = 726; - node_0->layout.dimensions[CSS_HEIGHT] = 3; - } - - test("Random #26", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #27", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_0->style.align_items = CSS_ALIGN_STRETCH; - node_0->style.margin[CSS_LEFT] = 1; - node_0->style.margin[CSS_RIGHT] = -2; - node_0->style.padding[CSS_LEFT] = 4; - node_0->style.padding[CSS_TOP] = 4; - node_0->style.padding[CSS_RIGHT] = 4; - node_0->style.padding[CSS_BOTTOM] = 4; - node_0->style.padding[CSS_LEFT] = 19; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.border[CSS_TOP] = 1; - node_0->style.position[CSS_TOP] = -3; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -3; - node_0->layout.position[CSS_LEFT] = 1; - node_0->layout.dimensions[CSS_WIDTH] = 24; - node_0->layout.dimensions[CSS_HEIGHT] = 9; - } - - test("Random #28", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #29", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #30", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #31", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #32", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.dimensions[CSS_HEIGHT] = 315; - node_0->style.margin[CSS_TOP] = -2; - node_0->style.margin[CSS_RIGHT] = -4; - node_0->style.margin[CSS_BOTTOM] = 0; - node_0->style.padding[CSS_LEFT] = 18; - node_0->style.border[CSS_RIGHT] = 3; - node_0->style.position[CSS_LEFT] = 4; - node_0->style.position[CSS_TOP] = -2; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -4; - node_0->layout.position[CSS_LEFT] = 4; - node_0->layout.dimensions[CSS_WIDTH] = 21; - node_0->layout.dimensions[CSS_HEIGHT] = 315; - } - - test("Random #33", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #34", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node_0->style.dimensions[CSS_HEIGHT] = 819; - node_0->style.margin[CSS_LEFT] = 1; - node_0->style.margin[CSS_TOP] = 1; - node_0->style.margin[CSS_RIGHT] = 1; - node_0->style.margin[CSS_BOTTOM] = 1; - node_0->style.margin[CSS_TOP] = -3; - node_0->style.margin[CSS_BOTTOM] = 5; - node_0->style.padding[CSS_LEFT] = 18; - node_0->style.border[CSS_LEFT] = 2; - node_0->style.border[CSS_RIGHT] = 3; - node_0->style.position[CSS_LEFT] = 5; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_1->style.align_self = CSS_ALIGN_STRETCH; - node_1->style.flex = 8; - node_1->style.dimensions[CSS_WIDTH] = 532; - node_1->style.margin[CSS_LEFT] = 8; - node_1->style.margin[CSS_TOP] = 8; - node_1->style.margin[CSS_RIGHT] = 8; - node_1->style.margin[CSS_BOTTOM] = 8; - node_1->style.margin[CSS_LEFT] = 16; - node_1->style.margin[CSS_BOTTOM] = 9; - node_1->style.padding[CSS_LEFT] = 7; - node_1->style.padding[CSS_TOP] = 7; - node_1->style.padding[CSS_RIGHT] = 7; - node_1->style.padding[CSS_BOTTOM] = 7; - node_1->style.padding[CSS_LEFT] = 8; - node_1->style.padding[CSS_TOP] = 5; - node_1->style.position[CSS_LEFT] = 4; - node_1->measure = measure; - node_1->context = "small"; - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -3; - node_0->layout.position[CSS_LEFT] = 6; - node_0->layout.dimensions[CSS_WIDTH] = 579; - node_0->layout.dimensions[CSS_HEIGHT] = 819; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = 8; - node_1->layout.position[CSS_LEFT] = 40; - node_1->layout.dimensions[CSS_WIDTH] = 532; - node_1->layout.dimensions[CSS_HEIGHT] = 802; - } - } - - test("Random #35", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.align_items = CSS_ALIGN_CENTER; - node_0->style.margin[CSS_LEFT] = 13; - node_0->style.margin[CSS_TOP] = 13; - node_0->style.margin[CSS_RIGHT] = 13; - node_0->style.margin[CSS_BOTTOM] = 13; - node_0->style.margin[CSS_BOTTOM] = 0; - node_0->style.border[CSS_TOP] = 1; - node_0->style.border[CSS_RIGHT] = 1; - node_0->style.position[CSS_TOP] = 8; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 21; - node_0->layout.position[CSS_LEFT] = 13; - node_0->layout.dimensions[CSS_WIDTH] = 1; - node_0->layout.dimensions[CSS_HEIGHT] = 1; - } - - test("Random #36", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.align_items = CSS_ALIGN_FLEX_END; - node_0->style.dimensions[CSS_WIDTH] = 632; - node_0->style.dimensions[CSS_HEIGHT] = 907; - node_0->style.margin[CSS_LEFT] = -3; - node_0->style.margin[CSS_TOP] = 5; - node_0->style.margin[CSS_RIGHT] = -6; - node_0->style.margin[CSS_BOTTOM] = -5; - node_0->style.padding[CSS_LEFT] = 1; - node_0->style.padding[CSS_TOP] = 1; - node_0->style.padding[CSS_RIGHT] = 1; - node_0->style.padding[CSS_BOTTOM] = 1; - node_0->style.padding[CSS_BOTTOM] = 6; - node_0->style.border[CSS_BOTTOM] = 3; - node_0->style.position[CSS_LEFT] = -9; - node_0->style.position[CSS_TOP] = 4; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 9; - node_0->layout.position[CSS_LEFT] = -12; - node_0->layout.dimensions[CSS_WIDTH] = 632; - node_0->layout.dimensions[CSS_HEIGHT] = 907; - } - - test("Random #37", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #38", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.dimensions[CSS_HEIGHT] = 635; - node_0->style.margin[CSS_LEFT] = 3; - node_0->style.margin[CSS_TOP] = 6; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->style.position[CSS_LEFT] = -5; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 6; - node_0->layout.position[CSS_LEFT] = -2; - node_0->layout.dimensions[CSS_WIDTH] = 172.421875; - node_0->layout.dimensions[CSS_HEIGHT] = 635; - } - - test("Random #39", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #40", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #41", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; - node_0->style.dimensions[CSS_WIDTH] = 398; - node_0->style.dimensions[CSS_HEIGHT] = 198; - node_0->style.margin[CSS_LEFT] = 9; - node_0->style.margin[CSS_TOP] = -9; - node_0->style.margin[CSS_RIGHT] = 13; - node_0->style.margin[CSS_BOTTOM] = 6; - node_0->style.position[CSS_LEFT] = -2; - node_0->style.position[CSS_TOP] = -2; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -11; - node_0->layout.position[CSS_LEFT] = 7; - node_0->layout.dimensions[CSS_WIDTH] = 398; - node_0->layout.dimensions[CSS_HEIGHT] = 198; - } - - test("Random #42", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node_0->style.dimensions[CSS_HEIGHT] = 514; - node_0->style.margin[CSS_LEFT] = 16; - node_0->style.margin[CSS_TOP] = 16; - node_0->style.margin[CSS_RIGHT] = 16; - node_0->style.margin[CSS_BOTTOM] = 16; - node_0->style.margin[CSS_TOP] = 5; - node_0->style.margin[CSS_RIGHT] = 3; - node_0->style.padding[CSS_RIGHT] = 6; - node_0->style.border[CSS_LEFT] = 0; - node_0->style.border[CSS_TOP] = 0; - node_0->style.border[CSS_RIGHT] = 0; - node_0->style.border[CSS_BOTTOM] = 0; - node_0->style.position[CSS_LEFT] = 5; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 5; - node_0->layout.position[CSS_LEFT] = 21; - node_0->layout.dimensions[CSS_WIDTH] = 6; - node_0->layout.dimensions[CSS_HEIGHT] = 514; - } - - test("Random #43", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #44", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_CENTER; - node_0->style.dimensions[CSS_WIDTH] = 952; - node_0->style.margin[CSS_LEFT] = -2; - node_0->style.margin[CSS_TOP] = -2; - node_0->style.margin[CSS_RIGHT] = -2; - node_0->style.margin[CSS_BOTTOM] = -2; - node_0->style.margin[CSS_TOP] = 1; - node_0->style.margin[CSS_BOTTOM] = 2; - node_0->style.padding[CSS_LEFT] = 12; - node_0->style.border[CSS_TOP] = 3; - node_0->style.position[CSS_TOP] = -10; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -9; - node_0->layout.position[CSS_LEFT] = -2; - node_0->layout.dimensions[CSS_WIDTH] = 952; - node_0->layout.dimensions[CSS_HEIGHT] = 3; - } - - test("Random #45", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_WIDTH] = 937; - node_0->style.border[CSS_LEFT] = 0; - node_0->style.border[CSS_TOP] = 0; - node_0->style.border[CSS_RIGHT] = 0; - node_0->style.border[CSS_BOTTOM] = 0; - node_0->style.border[CSS_TOP] = 1; - node_0->style.position[CSS_LEFT] = -2; - node_0->measure = measure; - node_0->context = "small"; - } - - 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] = -2; - node_0->layout.dimensions[CSS_WIDTH] = 937; - node_0->layout.dimensions[CSS_HEIGHT] = 19; - } - - test("Random #46", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_WIDTH] = 530; - node_0->style.dimensions[CSS_HEIGHT] = 726; - node_0->style.margin[CSS_LEFT] = -5; - node_0->style.margin[CSS_TOP] = -5; - node_0->style.margin[CSS_RIGHT] = -5; - node_0->style.margin[CSS_BOTTOM] = -5; - node_0->style.margin[CSS_LEFT] = 10; - node_0->style.padding[CSS_LEFT] = 2; - node_0->style.border[CSS_TOP] = 3; - node_0->style.position[CSS_LEFT] = 0; - 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.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_1->style.dimensions[CSS_WIDTH] = 195; - node_1->style.margin[CSS_TOP] = -2; - node_1->style.margin[CSS_RIGHT] = 15; - node_1->style.margin[CSS_BOTTOM] = 12; - node_1->style.padding[CSS_RIGHT] = 14; - node_1->style.border[CSS_TOP] = 2; - node_1->style.position[CSS_TOP] = -1; - node_1->measure = measure; - node_1->context = "small"; - node_1 = node_0->get_child(node_0->context, 1); - node_1->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node_1->style.dimensions[CSS_WIDTH] = 638; - node_1->style.dimensions[CSS_HEIGHT] = 753; - node_1->style.margin[CSS_LEFT] = 19; - node_1->style.margin[CSS_TOP] = 3; - node_1->style.margin[CSS_RIGHT] = 10; - node_1->style.padding[CSS_LEFT] = 14; - node_1->style.padding[CSS_TOP] = 14; - node_1->style.padding[CSS_RIGHT] = 14; - node_1->style.padding[CSS_BOTTOM] = 14; - node_1->style.padding[CSS_TOP] = 18; - node_1->style.position[CSS_LEFT] = -7; - node_1->measure = measure; - node_1->context = "loooooooooong with space"; - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -5; - node_0->layout.position[CSS_LEFT] = 10; - node_0->layout.dimensions[CSS_WIDTH] = 530; - node_0->layout.dimensions[CSS_HEIGHT] = 726; - 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] = 2; - node_1->layout.dimensions[CSS_WIDTH] = 195; - node_1->layout.dimensions[CSS_HEIGHT] = 20; - node_1 = node_0->get_child(node_0->context, 1); - node_1->layout.position[CSS_TOP] = 6; - node_1->layout.position[CSS_LEFT] = 224; - node_1->layout.dimensions[CSS_WIDTH] = 638; - node_1->layout.dimensions[CSS_HEIGHT] = 753; - } - } - - test("Random #47", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.dimensions[CSS_HEIGHT] = 712; - node_0->style.margin[CSS_LEFT] = 16; - node_0->style.margin[CSS_TOP] = 16; - node_0->style.margin[CSS_RIGHT] = 16; - node_0->style.margin[CSS_BOTTOM] = 16; - node_0->style.margin[CSS_RIGHT] = -2; - node_0->style.margin[CSS_BOTTOM] = 15; - node_0->style.padding[CSS_TOP] = 19; - node_0->style.position[CSS_TOP] = 1; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 17; - node_0->layout.position[CSS_LEFT] = 16; - node_0->layout.dimensions[CSS_WIDTH] = 172.421875; - node_0->layout.dimensions[CSS_HEIGHT] = 712; - } - - test("Random #48", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_0->style.align_items = CSS_ALIGN_STRETCH; - node_0->style.dimensions[CSS_HEIGHT] = 194; - node_0->style.margin[CSS_LEFT] = 1; - node_0->style.margin[CSS_TOP] = 1; - node_0->style.margin[CSS_RIGHT] = 1; - node_0->style.margin[CSS_BOTTOM] = 1; - node_0->style.margin[CSS_TOP] = -7; - node_0->style.margin[CSS_RIGHT] = -6; - node_0->style.padding[CSS_LEFT] = 18; - node_0->style.padding[CSS_TOP] = 18; - node_0->style.padding[CSS_RIGHT] = 18; - node_0->style.padding[CSS_BOTTOM] = 18; - node_0->style.border[CSS_BOTTOM] = 0; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -7; - node_0->layout.position[CSS_LEFT] = 1; - node_0->layout.dimensions[CSS_WIDTH] = 36; - node_0->layout.dimensions[CSS_HEIGHT] = 194; - } - - test("Random #49", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.dimensions[CSS_HEIGHT] = 335; - node_0->style.margin[CSS_LEFT] = -6; - node_0->style.margin[CSS_TOP] = -9; - node_0->style.margin[CSS_BOTTOM] = -2; - node_0->style.border[CSS_TOP] = 2; - node_0->style.position[CSS_LEFT] = -9; - node_0->style.position[CSS_TOP] = -1; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -10; - node_0->layout.position[CSS_LEFT] = -15; - node_0->layout.dimensions[CSS_WIDTH] = 172.421875; - node_0->layout.dimensions[CSS_HEIGHT] = 335; - } - - test("Random #50", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_WIDTH] = 648; - node_0->style.margin[CSS_LEFT] = -1; - node_0->style.margin[CSS_TOP] = 15; - node_0->style.margin[CSS_BOTTOM] = 8; - node_0->style.padding[CSS_LEFT] = 17; - node_0->style.padding[CSS_TOP] = 19; - node_0->style.padding[CSS_BOTTOM] = 2; - node_0->style.border[CSS_LEFT] = 2; - node_0->style.border[CSS_TOP] = 2; - node_0->style.border[CSS_RIGHT] = 2; - node_0->style.border[CSS_BOTTOM] = 2; - node_0->style.position[CSS_TOP] = 7; - init_css_node_children(node_0, 3); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node_1->style.align_items = CSS_ALIGN_FLEX_END; - node_1->style.align_self = CSS_ALIGN_FLEX_START; - node_1->style.position_type = CSS_POSITION_ABSOLUTE; - node_1->style.dimensions[CSS_WIDTH] = 928; - node_1->style.margin[CSS_LEFT] = 5; - node_1->style.margin[CSS_RIGHT] = -3; - node_1->style.margin[CSS_BOTTOM] = -2; - node_1->style.padding[CSS_LEFT] = 19; - node_1->style.padding[CSS_TOP] = 12; - node_1->style.padding[CSS_RIGHT] = 2; - node_1->style.padding[CSS_BOTTOM] = 2; - node_1->style.position[CSS_LEFT] = 1; - node_1->style.position[CSS_TOP] = 0; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - node_2 = node_1->get_child(node_1->context, 0); - node_2->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_2->style.align_items = CSS_ALIGN_FLEX_START; - node_2->style.position_type = CSS_POSITION_RELATIVE; - node_2->style.flex = 9; - node_2->style.dimensions[CSS_HEIGHT] = 898; - node_2->style.margin[CSS_LEFT] = 11; - node_2->style.margin[CSS_TOP] = 11; - node_2->style.margin[CSS_RIGHT] = 11; - node_2->style.margin[CSS_BOTTOM] = 11; - node_2->style.margin[CSS_LEFT] = -7; - node_2->style.margin[CSS_RIGHT] = 9; - node_2->style.margin[CSS_BOTTOM] = -10; - node_2->style.padding[CSS_BOTTOM] = 8; - node_2->style.border[CSS_TOP] = 0; - node_2->style.position[CSS_LEFT] = 4; - node_2->style.position[CSS_TOP] = 8; - init_css_node_children(node_2, 1); - { - css_node_t *node_3; - node_3 = node_2->get_child(node_2->context, 0); - node_3->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_3->style.justify_content = CSS_JUSTIFY_FLEX_END; - node_3->style.dimensions[CSS_HEIGHT] = 274; - node_3->style.margin[CSS_LEFT] = 6; - node_3->style.margin[CSS_TOP] = 6; - node_3->style.margin[CSS_RIGHT] = 6; - node_3->style.margin[CSS_BOTTOM] = 6; - node_3->style.margin[CSS_TOP] = 10; - node_3->style.padding[CSS_LEFT] = 16; - node_3->style.padding[CSS_BOTTOM] = 13; - node_3->style.border[CSS_LEFT] = 2; - node_3->style.position[CSS_TOP] = -9; - init_css_node_children(node_3, 2); - { - css_node_t *node_4; - node_4 = node_3->get_child(node_3->context, 0); - node_4->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_4->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node_4->style.align_items = CSS_ALIGN_STRETCH; - node_4->style.position_type = CSS_POSITION_ABSOLUTE; - node_4->style.margin[CSS_LEFT] = 3; - node_4->style.margin[CSS_TOP] = 3; - node_4->style.margin[CSS_RIGHT] = 3; - node_4->style.margin[CSS_BOTTOM] = 3; - node_4->style.margin[CSS_RIGHT] = -5; - node_4->style.padding[CSS_RIGHT] = 8; - node_4->style.border[CSS_BOTTOM] = 3; - node_4->style.position[CSS_LEFT] = -8; - node_4 = node_3->get_child(node_3->context, 1); - node_4->style.margin[CSS_LEFT] = 16; - node_4->style.margin[CSS_TOP] = 16; - node_4->style.margin[CSS_RIGHT] = 16; - node_4->style.margin[CSS_BOTTOM] = 16; - node_4->style.margin[CSS_TOP] = 1; - node_4->style.padding[CSS_LEFT] = 6; - node_4->style.padding[CSS_RIGHT] = 14; - node_4->style.padding[CSS_BOTTOM] = 19; - node_4->measure = measure; - node_4->context = "small"; - } - } - } - node_1 = node_0->get_child(node_0->context, 1); - node_1->style.justify_content = CSS_JUSTIFY_FLEX_END; - node_1->style.align_self = CSS_ALIGN_FLEX_START; - node_1->style.dimensions[CSS_HEIGHT] = 49; - node_1->style.margin[CSS_TOP] = 8; - node_1->style.margin[CSS_BOTTOM] = 9; - node_1->style.padding[CSS_RIGHT] = 11; - node_1->style.border[CSS_RIGHT] = 3; - node_1->style.position[CSS_LEFT] = 4; - node_1->style.position[CSS_TOP] = 4; - node_1->measure = measure; - node_1->context = "small"; - node_1 = node_0->get_child(node_0->context, 2); - node_1->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_1->style.align_self = CSS_ALIGN_CENTER; - node_1->style.margin[CSS_RIGHT] = 18; - node_1->style.margin[CSS_BOTTOM] = -1; - node_1->style.padding[CSS_TOP] = 14; - node_1->style.padding[CSS_BOTTOM] = 11; - node_1->style.border[CSS_TOP] = 0; - node_1->style.border[CSS_BOTTOM] = 3; - node_1->measure = measure; - node_1->context = "small"; - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 22; - node_0->layout.position[CSS_LEFT] = -1; - node_0->layout.dimensions[CSS_WIDTH] = 648; - node_0->layout.dimensions[CSS_HEIGHT] = 91; - init_css_node_children(node_0, 3); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = 2; - node_1->layout.position[CSS_LEFT] = 8; - node_1->layout.dimensions[CSS_WIDTH] = 928; - node_1->layout.dimensions[CSS_HEIGHT] = 913; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - node_2 = node_1->get_child(node_1->context, 0); - node_2->layout.position[CSS_TOP] = 31; - node_2->layout.position[CSS_LEFT] = 804.328125; - node_2->layout.dimensions[CSS_WIDTH] = 116.671875; - node_2->layout.dimensions[CSS_HEIGHT] = 898; - init_css_node_children(node_2, 1); - { - css_node_t *node_3; - node_3 = node_2->get_child(node_2->context, 0); - node_3->layout.position[CSS_TOP] = 1; - node_3->layout.position[CSS_LEFT] = 6; - node_3->layout.dimensions[CSS_WIDTH] = 104.671875; - node_3->layout.dimensions[CSS_HEIGHT] = 274; - init_css_node_children(node_3, 2); - { - css_node_t *node_4; - node_4 = node_3->get_child(node_3->context, 0); - node_4->layout.position[CSS_TOP] = 210; - node_4->layout.position[CSS_LEFT] = -3; - node_4->layout.dimensions[CSS_WIDTH] = 8; - node_4->layout.dimensions[CSS_HEIGHT] = 3; - node_4 = node_3->get_child(node_3->context, 1); - node_4->layout.position[CSS_TOP] = 208; - node_4->layout.position[CSS_LEFT] = 34; - node_4->layout.dimensions[CSS_WIDTH] = 54.671875; - node_4->layout.dimensions[CSS_HEIGHT] = 37; - } - } - } - node_1 = node_0->get_child(node_0->context, 1); - node_1->layout.position[CSS_TOP] = 33; - node_1->layout.position[CSS_LEFT] = 23; - node_1->layout.dimensions[CSS_WIDTH] = 48.671875; - node_1->layout.dimensions[CSS_HEIGHT] = 49; - node_1 = node_0->get_child(node_0->context, 2); - node_1->layout.position[CSS_TOP] = 31.5; - node_1->layout.position[CSS_LEFT] = 67.671875; - node_1->layout.dimensions[CSS_WIDTH] = 34.671875; - node_1->layout.dimensions[CSS_HEIGHT] = 46; - } - } - - test("Random #51", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.dimensions[CSS_WIDTH] = 803; - node_0->style.dimensions[CSS_HEIGHT] = 826; - node_0->style.margin[CSS_LEFT] = 19; - node_0->style.margin[CSS_RIGHT] = -3; - node_0->style.margin[CSS_BOTTOM] = -6; - node_0->style.padding[CSS_BOTTOM] = 5; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.border[CSS_TOP] = 2; - node_0->style.position[CSS_LEFT] = -6; - node_0->measure = measure; - node_0->context = "small"; - } - - 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] = 13; - node_0->layout.dimensions[CSS_WIDTH] = 803; - node_0->layout.dimensions[CSS_HEIGHT] = 826; - } - - test("Random #52", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; - node_0->style.dimensions[CSS_HEIGHT] = 861; - node_0->style.margin[CSS_LEFT] = 0; - node_0->style.margin[CSS_TOP] = 0; - node_0->style.margin[CSS_RIGHT] = 0; - node_0->style.margin[CSS_BOTTOM] = 0; - node_0->style.margin[CSS_LEFT] = -4; - node_0->style.margin[CSS_RIGHT] = 5; - node_0->style.margin[CSS_BOTTOM] = 18; - node_0->style.position[CSS_LEFT] = -8; - node_0->measure = measure; - node_0->context = "small"; - } - - 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] = -12; - node_0->layout.dimensions[CSS_WIDTH] = 34.671875; - node_0->layout.dimensions[CSS_HEIGHT] = 861; - } - - test("Random #53", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #54", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.dimensions[CSS_WIDTH] = 134; - node_0->style.dimensions[CSS_HEIGHT] = 394; - node_0->style.margin[CSS_LEFT] = 16; - node_0->style.margin[CSS_TOP] = 16; - node_0->style.margin[CSS_RIGHT] = 16; - node_0->style.margin[CSS_BOTTOM] = 16; - node_0->style.margin[CSS_TOP] = 9; - node_0->style.margin[CSS_BOTTOM] = 9; - node_0->style.padding[CSS_LEFT] = 17; - node_0->style.padding[CSS_RIGHT] = 3; - node_0->style.border[CSS_LEFT] = 3; - node_0->style.border[CSS_TOP] = 3; - node_0->style.border[CSS_RIGHT] = 3; - node_0->style.border[CSS_BOTTOM] = 3; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->style.position[CSS_TOP] = -2; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 7; - node_0->layout.position[CSS_LEFT] = 16; - node_0->layout.dimensions[CSS_WIDTH] = 134; - node_0->layout.dimensions[CSS_HEIGHT] = 394; - } - - test("Random #55", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.dimensions[CSS_WIDTH] = 216; - node_0->style.dimensions[CSS_HEIGHT] = 721; - node_0->style.margin[CSS_LEFT] = -6; - node_0->style.margin[CSS_TOP] = -6; - node_0->style.margin[CSS_RIGHT] = -6; - node_0->style.margin[CSS_BOTTOM] = -6; - node_0->style.margin[CSS_LEFT] = 2; - node_0->style.margin[CSS_TOP] = -1; - node_0->style.margin[CSS_RIGHT] = -8; - node_0->style.margin[CSS_BOTTOM] = -10; - node_0->style.padding[CSS_LEFT] = 4; - node_0->style.padding[CSS_TOP] = 19; - node_0->style.padding[CSS_BOTTOM] = 2; - node_0->style.border[CSS_LEFT] = 0; - node_0->style.border[CSS_BOTTOM] = 0; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -1; - node_0->layout.position[CSS_LEFT] = 2; - node_0->layout.dimensions[CSS_WIDTH] = 216; - node_0->layout.dimensions[CSS_HEIGHT] = 721; - } - - test("Random #56", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #57", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.align_items = CSS_ALIGN_FLEX_START; - node_0->style.dimensions[CSS_WIDTH] = 173; - node_0->style.margin[CSS_LEFT] = 11; - node_0->style.margin[CSS_TOP] = 11; - node_0->style.margin[CSS_RIGHT] = 11; - node_0->style.margin[CSS_BOTTOM] = 11; - node_0->style.margin[CSS_LEFT] = 10; - node_0->style.margin[CSS_TOP] = 17; - node_0->style.margin[CSS_RIGHT] = 15; - node_0->style.padding[CSS_BOTTOM] = 5; - node_0->style.border[CSS_BOTTOM] = 0; - node_0->style.position[CSS_LEFT] = 8; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 17; - node_0->layout.position[CSS_LEFT] = 18; - node_0->layout.dimensions[CSS_WIDTH] = 173; - node_0->layout.dimensions[CSS_HEIGHT] = 5; - } - - test("Random #58", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #59", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.align_items = CSS_ALIGN_CENTER; - init_css_node_children(node_0, 2); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1 = node_0->get_child(node_0->context, 1); - node_1->measure = measure; - node_1->context = "loooooooooong with space"; - } - } - - 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] = 172.421875; - node_0->layout.dimensions[CSS_HEIGHT] = 18; - 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] = 86.203125; - node_1->layout.dimensions[CSS_WIDTH] = 0; - 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] = 172.421875; - node_1->layout.dimensions[CSS_HEIGHT] = 18; - } - } - - test("Random #60", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #61", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.dimensions[CSS_WIDTH] = 671; - node_0->style.dimensions[CSS_HEIGHT] = 603; - node_0->style.margin[CSS_LEFT] = 14; - node_0->style.margin[CSS_RIGHT] = 6; - node_0->style.margin[CSS_BOTTOM] = -10; - node_0->style.padding[CSS_LEFT] = 5; - node_0->style.padding[CSS_TOP] = 17; - node_0->style.border[CSS_TOP] = 0; - node_0->measure = measure; - node_0->context = "small"; - } - - 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] = 14; - node_0->layout.dimensions[CSS_WIDTH] = 671; - node_0->layout.dimensions[CSS_HEIGHT] = 603; - } - - test("Random #62", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #63", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #64", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #65", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #66", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node_0->style.dimensions[CSS_WIDTH] = 516; - node_0->style.dimensions[CSS_HEIGHT] = 712; - node_0->style.margin[CSS_LEFT] = 15; - node_0->style.margin[CSS_TOP] = 15; - node_0->style.margin[CSS_RIGHT] = 15; - node_0->style.margin[CSS_BOTTOM] = 15; - node_0->style.margin[CSS_LEFT] = -8; - node_0->style.margin[CSS_RIGHT] = 11; - node_0->style.padding[CSS_LEFT] = 17; - node_0->style.padding[CSS_TOP] = 17; - node_0->style.padding[CSS_RIGHT] = 17; - node_0->style.padding[CSS_BOTTOM] = 17; - node_0->style.padding[CSS_TOP] = 4; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.border[CSS_TOP] = 1; - node_0->style.border[CSS_RIGHT] = 1; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->style.position[CSS_TOP] = 4; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 19; - node_0->layout.position[CSS_LEFT] = -8; - node_0->layout.dimensions[CSS_WIDTH] = 516; - node_0->layout.dimensions[CSS_HEIGHT] = 712; - } - - test("Random #67", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - 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_WIDTH] = 1000; - node_1 = node_0->get_child(node_0->context, 1); - node_1->style.align_self = CSS_ALIGN_CENTER; - node_1->measure = measure; - node_1->context = "small"; - } - } - - 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] = 1000; - node_0->layout.dimensions[CSS_HEIGHT] = 18; - 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] = 1000; - 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] = 482.65625; - node_1->layout.dimensions[CSS_WIDTH] = 34.671875; - node_1->layout.dimensions[CSS_HEIGHT] = 18; - } - } - - test("Random #68", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.dimensions[CSS_WIDTH] = 486; - node_0->style.margin[CSS_LEFT] = 19; - node_0->style.margin[CSS_TOP] = 19; - node_0->style.margin[CSS_RIGHT] = 19; - node_0->style.margin[CSS_BOTTOM] = 19; - node_0->style.margin[CSS_LEFT] = 16; - node_0->style.margin[CSS_RIGHT] = 10; - node_0->style.border[CSS_TOP] = 3; - node_0->style.position[CSS_LEFT] = 8; - node_0->style.position[CSS_TOP] = -6; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_1->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_1->style.align_items = CSS_ALIGN_STRETCH; - node_1->style.flex = 1; - node_1->style.dimensions[CSS_WIDTH] = 482; - node_1->style.dimensions[CSS_HEIGHT] = 818; - node_1->style.margin[CSS_RIGHT] = 14; - node_1->style.margin[CSS_BOTTOM] = -9; - node_1->style.padding[CSS_BOTTOM] = 14; - node_1->style.border[CSS_LEFT] = 1; - node_1->style.border[CSS_TOP] = 2; - node_1->style.border[CSS_RIGHT] = 0; - node_1->style.position[CSS_TOP] = 0; - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 13; - node_0->layout.position[CSS_LEFT] = 24; - node_0->layout.dimensions[CSS_WIDTH] = 486; - node_0->layout.dimensions[CSS_HEIGHT] = 812; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = 3; - node_1->layout.position[CSS_LEFT] = 0; - node_1->layout.dimensions[CSS_WIDTH] = 482; - node_1->layout.dimensions[CSS_HEIGHT] = 818; - } - } - - test("Random #69", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #70", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.align_items = CSS_ALIGN_STRETCH; - node_0->style.margin[CSS_LEFT] = -7; - node_0->style.margin[CSS_TOP] = -7; - node_0->style.margin[CSS_RIGHT] = -7; - node_0->style.margin[CSS_BOTTOM] = -7; - node_0->style.margin[CSS_TOP] = -6; - node_0->style.margin[CSS_RIGHT] = 3; - node_0->style.margin[CSS_BOTTOM] = 1; - node_0->style.padding[CSS_LEFT] = 19; - node_0->style.padding[CSS_TOP] = 19; - node_0->style.padding[CSS_RIGHT] = 19; - node_0->style.padding[CSS_BOTTOM] = 19; - node_0->style.padding[CSS_LEFT] = 3; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.border[CSS_TOP] = 1; - node_0->style.border[CSS_RIGHT] = 1; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->style.border[CSS_LEFT] = 0; - node_0->style.border[CSS_TOP] = 3; - node_0->style.border[CSS_RIGHT] = 1; - node_0->style.position[CSS_LEFT] = -3; - node_0->style.position[CSS_TOP] = 8; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_1->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_1->style.align_items = CSS_ALIGN_CENTER; - node_1->style.align_self = CSS_ALIGN_FLEX_END; - node_1->style.position_type = CSS_POSITION_RELATIVE; - node_1->style.dimensions[CSS_WIDTH] = 422; - node_1->style.dimensions[CSS_HEIGHT] = 971; - node_1->style.margin[CSS_BOTTOM] = 10; - node_1->style.padding[CSS_BOTTOM] = 3; - node_1->style.border[CSS_RIGHT] = 1; - node_1->style.position[CSS_LEFT] = -3; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - node_2 = node_1->get_child(node_1->context, 0); - node_2->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_2->style.justify_content = CSS_JUSTIFY_FLEX_END; - node_2->style.align_items = CSS_ALIGN_CENTER; - node_2->style.position_type = CSS_POSITION_ABSOLUTE; - node_2->style.margin[CSS_LEFT] = 6; - node_2->style.padding[CSS_LEFT] = 0; - node_2->style.padding[CSS_TOP] = 0; - node_2->style.padding[CSS_RIGHT] = 0; - node_2->style.padding[CSS_BOTTOM] = 0; - node_2->style.padding[CSS_RIGHT] = 2; - node_2->style.border[CSS_TOP] = 1; - init_css_node_children(node_2, 3); - { - css_node_t *node_3; - node_3 = node_2->get_child(node_2->context, 0); - node_3->style.margin[CSS_LEFT] = 6; - node_3->style.margin[CSS_TOP] = 6; - node_3->style.margin[CSS_RIGHT] = 6; - node_3->style.margin[CSS_BOTTOM] = 6; - node_3->style.margin[CSS_BOTTOM] = 2; - node_3->style.padding[CSS_TOP] = 8; - node_3->style.padding[CSS_RIGHT] = 6; - node_3->style.padding[CSS_BOTTOM] = 6; - node_3->style.position[CSS_LEFT] = -5; - node_3->measure = measure; - node_3->context = "loooooooooong with space"; - node_3 = node_2->get_child(node_2->context, 1); - node_3->style.margin[CSS_LEFT] = 4; - node_3->style.margin[CSS_TOP] = 8; - node_3->style.margin[CSS_RIGHT] = 15; - node_3->style.padding[CSS_LEFT] = 18; - node_3->style.padding[CSS_TOP] = 18; - node_3->style.padding[CSS_RIGHT] = 18; - node_3->style.padding[CSS_BOTTOM] = 18; - init_css_node_children(node_3, 2); - { - css_node_t *node_4; - node_4 = node_3->get_child(node_3->context, 0); - node_4->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_4->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_4->style.align_self = CSS_ALIGN_CENTER; - node_4->style.dimensions[CSS_HEIGHT] = 96; - node_4->style.margin[CSS_RIGHT] = 7; - node_4->style.margin[CSS_BOTTOM] = -4; - node_4->style.padding[CSS_TOP] = 0; - node_4->style.padding[CSS_RIGHT] = 16; - node_4->style.position[CSS_TOP] = 8; - node_4->measure = measure; - node_4->context = "small"; - node_4 = node_3->get_child(node_3->context, 1); - node_4->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_4->style.align_items = CSS_ALIGN_CENTER; - node_4->style.position_type = CSS_POSITION_ABSOLUTE; - node_4->style.dimensions[CSS_WIDTH] = 493; - node_4->style.margin[CSS_LEFT] = 12; - node_4->style.margin[CSS_TOP] = 12; - node_4->style.margin[CSS_RIGHT] = 12; - node_4->style.margin[CSS_BOTTOM] = 12; - node_4->style.margin[CSS_LEFT] = -5; - node_4->style.margin[CSS_TOP] = 13; - node_4->style.margin[CSS_RIGHT] = -10; - node_4->style.margin[CSS_BOTTOM] = 1; - node_4->style.border[CSS_LEFT] = 0; - node_4->style.border[CSS_TOP] = 0; - node_4->style.border[CSS_RIGHT] = 0; - node_4->style.border[CSS_BOTTOM] = 0; - node_4->style.position[CSS_LEFT] = 9; - init_css_node_children(node_4, 1); - { - css_node_t *node_5; - node_5 = node_4->get_child(node_4->context, 0); - node_5->style.align_self = CSS_ALIGN_FLEX_START; - node_5->style.dimensions[CSS_WIDTH] = 450; - node_5->style.dimensions[CSS_HEIGHT] = 863; - node_5->style.margin[CSS_LEFT] = 5; - node_5->style.margin[CSS_TOP] = 5; - node_5->style.margin[CSS_RIGHT] = 5; - node_5->style.margin[CSS_BOTTOM] = 5; - node_5->style.margin[CSS_RIGHT] = -2; - node_5->style.padding[CSS_RIGHT] = 10; - node_5->style.border[CSS_RIGHT] = 2; - node_5->measure = measure; - node_5->context = "small"; - } - } - node_3 = node_2->get_child(node_2->context, 2); - node_3->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_3->style.align_self = CSS_ALIGN_FLEX_END; - node_3->style.margin[CSS_LEFT] = 13; - node_3->style.margin[CSS_BOTTOM] = -2; - node_3->style.padding[CSS_LEFT] = 16; - node_3->style.padding[CSS_RIGHT] = 9; - node_3->style.border[CSS_BOTTOM] = 0; - node_3->style.position[CSS_LEFT] = 4; - node_3->style.position[CSS_TOP] = 6; - node_3->measure = measure; - node_3->context = "loooooooooong with space"; - } - } - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 2; - node_0->layout.position[CSS_LEFT] = -10; - node_0->layout.dimensions[CSS_WIDTH] = 445; - node_0->layout.dimensions[CSS_HEIGHT] = 1023; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = 22; - node_1->layout.position[CSS_LEFT] = 0; - node_1->layout.dimensions[CSS_WIDTH] = 422; - node_1->layout.dimensions[CSS_HEIGHT] = 971; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - node_2 = node_1->get_child(node_1->context, 0); - node_2->layout.position[CSS_TOP] = 0; - node_2->layout.position[CSS_LEFT] = 6; - node_2->layout.dimensions[CSS_WIDTH] = 212.421875; - node_2->layout.dimensions[CSS_HEIGHT] = 193; - init_css_node_children(node_2, 3); - { - css_node_t *node_3; - node_3 = node_2->get_child(node_2->context, 0); - node_3->layout.position[CSS_TOP] = 7; - node_3->layout.position[CSS_LEFT] = 11; - node_3->layout.dimensions[CSS_WIDTH] = 178.421875; - node_3->layout.dimensions[CSS_HEIGHT] = 32; - node_3 = node_2->get_child(node_2->context, 1); - node_3->layout.position[CSS_TOP] = 49; - node_3->layout.position[CSS_LEFT] = 52.875; - node_3->layout.dimensions[CSS_WIDTH] = 93.671875; - node_3->layout.dimensions[CSS_HEIGHT] = 128; - init_css_node_children(node_3, 2); - { - css_node_t *node_4; - node_4 = node_3->get_child(node_3->context, 0); - node_4->layout.position[CSS_TOP] = 26; - node_4->layout.position[CSS_LEFT] = 18; - node_4->layout.dimensions[CSS_WIDTH] = 50.671875; - node_4->layout.dimensions[CSS_HEIGHT] = 96; - node_4 = node_3->get_child(node_3->context, 1); - node_4->layout.position[CSS_TOP] = 123; - node_4->layout.position[CSS_LEFT] = 4; - node_4->layout.dimensions[CSS_WIDTH] = 493; - node_4->layout.dimensions[CSS_HEIGHT] = 873; - init_css_node_children(node_4, 1); - { - css_node_t *node_5; - node_5 = node_4->get_child(node_4->context, 0); - node_5->layout.position[CSS_TOP] = 5; - node_5->layout.position[CSS_LEFT] = 5; - node_5->layout.dimensions[CSS_WIDTH] = 450; - node_5->layout.dimensions[CSS_HEIGHT] = 863; - } - } - node_3 = node_2->get_child(node_2->context, 2); - node_3->layout.position[CSS_TOP] = 183; - node_3->layout.position[CSS_LEFT] = 17; - node_3->layout.dimensions[CSS_WIDTH] = 197.421875; - node_3->layout.dimensions[CSS_HEIGHT] = 18; - } - } - } - } - - test("Random #71", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.margin[CSS_LEFT] = 12; - node_0->style.margin[CSS_TOP] = 12; - node_0->style.margin[CSS_RIGHT] = 12; - node_0->style.margin[CSS_BOTTOM] = 12; - node_0->style.margin[CSS_LEFT] = -9; - node_0->style.margin[CSS_BOTTOM] = 10; - node_0->style.padding[CSS_LEFT] = 18; - node_0->style.padding[CSS_TOP] = 10; - node_0->style.padding[CSS_RIGHT] = 1; - node_0->style.padding[CSS_BOTTOM] = 2; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.position[CSS_TOP] = 7; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.align_items = CSS_ALIGN_FLEX_START; - node_1->style.align_self = CSS_ALIGN_CENTER; - node_1->style.position_type = CSS_POSITION_ABSOLUTE; - node_1->style.margin[CSS_LEFT] = -6; - node_1->style.margin[CSS_TOP] = -6; - node_1->style.margin[CSS_RIGHT] = -6; - node_1->style.margin[CSS_BOTTOM] = -6; - node_1->style.margin[CSS_RIGHT] = 10; - node_1->style.margin[CSS_BOTTOM] = 0; - node_1->style.padding[CSS_LEFT] = 15; - node_1->style.padding[CSS_TOP] = 15; - node_1->style.padding[CSS_RIGHT] = 15; - node_1->style.padding[CSS_BOTTOM] = 15; - node_1->style.border[CSS_LEFT] = 1; - node_1->style.border[CSS_TOP] = 1; - node_1->style.border[CSS_RIGHT] = 1; - node_1->style.border[CSS_BOTTOM] = 1; - node_1->style.border[CSS_LEFT] = 3; - node_1->style.border[CSS_TOP] = 1; - node_1->style.border[CSS_BOTTOM] = 0; - node_1->style.position[CSS_LEFT] = -7; - node_1->style.position[CSS_TOP] = -9; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - node_2 = node_1->get_child(node_1->context, 0); - node_2->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_2->style.justify_content = CSS_JUSTIFY_CENTER; - node_2->style.align_items = CSS_ALIGN_FLEX_END; - node_2->style.margin[CSS_RIGHT] = 6; - node_2->style.margin[CSS_BOTTOM] = 16; - node_2->style.padding[CSS_TOP] = 6; - node_2->style.border[CSS_LEFT] = 2; - node_2->style.border[CSS_TOP] = 1; - } - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 19; - node_0->layout.position[CSS_LEFT] = -9; - node_0->layout.dimensions[CSS_WIDTH] = 20; - node_0->layout.dimensions[CSS_HEIGHT] = 12; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = -15; - node_1->layout.position[CSS_LEFT] = -12; - node_1->layout.dimensions[CSS_WIDTH] = 42; - node_1->layout.dimensions[CSS_HEIGHT] = 54; - init_css_node_children(node_1, 1); - { - css_node_t *node_2; - node_2 = node_1->get_child(node_1->context, 0); - node_2->layout.position[CSS_TOP] = 16; - node_2->layout.position[CSS_LEFT] = 18; - node_2->layout.dimensions[CSS_WIDTH] = 2; - node_2->layout.dimensions[CSS_HEIGHT] = 7; - } - } - } - - test("Random #72", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_0->style.margin[CSS_LEFT] = 17; - node_0->style.margin[CSS_TOP] = 17; - node_0->style.margin[CSS_RIGHT] = 17; - node_0->style.margin[CSS_BOTTOM] = 17; - node_0->style.margin[CSS_LEFT] = -5; - node_0->style.padding[CSS_RIGHT] = 12; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.border[CSS_TOP] = 1; - node_0->style.border[CSS_RIGHT] = 1; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->style.border[CSS_RIGHT] = 3; - node_0->style.position[CSS_TOP] = 3; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 20; - node_0->layout.position[CSS_LEFT] = -5; - node_0->layout.dimensions[CSS_WIDTH] = 188.421875; - node_0->layout.dimensions[CSS_HEIGHT] = 20; - } - - test("Random #73", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #74", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.align_items = CSS_ALIGN_FLEX_END; - node_0->style.dimensions[CSS_WIDTH] = 332; - node_0->style.margin[CSS_LEFT] = 18; - node_0->style.margin[CSS_TOP] = 18; - node_0->style.margin[CSS_RIGHT] = 18; - node_0->style.margin[CSS_BOTTOM] = 18; - node_0->style.margin[CSS_RIGHT] = -5; - node_0->style.padding[CSS_LEFT] = 12; - node_0->style.padding[CSS_TOP] = 12; - node_0->style.padding[CSS_RIGHT] = 12; - node_0->style.padding[CSS_BOTTOM] = 12; - node_0->style.padding[CSS_BOTTOM] = 2; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.border[CSS_TOP] = 1; - node_0->style.border[CSS_RIGHT] = 1; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->style.border[CSS_LEFT] = 1; - node_0->style.position[CSS_LEFT] = -9; - node_0->style.position[CSS_TOP] = -5; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_1->style.dimensions[CSS_WIDTH] = 818; - node_1->style.dimensions[CSS_HEIGHT] = 543; - node_1->style.margin[CSS_LEFT] = -2; - node_1->style.margin[CSS_TOP] = -2; - node_1->style.margin[CSS_RIGHT] = -2; - node_1->style.margin[CSS_BOTTOM] = -2; - node_1->style.margin[CSS_LEFT] = 8; - node_1->style.margin[CSS_TOP] = 14; - node_1->style.padding[CSS_TOP] = 10; - node_1->measure = measure; - node_1->context = "small"; - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 13; - node_0->layout.position[CSS_LEFT] = 9; - node_0->layout.dimensions[CSS_WIDTH] = 332; - node_0->layout.dimensions[CSS_HEIGHT] = 571; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = 27; - node_1->layout.position[CSS_LEFT] = 21; - node_1->layout.dimensions[CSS_WIDTH] = 818; - node_1->layout.dimensions[CSS_HEIGHT] = 543; - } - } - - test("Random #75", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_HEIGHT] = 885; - node_0->style.margin[CSS_LEFT] = 13; - node_0->style.margin[CSS_BOTTOM] = -2; - node_0->style.padding[CSS_LEFT] = 7; - node_0->style.position[CSS_LEFT] = -4; - } - - 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] = 9; - node_0->layout.dimensions[CSS_WIDTH] = 7; - node_0->layout.dimensions[CSS_HEIGHT] = 885; - } - - test("Random #76", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #77", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #78", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; - node_0->style.dimensions[CSS_HEIGHT] = 332; - node_0->style.margin[CSS_LEFT] = 7; - node_0->style.margin[CSS_TOP] = 7; - node_0->style.margin[CSS_RIGHT] = 7; - node_0->style.margin[CSS_BOTTOM] = 7; - node_0->style.margin[CSS_TOP] = 17; - node_0->style.margin[CSS_RIGHT] = -6; - node_0->style.padding[CSS_LEFT] = 4; - node_0->style.padding[CSS_TOP] = 4; - node_0->style.padding[CSS_RIGHT] = 4; - node_0->style.padding[CSS_BOTTOM] = 4; - node_0->style.padding[CSS_LEFT] = 16; - node_0->style.padding[CSS_TOP] = 6; - node_0->style.border[CSS_LEFT] = 0; - node_0->style.border[CSS_TOP] = 0; - node_0->style.position[CSS_LEFT] = 1; - node_0->style.position[CSS_TOP] = -2; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 15; - node_0->layout.position[CSS_LEFT] = 8; - node_0->layout.dimensions[CSS_WIDTH] = 20; - node_0->layout.dimensions[CSS_HEIGHT] = 332; - } - - test("Random #79", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node_0->style.dimensions[CSS_WIDTH] = 410; - node_0->style.dimensions[CSS_HEIGHT] = 614; - node_0->style.margin[CSS_LEFT] = -2; - node_0->style.margin[CSS_TOP] = -2; - node_0->style.margin[CSS_RIGHT] = -2; - node_0->style.margin[CSS_BOTTOM] = -2; - node_0->style.margin[CSS_TOP] = 16; - node_0->style.margin[CSS_RIGHT] = 3; - node_0->style.margin[CSS_BOTTOM] = -7; - node_0->style.padding[CSS_TOP] = 6; - node_0->style.border[CSS_LEFT] = 3; - node_0->style.border[CSS_TOP] = 3; - node_0->style.border[CSS_RIGHT] = 3; - node_0->style.border[CSS_BOTTOM] = 3; - node_0->style.border[CSS_BOTTOM] = 0; - node_0->style.position[CSS_TOP] = 1; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 17; - node_0->layout.position[CSS_LEFT] = -2; - node_0->layout.dimensions[CSS_WIDTH] = 410; - node_0->layout.dimensions[CSS_HEIGHT] = 614; - } - - test("Random #80", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #81", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #82", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.dimensions[CSS_WIDTH] = 978; - node_0->style.dimensions[CSS_HEIGHT] = 446; - node_0->style.margin[CSS_LEFT] = 10; - node_0->style.margin[CSS_TOP] = 10; - node_0->style.margin[CSS_RIGHT] = 10; - node_0->style.margin[CSS_BOTTOM] = 10; - node_0->style.margin[CSS_LEFT] = -4; - node_0->style.margin[CSS_TOP] = -4; - node_0->style.position[CSS_LEFT] = -4; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->style.align_self = CSS_ALIGN_FLEX_END; - node_1->style.dimensions[CSS_WIDTH] = 256; - node_1->style.dimensions[CSS_HEIGHT] = 883; - node_1->style.margin[CSS_LEFT] = -8; - node_1->style.border[CSS_LEFT] = 0; - node_1->style.border[CSS_TOP] = 3; - node_1->style.border[CSS_BOTTOM] = 0; - node_1->style.position[CSS_LEFT] = 8; - node_1->style.position[CSS_TOP] = -3; - node_1->measure = measure; - node_1->context = "small"; - } - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -4; - node_0->layout.position[CSS_LEFT] = -8; - node_0->layout.dimensions[CSS_WIDTH] = 978; - node_0->layout.dimensions[CSS_HEIGHT] = 446; - init_css_node_children(node_0, 1); - { - css_node_t *node_1; - node_1 = node_0->get_child(node_0->context, 0); - node_1->layout.position[CSS_TOP] = -3; - node_1->layout.position[CSS_LEFT] = 730; - node_1->layout.dimensions[CSS_WIDTH] = 256; - node_1->layout.dimensions[CSS_HEIGHT] = 883; - } - } - - test("Random #83", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.justify_content = CSS_JUSTIFY_CENTER; - node_0->style.margin[CSS_LEFT] = 18; - node_0->style.margin[CSS_TOP] = 18; - node_0->style.margin[CSS_RIGHT] = 18; - node_0->style.margin[CSS_BOTTOM] = 18; - node_0->style.margin[CSS_LEFT] = 18; - node_0->style.margin[CSS_TOP] = -8; - node_0->style.padding[CSS_BOTTOM] = 2; - node_0->style.position[CSS_TOP] = -5; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -13; - node_0->layout.position[CSS_LEFT] = 18; - node_0->layout.dimensions[CSS_WIDTH] = 172.421875; - node_0->layout.dimensions[CSS_HEIGHT] = 20; - } - - test("Random #84", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #85", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_CENTER; - node_0->style.margin[CSS_RIGHT] = -4; - node_0->style.margin[CSS_BOTTOM] = 6; - node_0->style.padding[CSS_LEFT] = 11; - node_0->style.padding[CSS_BOTTOM] = 3; - node_0->style.border[CSS_TOP] = 0; - node_0->style.position[CSS_LEFT] = 7; - } - - 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] = 7; - node_0->layout.dimensions[CSS_WIDTH] = 11; - node_0->layout.dimensions[CSS_HEIGHT] = 3; - } - - test("Random #86", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_0->style.dimensions[CSS_WIDTH] = 335; - node_0->style.margin[CSS_LEFT] = 17; - node_0->style.margin[CSS_TOP] = 17; - node_0->style.margin[CSS_RIGHT] = 17; - node_0->style.margin[CSS_BOTTOM] = 17; - node_0->style.margin[CSS_LEFT] = 16; - node_0->style.margin[CSS_BOTTOM] = 4; - node_0->style.padding[CSS_RIGHT] = 9; - node_0->style.padding[CSS_BOTTOM] = 14; - node_0->style.position[CSS_TOP] = 7; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 24; - node_0->layout.position[CSS_LEFT] = 16; - node_0->layout.dimensions[CSS_WIDTH] = 335; - node_0->layout.dimensions[CSS_HEIGHT] = 32; - } - - test("Random #87", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node_0->style.dimensions[CSS_WIDTH] = 903; - node_0->style.margin[CSS_LEFT] = 7; - node_0->style.margin[CSS_TOP] = 7; - node_0->style.margin[CSS_RIGHT] = 7; - node_0->style.margin[CSS_BOTTOM] = 7; - node_0->style.margin[CSS_BOTTOM] = 13; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 7; - node_0->layout.position[CSS_LEFT] = 7; - node_0->layout.dimensions[CSS_WIDTH] = 903; - node_0->layout.dimensions[CSS_HEIGHT] = 18; - } - - test("Random #88", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.dimensions[CSS_WIDTH] = 380; - node_0->style.dimensions[CSS_HEIGHT] = 824; - node_0->style.margin[CSS_LEFT] = 13; - node_0->style.margin[CSS_TOP] = 13; - node_0->style.margin[CSS_RIGHT] = 13; - node_0->style.margin[CSS_BOTTOM] = 13; - node_0->style.margin[CSS_RIGHT] = 18; - node_0->style.padding[CSS_LEFT] = 4; - node_0->style.padding[CSS_TOP] = 4; - node_0->style.padding[CSS_RIGHT] = 4; - node_0->style.padding[CSS_BOTTOM] = 4; - node_0->style.padding[CSS_LEFT] = 6; - node_0->style.padding[CSS_RIGHT] = 17; - node_0->style.padding[CSS_BOTTOM] = 7; - node_0->style.border[CSS_RIGHT] = 0; - node_0->style.position[CSS_LEFT] = -6; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 13; - node_0->layout.position[CSS_LEFT] = 7; - node_0->layout.dimensions[CSS_WIDTH] = 380; - node_0->layout.dimensions[CSS_HEIGHT] = 824; - } - - test("Random #89", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #90", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node_0->style.margin[CSS_BOTTOM] = 7; - node_0->style.padding[CSS_LEFT] = 3; - node_0->style.padding[CSS_TOP] = 3; - node_0->style.border[CSS_RIGHT] = 0; - node_0->style.position[CSS_LEFT] = -1; - node_0->style.position[CSS_TOP] = 4; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 4; - node_0->layout.position[CSS_LEFT] = -1; - node_0->layout.dimensions[CSS_WIDTH] = 37.671875; - node_0->layout.dimensions[CSS_HEIGHT] = 21; - } - - test("Random #91", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node_0->style.margin[CSS_LEFT] = -8; - node_0->style.margin[CSS_RIGHT] = -2; - node_0->style.margin[CSS_BOTTOM] = 4; - node_0->style.padding[CSS_RIGHT] = 0; - node_0->style.border[CSS_TOP] = 2; - node_0->measure = measure; - node_0->context = "small"; - } - - 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] = -8; - node_0->layout.dimensions[CSS_WIDTH] = 34.671875; - node_0->layout.dimensions[CSS_HEIGHT] = 20; - } - - test("Random #92", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #93", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; - node_0->style.dimensions[CSS_WIDTH] = 922; - node_0->style.margin[CSS_LEFT] = 6; - node_0->style.margin[CSS_TOP] = 6; - node_0->style.margin[CSS_RIGHT] = 6; - node_0->style.margin[CSS_BOTTOM] = 6; - node_0->style.margin[CSS_LEFT] = 18; - node_0->style.margin[CSS_TOP] = -10; - node_0->style.margin[CSS_BOTTOM] = 15; - node_0->style.padding[CSS_TOP] = 3; - node_0->style.border[CSS_LEFT] = 0; - node_0->style.border[CSS_TOP] = 0; - node_0->style.border[CSS_RIGHT] = 0; - node_0->style.border[CSS_BOTTOM] = 0; - node_0->style.border[CSS_LEFT] = 2; - node_0->style.border[CSS_TOP] = 1; - node_0->style.border[CSS_BOTTOM] = 0; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = -10; - node_0->layout.position[CSS_LEFT] = 18; - node_0->layout.dimensions[CSS_WIDTH] = 922; - node_0->layout.dimensions[CSS_HEIGHT] = 22; - } - - test("Random #94", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_CENTER; - node_0->style.dimensions[CSS_WIDTH] = 779; - node_0->style.margin[CSS_LEFT] = 3; - node_0->style.margin[CSS_BOTTOM] = 19; - node_0->style.padding[CSS_LEFT] = 17; - node_0->style.padding[CSS_TOP] = 17; - node_0->style.padding[CSS_RIGHT] = 17; - node_0->style.padding[CSS_BOTTOM] = 17; - node_0->style.padding[CSS_TOP] = 15; - node_0->style.position[CSS_LEFT] = 3; - node_0->style.position[CSS_TOP] = 9; - node_0->measure = measure; - node_0->context = "loooooooooong with space"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 9; - node_0->layout.position[CSS_LEFT] = 6; - node_0->layout.dimensions[CSS_WIDTH] = 779; - node_0->layout.dimensions[CSS_HEIGHT] = 50; - } - - test("Random #95", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; - node_0->style.dimensions[CSS_HEIGHT] = 863; - node_0->style.margin[CSS_TOP] = 6; - node_0->style.margin[CSS_RIGHT] = -7; - node_0->style.padding[CSS_LEFT] = 2; - node_0->style.padding[CSS_BOTTOM] = 19; - node_0->style.border[CSS_BOTTOM] = 1; - node_0->style.position[CSS_TOP] = -3; - node_0->measure = measure; - node_0->context = "small"; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 3; - node_0->layout.position[CSS_LEFT] = 0; - node_0->layout.dimensions[CSS_WIDTH] = 36.671875; - node_0->layout.dimensions[CSS_HEIGHT] = 863; - } - - test("Random #96", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #97", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - css_node_t *node_0 = root_node; - node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node_0->style.dimensions[CSS_WIDTH] = 770; - node_0->style.dimensions[CSS_HEIGHT] = 873; - node_0->style.margin[CSS_BOTTOM] = 15; - node_0->style.padding[CSS_TOP] = 0; - node_0->style.padding[CSS_RIGHT] = 0; - node_0->style.border[CSS_TOP] = 0; - node_0->style.border[CSS_BOTTOM] = 0; - node_0->style.position[CSS_LEFT] = 9; - node_0->style.position[CSS_TOP] = 1; - } - - css_node_t *root_layout = new_test_css_node(); - { - css_node_t *node_0 = root_layout; - node_0->layout.position[CSS_TOP] = 1; - node_0->layout.position[CSS_LEFT] = 9; - node_0->layout.dimensions[CSS_WIDTH] = 770; - node_0->layout.dimensions[CSS_HEIGHT] = 873; - } - - test("Random #98", root_node, root_layout); - } - - { - css_node_t *root_node = new_test_css_node(); - { - } - - 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] = 0; - } - - test("Random #99", root_node, root_layout); - } - + /** END_GENERATED **/ tests_finished(); } diff --git a/src/__tests__/Layout-test.js b/src/__tests__/Layout-test.js index c69740e4..cf632c20 100755 --- a/src/__tests__/Layout-test.js +++ b/src/__tests__/Layout-test.js @@ -1,9 +1,6 @@ +/* globals layoutTestUtils */ var testLayout = layoutTestUtils.testLayout; -var testRandomLayout = layoutTestUtils.testRandomLayout; -var computeLayout = layoutTestUtils.computeLayout; -var computeDOMLayout = layoutTestUtils.computeDOMLayout; -var reduceTest = layoutTestUtils.reduceTest; var text = layoutTestUtils.text; var texts = layoutTestUtils.texts; var textSizes = layoutTestUtils.textSizes; diff --git a/src/transpile.html b/src/transpile.js similarity index 69% rename from src/transpile.html rename to src/transpile.js index e515acd7..4a9b7736 100644 --- a/src/transpile.html +++ b/src/transpile.js @@ -1,75 +1,41 @@ - +var layoutTestUtils = require('./Layout-test-utils.js'); +var computeLayout = require('./Layout.js'); +var fs = require('fs'); - - -

layoutCode

- - - -

Tests

- - - - - + +function transpileAnnotatedJStoC(jsCode) { + return jsCode + .replace('node.style.measure', 'node.measure') + .replace(/\.children\.length/g, '.children_count') + .replace(/\.width/g, '.dimensions[CSS_WIDTH]') + .replace(/\.height/g, '.dimensions[CSS_HEIGHT]') + .replace(/layout\[dim/g, 'layout.dimensions[dim') + .replace(/layout\[pos/g, 'layout.position[pos') + .replace(/layout\[leading/g, 'layout.position[leading') + .replace(/style\[dim/g, 'style.dimensions[dim') + .replace(/node.children\[i\]/g, 'node->get_child(node->context, i)') + .replace(/node\./g, 'node->') + .replace(/child\./g, 'child->') + .replace(/parent\./g, 'parent->') + .replace(/var\/\*([^\/]+)\*\//g, '$1') + .replace(/ === /g, ' == ') + .replace(/\n /g, '\n') + .replace(/\/[*]!([^*]+)[*]\//g, '$1') + .split('\n').slice(1, -1).join('\n'); +} + +function makeConstDefs() { + var lines = [ + '#define SMALL_WIDTH ' + layoutTestUtils.textSizes.smallWidth, + '#define SMALL_HEIGHT ' + layoutTestUtils.textSizes.smallHeight, + '#define BIG_WIDTH ' + layoutTestUtils.textSizes.bigWidth, + '#define BIG_HEIGHT ' + layoutTestUtils.textSizes.bigHeight, + '#define BIG_MIN_WIDTH ' + layoutTestUtils.textSizes.bigMinWidth, + '#define SMALL_TEXT "' + layoutTestUtils.texts.small + '"', + '#define LONG_TEXT "' + layoutTestUtils.texts.big + '"' + ]; + return lines.join('\n'); +} + +function generateFile(fileName, generatedContent) { + var content = fs.readFileSync(fileName, 'utf8').toString(); + content = content.replace(new RegExp( + /\/\*\* START_GENERATED \*\*\/[\s\S]*\/\*\* END_GENERATED \*\*\// + ), '/** START_GENERATED **/\n' + generatedContent + '\n /** END_GENERATED **/'); + + fs.writeFileSync(fileName, content); +} + + +generateFile(__dirname + '/__tests__/Layout-test.c', allTests.map(printLayout).join('\n\n')); +generateFile(__dirname + '/Layout-test-utils.c', makeConstDefs()); +generateFile(__dirname + '/Layout.c', transpileAnnotatedJStoC(computeLayout.toString()));