diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index 4df524b023..895f82f719 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -12,16 +12,16 @@ include(${YOGA_ROOT}/cmake/project-defaults.cmake) add_subdirectory(${YOGA_ROOT}/yoga ${CMAKE_CURRENT_BINARY_DIR}/yoga) -file(GLOB SOURCES_LEGACY CONFIGURE_DEPENDS - ${CMAKE_CURRENT_SOURCE_DIR}/*.c) file(GLOB SOURCES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) add_executable(benchmark ${SOURCES}) -add_executable(benchmarklegacy ${SOURCES_LEGACY}) +add_executable(benchmarklegacy ${CMAKE_CURRENT_SOURCE_DIR}/YGBenchmark.c) +add_executable(benchmarkgrid ${CMAKE_CURRENT_SOURCE_DIR}/YGGridBenchmark.c) target_link_libraries(benchmark yogacore) target_link_libraries(benchmarklegacy yogacore) +target_link_libraries(benchmarkgrid yogacore) target_include_directories(benchmark PRIVATE $) diff --git a/benchmark/YGGridBenchmark.c b/benchmark/YGGridBenchmark.c new file mode 100644 index 0000000000..c8b2c291b7 --- /dev/null +++ b/benchmark/YGGridBenchmark.c @@ -0,0 +1,597 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include +#include +#include +#include +#include + +#include + +#define NUM_REPETITIONS 1000 + +#define YGBENCHMARKS(BLOCK) \ + int main(int argc, char const* argv[]) { \ + (void)argc; \ + (void)argv; \ + clock_t __start; \ + clock_t __endTimes[NUM_REPETITIONS]; \ + { \ + BLOCK \ + } \ + return 0; \ + } + +#define YGBENCHMARK(NAME, BLOCK) \ + __start = clock(); \ + for (uint32_t __i = 0; __i < NUM_REPETITIONS; __i++) { \ + {BLOCK} __endTimes[__i] = clock(); \ + } \ + __printBenchmarkResult(NAME, __start, __endTimes); + +static int __compareDoubles(const void* a, const void* b) { + double arg1 = *(const double*)a; + double arg2 = *(const double*)b; + + if (arg1 < arg2) { + return -1; + } + + if (arg1 > arg2) { + return 1; + } + + return 0; +} + +static void +__printBenchmarkResult(char* name, clock_t start, const clock_t* endTimes) { + double timesInMs[NUM_REPETITIONS]; + double mean = 0; + clock_t lastEnd = start; + for (uint32_t i = 0; i < NUM_REPETITIONS; i++) { + timesInMs[i] = + ((double)(endTimes[i] - lastEnd)) / (double)CLOCKS_PER_SEC * 1000; + lastEnd = endTimes[i]; + mean += timesInMs[i]; + } + mean /= NUM_REPETITIONS; + + qsort(timesInMs, NUM_REPETITIONS, sizeof(double), __compareDoubles); + double median = timesInMs[NUM_REPETITIONS / 2]; + + double variance = 0; + for (uint32_t i = 0; i < NUM_REPETITIONS; i++) { + variance += pow(timesInMs[i] - mean, 2); + } + variance /= NUM_REPETITIONS; + double stddev = sqrt(variance); + + printf("%s: median: %lf ms, stddev: %lf ms\n", name, median, stddev); +} + +static YGSize _measure( + YGNodeConstRef node, + float width, + YGMeasureMode widthMode, + float height, + YGMeasureMode heightMode) { + (void)node; + return (YGSize){ + .width = widthMode == YGMeasureModeUndefined ? 10 : width, + .height = heightMode == YGMeasureModeUndefined ? 10 : height, + }; +} + +static YGSize _measureFixed( + YGNodeConstRef node, + float width, + YGMeasureMode widthMode, + float height, + YGMeasureMode heightMode) { + (void)node; + (void)width; + (void)widthMode; + (void)height; + (void)heightMode; + return (YGSize){ + .width = 50, + .height = 50, + }; +} + +static YGGridTrackListRef createFixed3x100Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGPoints(100)); + YGGridTrackListAddTrack(tracks, YGPoints(100)); + YGGridTrackListAddTrack(tracks, YGPoints(100)); + return tracks; +} + +static YGGridTrackListRef createAuto3Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGAuto()); + YGGridTrackListAddTrack(tracks, YGAuto()); + YGGridTrackListAddTrack(tracks, YGAuto()); + return tracks; +} + +static YGGridTrackListRef createFr3Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + return tracks; +} + +static YGGridTrackListRef createFr4Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + return tracks; +} + +static YGGridTrackListRef createFr5Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + return tracks; +} + +static YGGridTrackListRef createFr2Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + return tracks; +} + +static YGGridTrackListRef createFixed3x80Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGPoints(80)); + YGGridTrackListAddTrack(tracks, YGPoints(80)); + YGGridTrackListAddTrack(tracks, YGPoints(80)); + return tracks; +} + +static YGGridTrackListRef createAuto4Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGAuto()); + YGGridTrackListAddTrack(tracks, YGAuto()); + YGGridTrackListAddTrack(tracks, YGAuto()); + YGGridTrackListAddTrack(tracks, YGAuto()); + return tracks; +} + +static YGGridTrackListRef createAuto2Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGAuto()); + YGGridTrackListAddTrack(tracks, YGAuto()); + return tracks; +} + +static YGGridTrackListRef createPercent3Tracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGPercent(25)); + YGGridTrackListAddTrack(tracks, YGPercent(50)); + YGGridTrackListAddTrack(tracks, YGPercent(25)); + return tracks; +} + +static YGGridTrackListRef createPercent3RowTracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGPercent(33.33f)); + YGGridTrackListAddTrack(tracks, YGPercent(33.33f)); + YGGridTrackListAddTrack(tracks, YGPercent(33.33f)); + return tracks; +} + +static YGGridTrackListRef createMixedColumnTracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGPoints(200)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGPoints(200)); + return tracks; +} + +static YGGridTrackListRef createMixedRowTracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGPoints(60)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGPoints(40)); + return tracks; +} + +static YGGridTrackListRef createMinmaxColumnTracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGMinMax(YGPoints(100), YGFr(1))); + YGGridTrackListAddTrack(tracks, YGMinMax(YGPoints(100), YGFr(1))); + YGGridTrackListAddTrack(tracks, YGMinMax(YGPoints(100), YGFr(1))); + return tracks; +} + +static YGGridTrackListRef createMinmaxRowTracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + YGGridTrackListAddTrack(tracks, YGMinMax(YGPoints(50), YGAuto())); + YGGridTrackListAddTrack(tracks, YGMinMax(YGPoints(50), YGAuto())); + YGGridTrackListAddTrack(tracks, YGMinMax(YGPoints(50), YGAuto())); + return tracks; +} + +static YGGridTrackListRef createMixed20ColumnTracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + for (int i = 0; i < 5; i++) { + YGGridTrackListAddTrack(tracks, YGPoints(100)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGAuto()); + YGGridTrackListAddTrack(tracks, YGMinMax(YGPoints(50), YGFr(1))); + } + return tracks; +} + +static YGGridTrackListRef createMixed50RowTracks(void) { + YGGridTrackListRef tracks = YGGridTrackListCreate(); + for (int i = 0; i < 10; i++) { + YGGridTrackListAddTrack(tracks, YGPoints(40)); + YGGridTrackListAddTrack(tracks, YGFr(1)); + YGGridTrackListAddTrack(tracks, YGAuto()); + YGGridTrackListAddTrack(tracks, YGMinMax(YGPoints(30), YGAuto())); + YGGridTrackListAddTrack(tracks, YGFr(2)); + } + return tracks; +} + +YGBENCHMARKS({ + // Scenario 1: Basic fixed-size grid + YGBENCHMARK("Grid 3x3 fixed tracks", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 300); + YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetGridTemplateColumns(root, createFixed3x100Tracks()); + YGNodeStyleSetGridTemplateRows(root, createFixed3x100Tracks()); + + for (uint32_t i = 0; i < 9; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 2: Grid with auto-sized items + YGBENCHMARK("Grid 3x3 auto tracks", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetGridTemplateColumns(root, createAuto3Tracks()); + YGNodeStyleSetGridTemplateRows(root, createAuto3Tracks()); + + for (uint32_t i = 0; i < 9; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeSetMeasureFunc(child, _measureFixed); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 3: Grid with fr units + YGBENCHMARK("Grid 3x3 fr tracks", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 300); + YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetGridTemplateColumns(root, createFr3Tracks()); + YGNodeStyleSetGridTemplateRows(root, createFr3Tracks()); + + for (uint32_t i = 0; i < 9; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 4: Grid with gaps + YGBENCHMARK("Grid 4x4 with gaps", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetHeight(root, 400); + YGNodeStyleSetGap(root, YGGutterAll, 10); + YGNodeStyleSetGridTemplateColumns(root, createFr4Tracks()); + YGNodeStyleSetGridTemplateRows(root, createFr4Tracks()); + + for (uint32_t i = 0; i < 16; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 5: Mixed fixed and flexible tracks + YGBENCHMARK("Grid mixed tracks (fixed + fr)", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 800); + YGNodeStyleSetHeight(root, 600); + YGNodeStyleSetGridTemplateColumns(root, createMixedColumnTracks()); + YGNodeStyleSetGridTemplateRows(root, createMixedRowTracks()); + + for (uint32_t i = 0; i < 9; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 6: Grid with spanning items + YGBENCHMARK("Grid with spanning items", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetHeight(root, 400); + YGNodeStyleSetGap(root, YGGutterAll, 8); + YGNodeStyleSetGridTemplateColumns(root, createFr4Tracks()); + YGNodeStyleSetGridTemplateRows(root, createFr4Tracks()); + + YGNodeRef child1 = YGNodeNew(); + YGNodeStyleSetGridColumnStart(child1, 1); + YGNodeStyleSetGridColumnEndSpan(child1, 2); + YGNodeInsertChild(root, child1, 0); + + YGNodeRef child2 = YGNodeNew(); + YGNodeStyleSetGridRowStart(child2, 1); + YGNodeStyleSetGridRowEndSpan(child2, 2); + YGNodeInsertChild(root, child2, 1); + + YGNodeRef child3 = YGNodeNew(); + YGNodeStyleSetGridColumnStart(child3, 3); + YGNodeStyleSetGridColumnEndSpan(child3, 2); + YGNodeStyleSetGridRowStart(child3, 3); + YGNodeStyleSetGridRowEndSpan(child3, 2); + YGNodeInsertChild(root, child3, 2); + + for (uint32_t i = 0; i < 8; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeInsertChild(root, child, 3 + i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 7: Auto-placement + YGBENCHMARK("Grid auto-placement 5x5", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 500); + YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetGridTemplateColumns(root, createFr5Tracks()); + YGNodeStyleSetGridTemplateRows(root, createFr5Tracks()); + + for (uint32_t i = 0; i < 25; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 8: Nested grids + YGBENCHMARK("Nested grids 3x3 with 2x2 children", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 600); + YGNodeStyleSetHeight(root, 600); + YGNodeStyleSetGap(root, YGGutterAll, 10); + YGNodeStyleSetGridTemplateColumns(root, createFr3Tracks()); + YGNodeStyleSetGridTemplateRows(root, createFr3Tracks()); + + for (uint32_t i = 0; i < 9; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeStyleSetDisplay(child, YGDisplayGrid); + YGNodeStyleSetGap(child, YGGutterAll, 4); + YGNodeStyleSetGridTemplateColumns(child, createFr2Tracks()); + YGNodeStyleSetGridTemplateRows(child, createFr2Tracks()); + YGNodeInsertChild(root, child, i); + + for (uint32_t j = 0; j < 4; j++) { + YGNodeRef grandChild = YGNodeNew(); + YGNodeInsertChild(child, grandChild, j); + } + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 9: Grid with alignment + YGBENCHMARK("Grid with alignment", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetHeight(root, 400); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetAlignContent(root, YGAlignCenter); + YGNodeStyleSetGap(root, YGGutterAll, 10); + YGNodeStyleSetGridTemplateColumns(root, createFixed3x80Tracks()); + YGNodeStyleSetGridTemplateRows(root, createFixed3x80Tracks()); + + for (uint32_t i = 0; i < 9; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeStyleSetAlignSelf(child, YGAlignCenter); + YGNodeStyleSetWidth(child, 60); + YGNodeStyleSetHeight(child, 60); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 10: Grid with intrinsic sizing and measure functions + YGBENCHMARK("Grid auto tracks with measure", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetGridTemplateColumns(root, createAuto4Tracks()); + YGNodeStyleSetGridTemplateRows(root, createAuto4Tracks()); + + for (uint32_t i = 0; i < 16; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeSetMeasureFunc(child, _measure); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 11: minmax tracks + YGBENCHMARK("Grid minmax tracks", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 600); + YGNodeStyleSetHeight(root, 400); + YGNodeStyleSetGap(root, YGGutterAll, 10); + YGNodeStyleSetGridTemplateColumns(root, createMinmaxColumnTracks()); + YGNodeStyleSetGridTemplateRows(root, createMinmaxRowTracks()); + + for (uint32_t i = 0; i < 9; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeSetMeasureFunc(child, _measureFixed); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 12: Indefinite container size + YGBENCHMARK("Grid indefinite container", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetGridTemplateColumns(root, createAuto3Tracks()); + YGNodeStyleSetGridTemplateRows(root, createAuto2Tracks()); + + for (uint32_t i = 0; i < 6; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeStyleSetWidth(child, 80); + YGNodeStyleSetHeight(child, 60); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 13: Grid with percentage tracks + YGBENCHMARK("Grid percentage tracks", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetGridTemplateColumns(root, createPercent3Tracks()); + YGNodeStyleSetGridTemplateRows(root, createPercent3RowTracks()); + + for (uint32_t i = 0; i < 9; i++) { + YGNodeRef child = YGNodeNew(); + YGNodeInsertChild(root, child, i); + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); + + // Scenario 14: Stress test - 1000 items with mixed tracks and spanning + YGBENCHMARK("Stress test 1000 items mixed", { + YGNodeRef root = YGNodeNew(); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 2000); + YGNodeStyleSetHeight(root, 5000); + YGNodeStyleSetGap(root, YGGutterColumn, 8); + YGNodeStyleSetGap(root, YGGutterRow, 4); + YGNodeStyleSetGridTemplateColumns(root, createMixed20ColumnTracks()); + YGNodeStyleSetGridTemplateRows(root, createMixed50RowTracks()); + + uint32_t childIndex = 0; + + for (uint32_t row = 1; row <= 50; row++) { + for (uint32_t col = 1; col <= 20; col++) { + YGNodeRef child = YGNodeNew(); + + if (childIndex % 30 == 0 && col <= 17) { + YGNodeStyleSetGridColumnStart(child, (int)col); + YGNodeStyleSetGridColumnEndSpan(child, 3); + YGNodeStyleSetGridRowStart(child, (int)row); + } else if (childIndex % 40 == 0 && col <= 16) { + YGNodeStyleSetGridColumnStart(child, (int)col); + YGNodeStyleSetGridColumnEndSpan(child, 4); + YGNodeStyleSetGridRowStart(child, (int)row); + } else if (childIndex % 50 == 0 && row <= 48) { + YGNodeStyleSetGridColumnStart(child, (int)col); + YGNodeStyleSetGridRowStart(child, (int)row); + YGNodeStyleSetGridRowEndSpan(child, 2); + } else if (childIndex % 70 == 0 && row <= 47) { + YGNodeStyleSetGridColumnStart(child, (int)col); + YGNodeStyleSetGridRowStart(child, (int)row); + YGNodeStyleSetGridRowEndSpan(child, 3); + } else if (childIndex % 100 == 0 && col <= 18 && row <= 48) { + YGNodeStyleSetGridColumnStart(child, (int)col); + YGNodeStyleSetGridColumnEndSpan(child, 2); + YGNodeStyleSetGridRowStart(child, (int)row); + YGNodeStyleSetGridRowEndSpan(child, 2); + } else if (childIndex % 150 == 0 && col <= 17 && row <= 48) { + YGNodeStyleSetGridColumnStart(child, (int)col); + YGNodeStyleSetGridColumnEndSpan(child, 3); + YGNodeStyleSetGridRowStart(child, (int)row); + YGNodeStyleSetGridRowEndSpan(child, 2); + } else if (childIndex % 200 == 0 && col <= 18 && row <= 47) { + YGNodeStyleSetGridColumnStart(child, (int)col); + YGNodeStyleSetGridColumnEndSpan(child, 2); + YGNodeStyleSetGridRowStart(child, (int)row); + YGNodeStyleSetGridRowEndSpan(child, 3); + } else if (childIndex % 300 == 0 && col <= 16 && row <= 47) { + YGNodeStyleSetGridColumnStart(child, (int)col); + YGNodeStyleSetGridColumnEndSpan(child, 4); + YGNodeStyleSetGridRowStart(child, (int)row); + YGNodeStyleSetGridRowEndSpan(child, 3); + } else if (childIndex % 500 == 0 && col <= 15 && row <= 46) { + YGNodeStyleSetGridColumnStart(child, (int)col); + YGNodeStyleSetGridColumnEndSpan(child, 5); + YGNodeStyleSetGridRowStart(child, (int)row); + YGNodeStyleSetGridRowEndSpan(child, 4); + } + + YGNodeInsertChild(root, child, childIndex); + childIndex++; + + if (childIndex >= 1000) + break; + } + if (childIndex >= 1000) + break; + } + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + YGNodeFreeRecursive(root); + }); +}); diff --git a/benchmark/benchmarkgrid b/benchmark/benchmarkgrid new file mode 100755 index 0000000000..7bc73b4c7b --- /dev/null +++ b/benchmark/benchmarkgrid @@ -0,0 +1,10 @@ +#!/bin/sh +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. +cd "$(dirname "$0")" || exit + +cmake -B build -S . -D CMAKE_BUILD_TYPE=Release +cmake --build build --target benchmarkgrid +build/benchmarkgrid diff --git a/enums.py b/enums.py index d43dd6c147..2c53672a2e 100755 --- a/enums.py +++ b/enums.py @@ -19,12 +19,16 @@ ], "FlexDirection": ["Column", "ColumnReverse", "Row", "RowReverse"], "Justify": [ + "Auto", "FlexStart", "Center", "FlexEnd", "SpaceBetween", "SpaceAround", "SpaceEvenly", + "Stretch", + "Start", + "End", ], "Overflow": ["Visible", "Hidden", "Scroll"], "Align": [ @@ -37,9 +41,11 @@ "SpaceBetween", "SpaceAround", "SpaceEvenly", + "Start", + "End", ], "PositionType": ["Static", "Relative", "Absolute"], - "Display": ["Flex", "None", "Contents"], + "Display": ["Flex", "None", "Contents", "Grid"], "Wrap": ["NoWrap", "Wrap", "WrapReverse"], "BoxSizing": ["BorderBox", "ContentBox"], "MeasureMode": ["Undefined", "Exactly", "AtMost"], @@ -62,6 +68,7 @@ "WebFlexBasis", ], "Gutter": ["Column", "Row", "All"], + "GridTrackType": ["Auto", "Points", "Percent", "Fr", "Minmax"], # Known incorrect behavior which can be enabled for compatibility "Errata": [ # Default: Standards conformant mode diff --git a/gentest/fixtures/YGAbsolutePositionTest.html b/gentest/fixtures/YGAbsolutePositionTest.html index c2573995e2..07ad4293a2 100644 --- a/gentest/fixtures/YGAbsolutePositionTest.html +++ b/gentest/fixtures/YGAbsolutePositionTest.html @@ -1,5 +1,5 @@
-
+
@@ -15,20 +15,20 @@
-
+
-
+
-
+
-
+
diff --git a/gentest/fixtures/YGAndroidNewsFeed.html b/gentest/fixtures/YGAndroidNewsFeed.html index 1c9d60d107..74355c30ee 100644 --- a/gentest/fixtures/YGAndroidNewsFeed.html +++ b/gentest/fixtures/YGAndroidNewsFeed.html @@ -2,7 +2,7 @@
-
+
@@ -13,7 +13,7 @@
-
+
diff --git a/gentest/fixtures/YGBorderTest.html b/gentest/fixtures/YGBorderTest.html index 9a65dc168b..3f64af6d88 100644 --- a/gentest/fixtures/YGBorderTest.html +++ b/gentest/fixtures/YGBorderTest.html @@ -13,6 +13,6 @@
-
+
diff --git a/gentest/fixtures/YGBoxSizingTest.html b/gentest/fixtures/YGBoxSizingTest.html index b8fa7a1037..ddf1ed11f8 100644 --- a/gentest/fixtures/YGBoxSizingTest.html +++ b/gentest/fixtures/YGBoxSizingTest.html @@ -220,33 +220,33 @@
+ style="width: 100px; height: 100px; padding-inline-start: 5px; box-sizing: content-box">
+ style="width: 100px; height: 100px; padding-inline-start: 5px; box-sizing: border-box">
+ style="width: 100px; height: 100px; padding-inline-end: 5px; box-sizing: content-box">
+ style="width: 100px; height: 100px; padding-inline-end: 5px; box-sizing: border-box">
+ style="width: 100px; height: 100px; border-inline-start-width: 5px; box-sizing: content-box">
+ style="width: 100px; height: 100px; border-inline-start-width: 5px; box-sizing: border-box">
+ style="width: 100px; height: 100px; border-inline-end-width: 5px; box-sizing: content-box">
+ style="width: 100px; height: 100px; border-inline-end-width: 5px; box-sizing: border-box">
diff --git a/gentest/fixtures/YGFlexDirectionTest.html b/gentest/fixtures/YGFlexDirectionTest.html index 14e7e3ef1d..3157f64842 100644 --- a/gentest/fixtures/YGFlexDirectionTest.html +++ b/gentest/fixtures/YGFlexDirectionTest.html @@ -41,9 +41,9 @@
- +
+ style="height: 100px; width: 100px; flex-direction: row-reverse; margin-inline-start: 100px;">
@@ -57,7 +57,7 @@
+ style="height: 100px; width: 100px; flex-direction: row-reverse; margin-inline-end: 100px;">
@@ -85,7 +85,7 @@
+ style="height: 100px; width: 100px; flex-direction: row-reverse; padding-inline-start: 100px;">
@@ -99,7 +99,7 @@
+ style="height: 100px; width: 100px; flex-direction: row-reverse; padding-inline-end: 100px;">
@@ -127,7 +127,7 @@
+ style="height: 100px; width: 100px; flex-direction: row-reverse; border-inline-start-width: 100px;">
@@ -141,7 +141,7 @@
+ style="height: 100px; width: 100px; flex-direction: row-reverse; border-inline-end-width: 100px;">
@@ -170,7 +170,7 @@
-
+
@@ -186,7 +186,7 @@
-
+
@@ -243,7 +243,7 @@
-
+
@@ -251,7 +251,7 @@
-
+
@@ -291,7 +291,7 @@
-
+
@@ -299,7 +299,7 @@
-
+
@@ -339,7 +339,7 @@
-
+
@@ -347,7 +347,7 @@
-
+
@@ -387,7 +387,7 @@
-
+
@@ -395,7 +395,7 @@
-
+
diff --git a/gentest/fixtures/YGFlexWrapTest.html b/gentest/fixtures/YGFlexWrapTest.html index ffb7036848..c736255737 100644 --- a/gentest/fixtures/YGFlexWrapTest.html +++ b/gentest/fixtures/YGFlexWrapTest.html @@ -1,4 +1,4 @@ -
+
diff --git a/gentest/fixtures/YGMarginTest.html b/gentest/fixtures/YGMarginTest.html index 01a13afe79..161b7ff618 100644 --- a/gentest/fixtures/YGMarginTest.html +++ b/gentest/fixtures/YGMarginTest.html @@ -1,5 +1,5 @@
-
+
@@ -7,7 +7,7 @@
-
+
@@ -15,7 +15,7 @@
-
+
@@ -27,11 +27,11 @@
-
+
-
+
@@ -83,12 +83,12 @@
-
+
-
+
diff --git a/gentest/fixtures/YGPaddingTest.html b/gentest/fixtures/YGPaddingTest.html index ef5b553992..062cd6e1b8 100644 --- a/gentest/fixtures/YGPaddingTest.html +++ b/gentest/fixtures/YGPaddingTest.html @@ -14,7 +14,7 @@
+ style="width: 100px; height: 100px; padding-inline-start: 10px; padding-top: 10; padding-inline-end: 20px; padding-bottom: 20px; align-items: center; justify-content: center;">
@@ -24,6 +24,6 @@
+ style="width: 200px; height: 200px; padding-left: 20px; padding-inline-end: 50px;">
diff --git a/gentest/fixtures/YGStaticPositionTest.html b/gentest/fixtures/YGStaticPositionTest.html index 41887bf6c8..0395b4e7e1 100644 --- a/gentest/fixtures/YGStaticPositionTest.html +++ b/gentest/fixtures/YGStaticPositionTest.html @@ -432,7 +432,7 @@
+ style="height: 63%; width: 41%; position: absolute; inset-inline-start: 12px; margin: 12px 4px 7px 9px; border-width: 1px 5px 9px 2px; padding: 3px 8px 10px 5px">
@@ -444,7 +444,7 @@
+ style="height: 63%; width: 41%; position: absolute; inset-inline-end: 4px; margin: 12px 4px 7px 9px; border-width: 1px 5px 9px 2px; padding: 3px 8px 10px 5px">
diff --git a/gentest/gentest-cpp.js b/gentest/gentest-cpp.js deleted file mode 100644 index d063080491..0000000000 --- a/gentest/gentest-cpp.js +++ /dev/null @@ -1,512 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/* global Emitter:readable */ - -function toValueCpp(value) { - const n = value.toString().replace('px', '').replace('%', ''); - return n + (Number(n) == n && n % 1 !== 0 ? 'f' : ''); -} - -function toFunctionNameCpp(value) { - if (value.indexOf('%') >= 0) { - return 'Percent'; - } else if (value.indexOf('Auto') >= 0) { - return 'Auto'; - } else if (value.indexOf('MaxContent') >= 0) { - return 'MaxContent'; - } else if (value.indexOf('FitContent') >= 0) { - return 'FitContent'; - } else if (value.indexOf('Stretch') >= 0) { - return 'Stretch'; - } - - return ''; -} - -function keywordFunctionCpp(functionPrefix, nodeName, value) { - const functionSuffix = toFunctionNameCpp(value); - if ( - functionSuffix == 'Auto' || - functionSuffix == 'MaxContent' || - functionSuffix == 'FitContent' || - functionSuffix == 'Stretch' - ) { - return functionPrefix + functionSuffix + '(' + nodeName + ');'; - } else { - return ( - functionPrefix + - functionSuffix + - '(' + - nodeName + - ', ' + - toValueCpp(value) + - ');' - ); - } -} - -const CPPEmitter = function () { - Emitter.call(this, 'cpp', ' '); -}; - -CPPEmitter.prototype = Object.create(Emitter.prototype, { - constructor: {value: CPPEmitter}, - - emitPrologue: { - value: function () { - this.push([ - '#include ', - '#include ', - '#include "../util/TestUtil.h"', - '', - ]); - }, - }, - - emitTestPrologue: { - value: function (name, experiments, disabled) { - this.push('TEST(YogaTest, ' + name + ') {'); - this.pushIndent(); - - if (disabled) { - this.push('GTEST_SKIP();'); - this.push(''); - } - - this.push('YGConfigRef config = YGConfigNew();'); - for (const i in experiments) { - this.push( - 'YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeature' + - experiments[i] + - ', true);', - ); - } - this.push(''); - }, - }, - - emitTestTreePrologue: { - value: function (nodeName) { - this.push('YGNodeRef ' + nodeName + ' = YGNodeNewWithConfig(config);'); - }, - }, - - emitTestEpilogue: { - value: function (_experiments) { - this.push(['', 'YGNodeFreeRecursive(root);']); - - this.push(''); - this.push('YGConfigFree(config);'); - - this.popIndent(); - this.push(['}', '']); - }, - }, - - emitEpilogue: {value: function () {}}, - - AssertEQ: { - value: function (v0, v1) { - this.push('ASSERT_FLOAT_EQ(' + toValueCpp(v0) + ', ' + v1 + ');'); - }, - }, - - YGAlignAuto: {value: 'YGAlignAuto'}, - YGAlignCenter: {value: 'YGAlignCenter'}, - YGAlignFlexEnd: {value: 'YGAlignFlexEnd'}, - YGAlignFlexStart: {value: 'YGAlignFlexStart'}, - YGAlignStretch: {value: 'YGAlignStretch'}, - YGAlignSpaceBetween: {value: 'YGAlignSpaceBetween'}, - YGAlignSpaceAround: {value: 'YGAlignSpaceAround'}, - YGAlignSpaceEvenly: {value: 'YGAlignSpaceEvenly'}, - YGAlignBaseline: {value: 'YGAlignBaseline'}, - - YGDirectionInherit: {value: 'YGDirectionInherit'}, - YGDirectionLTR: {value: 'YGDirectionLTR'}, - YGDirectionRTL: {value: 'YGDirectionRTL'}, - - YGEdgeBottom: {value: 'YGEdgeBottom'}, - YGEdgeEnd: {value: 'YGEdgeEnd'}, - YGEdgeLeft: {value: 'YGEdgeLeft'}, - YGEdgeRight: {value: 'YGEdgeRight'}, - YGEdgeStart: {value: 'YGEdgeStart'}, - YGEdgeTop: {value: 'YGEdgeTop'}, - - YGGutterAll: {value: 'YGGutterAll'}, - YGGutterColumn: {value: 'YGGutterColumn'}, - YGGutterRow: {value: 'YGGutterRow'}, - - YGFlexDirectionColumn: {value: 'YGFlexDirectionColumn'}, - YGFlexDirectionColumnReverse: {value: 'YGFlexDirectionColumnReverse'}, - YGFlexDirectionRow: {value: 'YGFlexDirectionRow'}, - YGFlexDirectionRowReverse: {value: 'YGFlexDirectionRowReverse'}, - - YGJustifyCenter: {value: 'YGJustifyCenter'}, - YGJustifyFlexEnd: {value: 'YGJustifyFlexEnd'}, - YGJustifyFlexStart: {value: 'YGJustifyFlexStart'}, - YGJustifySpaceAround: {value: 'YGJustifySpaceAround'}, - YGJustifySpaceBetween: {value: 'YGJustifySpaceBetween'}, - YGJustifySpaceEvenly: {value: 'YGJustifySpaceEvenly'}, - - YGOverflowHidden: {value: 'YGOverflowHidden'}, - YGOverflowVisible: {value: 'YGOverflowVisible'}, - YGOverflowScroll: {value: 'YGOverflowScroll'}, - - YGPositionTypeAbsolute: {value: 'YGPositionTypeAbsolute'}, - YGPositionTypeRelative: {value: 'YGPositionTypeRelative'}, - YGPositionTypeStatic: {value: 'YGPositionTypeStatic'}, - - YGWrapNoWrap: {value: 'YGWrapNoWrap'}, - YGWrapWrap: {value: 'YGWrapWrap'}, - YGWrapWrapReverse: {value: 'YGWrapWrapReverse'}, - - YGBoxSizingBorderBox: {value: 'YGBoxSizingBorderBox'}, - YGBoxSizingContentBox: {value: 'YGBoxSizingContentBox'}, - - YGUndefined: {value: 'YGUndefined'}, - - YGDisplayFlex: {value: 'YGDisplayFlex'}, - YGDisplayNone: {value: 'YGDisplayNone'}, - YGDisplayContents: {value: 'YGDisplayContents'}, - YGAuto: {value: 'YGAuto'}, - - YGMaxContent: {value: 'MaxContent'}, - YGFitContent: {value: 'FitContent'}, - YGStretch: {value: 'Stretch'}, - - YGNodeCalculateLayout: { - value: function (node, dir, _experiments) { - this.push( - 'YGNodeCalculateLayout(' + - node + - ', YGUndefined, YGUndefined, ' + - dir + - ');', - ); - }, - }, - - YGNodeInsertChild: { - value: function (parentName, nodeName, index) { - this.push( - 'YGNodeInsertChild(' + - parentName + - ', ' + - nodeName + - ', ' + - index + - ');', - ); - }, - }, - - YGNodeLayoutGetLeft: { - value: function (nodeName) { - return 'YGNodeLayoutGetLeft(' + nodeName + ')'; - }, - }, - - YGNodeLayoutGetTop: { - value: function (nodeName) { - return 'YGNodeLayoutGetTop(' + nodeName + ')'; - }, - }, - - YGNodeLayoutGetWidth: { - value: function (nodeName) { - return 'YGNodeLayoutGetWidth(' + nodeName + ')'; - }, - }, - - YGNodeLayoutGetHeight: { - value: function (nodeName) { - return 'YGNodeLayoutGetHeight(' + nodeName + ')'; - }, - }, - - YGNodeStyleSetAlignContent: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetAlignContent(' + - nodeName + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetAlignItems: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetAlignItems(' + - nodeName + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetAlignSelf: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetAlignSelf(' + nodeName + ', ' + toValueCpp(value) + ');', - ); - }, - }, - - YGNodeStyleSetAspectRatio: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetAspectRatio' + - toFunctionNameCpp(value) + - '(' + - nodeName + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetBorder: { - value: function (nodeName, edge, value) { - this.push( - 'YGNodeStyleSetBorder(' + - nodeName + - ', ' + - edge + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetDirection: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetDirection(' + nodeName + ', ' + toValueCpp(value) + ');', - ); - }, - }, - - YGNodeStyleSetDisplay: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetDisplay(' + nodeName + ', ' + toValueCpp(value) + ');', - ); - }, - }, - - YGNodeStyleSetFlexBasis: { - value: function (nodeName, value) { - this.push(keywordFunctionCpp('YGNodeStyleSetFlexBasis', nodeName, value)); - }, - }, - - YGNodeStyleSetFlexDirection: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetFlexDirection(' + - nodeName + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetFlexGrow: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetFlexGrow(' + nodeName + ', ' + toValueCpp(value) + ');', - ); - }, - }, - - YGNodeStyleSetFlexShrink: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetFlexShrink(' + - nodeName + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetFlexWrap: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetFlexWrap(' + nodeName + ', ' + toValueCpp(value) + ');', - ); - }, - }, - - YGNodeStyleSetJustifyContent: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetJustifyContent(' + - nodeName + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetMargin: { - value: function (nodeName, edge, value) { - let valueStr = toValueCpp(value); - if (valueStr != 'YGAuto') { - valueStr = ', ' + valueStr; - } else { - valueStr = ''; - } - this.push( - 'YGNodeStyleSetMargin' + - toFunctionNameCpp(value) + - '(' + - nodeName + - ', ' + - edge + - valueStr + - ');', - ); - }, - }, - - YGNodeStyleSetHeight: { - value: function (nodeName, value) { - this.push(keywordFunctionCpp('YGNodeStyleSetHeight', nodeName, value)); - }, - }, - - YGNodeStyleSetWidth: { - value: function (nodeName, value) { - this.push(keywordFunctionCpp('YGNodeStyleSetWidth', nodeName, value)); - }, - }, - - YGNodeStyleSetMaxHeight: { - value: function (nodeName, value) { - this.push(keywordFunctionCpp('YGNodeStyleSetMaxHeight', nodeName, value)); - }, - }, - - YGNodeStyleSetMaxWidth: { - value: function (nodeName, value) { - this.push(keywordFunctionCpp('YGNodeStyleSetMaxWidth', nodeName, value)); - }, - }, - - YGNodeStyleSetMinHeight: { - value: function (nodeName, value) { - this.push(keywordFunctionCpp('YGNodeStyleSetMinHeight', nodeName, value)); - }, - }, - - YGNodeStyleSetMinWidth: { - value: function (nodeName, value) { - this.push(keywordFunctionCpp('YGNodeStyleSetMinWidth', nodeName, value)); - }, - }, - - YGNodeStyleSetOverflow: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetOverflow(' + nodeName + ', ' + toValueCpp(value) + ');', - ); - }, - }, - - YGNodeStyleSetPadding: { - value: function (nodeName, edge, value) { - this.push( - 'YGNodeStyleSetPadding' + - toFunctionNameCpp(value) + - '(' + - nodeName + - ', ' + - edge + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetPosition: { - value: function (nodeName, edge, value) { - let valueStr = toValueCpp(value); - if (valueStr != 'YGAuto') { - valueStr = ', ' + valueStr; - } else { - valueStr = ''; - } - this.push( - 'YGNodeStyleSetPosition' + - toFunctionNameCpp(value) + - '(' + - nodeName + - ', ' + - edge + - valueStr + - ');', - ); - }, - }, - - YGNodeStyleSetPositionType: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetPositionType(' + - nodeName + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetGap: { - value: function (nodeName, gap, value) { - this.push( - 'YGNodeStyleSetGap' + - toFunctionNameCpp(value) + - '(' + - nodeName + - ', ' + - gap + - ', ' + - toValueCpp(value) + - ');', - ); - }, - }, - - YGNodeStyleSetBoxSizing: { - value: function (nodeName, value) { - this.push( - 'YGNodeStyleSetBoxSizing(' + nodeName + ', ' + toValueCpp(value) + ');', - ); - }, - }, - - YGNodeSetMeasureFunc: { - value: function (nodeName, innerText, _) { - this.push(`YGNodeSetContext(${nodeName}, (void*)"${innerText}");`); - this.push( - `YGNodeSetMeasureFunc(${nodeName}, &facebook::yoga::test::IntrinsicSizeMeasure);`, - ); - }, - }, -}); diff --git a/gentest/gentest-driver.ts b/gentest/gentest-driver.ts deleted file mode 100644 index a0acd6e642..0000000000 --- a/gentest/gentest-driver.ts +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import * as fs from 'node:fs/promises'; -import {format} from 'node:util'; -import {parse, dirname} from 'path'; -import * as process from 'node:process'; -import {Builder, logging} from 'selenium-webdriver'; -import {Options} from 'selenium-webdriver/chrome.js'; -import {fileURLToPath} from 'url'; -import {stdin, stdout} from 'node:process'; -import minimist from 'minimist'; -import readline from 'node:readline/promises'; -import signedsource from 'signedsource'; - -function addSignatureToSourceCode(sourceCode: string): string { - const codeWithToken = sourceCode.replace( - 'MAGIC_PLACEHOLDER', - signedsource.getSigningToken(), - ); - - return signedsource.signFile(codeWithToken); -} - -const argv = minimist(process.argv.slice(2)); -const specificFixture = argv.f || argv.fixture; -const suspend = argv.s || argv.suspend; -const headless = argv.h || argv.headless; - -const gentestDir = dirname(fileURLToPath(import.meta.url)); -const yogaDir = dirname(gentestDir); - -let fixtures = await fs.readdir(`${gentestDir}/fixtures`); -try { - if (specificFixture != null) { - await fs.access(`fixtures/${specificFixture}.html`, fs.constants.F_OK); - fixtures = [specificFixture + '.html']; - } -} catch (e) { - const errorMessage = e instanceof Error ? e.message : ''; - console.log( - `Trying to access ${specificFixture}.html threw an exception. Executing against all fixtures. ${errorMessage}`, - ); -} - -const options = new Options(); -options.addArguments( - '--force-device-scale-factor=1', - '--window-position=0,0', - '--hide-scrollbars', -); -headless && options.addArguments('--headless'); -options.setLoggingPrefs({ - browser: 'ALL', - performance: 'ALL', -}); -const driver = await new Builder() - .forBrowser('chrome') - .setChromeOptions(options) - .build(); - -for (const fileName of fixtures) { - const fixture = await fs.readFile( - `${gentestDir}/fixtures/${fileName}`, - 'utf8', - ); - const fileNameNoExtension = parse(fileName).name; - console.log('Generate', fileNameNoExtension); - - // TODO: replace this with something more robust than just blindly replacing - // start/end in the entire fixture - const ltrFixture = fixture - .replaceAll('start', 'left') - .replaceAll('end', 'right') - .replaceAll('flex-left', 'flex-start') - .replaceAll('flex-right', 'flex-end'); - - const rtlFixture = fixture - .replaceAll('start', 'right') - .replaceAll('end', 'left') - .replaceAll('flex-right', 'flex-start') - .replaceAll('flex-left', 'flex-end'); - - const template = await fs.readFile( - `${gentestDir}/test-template.html`, - 'utf8', - ); - const f = await fs.open(`${gentestDir}/test.html`, 'w'); - await f.write( - format(template, fileNameNoExtension, ltrFixture, rtlFixture, fixture), - ); - await f.close(); - - await driver.get('file://' + process.cwd() + '/test.html'); - const logs = await driver.manage().logs().get(logging.Type.BROWSER); - - const testLogs = logs.filter( - log => !log.message.replace(/^[^"]*/, '').startsWith('"gentest-log:'), - ); - - await fs.writeFile( - `${yogaDir}/tests/generated/${fileNameNoExtension}.cpp`, - addSignatureToSourceCode( - JSON.parse(testLogs[0].message.replace(/^[^"]*/, '')), - ), - ); - - await fs.writeFile( - `${yogaDir}/java/tests/generated/com/facebook/yoga/${fileNameNoExtension}.java`, - addSignatureToSourceCode( - JSON.parse(testLogs[1].message.replace(/^[^"]*/, '')).replace( - 'YogaTest', - fileNameNoExtension, - ), - ), - ); - - await fs.writeFile( - `${yogaDir}/javascript/tests/generated/${fileNameNoExtension}.test.ts`, - addSignatureToSourceCode( - JSON.parse(testLogs[2].message.replace(/^[^"]*/, '')).replace( - 'YogaTest', - fileNameNoExtension, - ), - ), - ); - - if (suspend) { - const rl = readline.createInterface({input: stdin, output: stdout}); - await rl.question(''); - rl.close(); - } -} -await fs.unlink(`${gentestDir}/test.html`); -await driver.quit(); diff --git a/gentest/gentest-java.js b/gentest/gentest-java.js deleted file mode 100644 index f1efcf40e7..0000000000 --- a/gentest/gentest-java.js +++ /dev/null @@ -1,477 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/* global Emitter:readable */ - -function toValueJava(value) { - const n = value.toString().replace('px', '').replace('%', ''); - return n + (Number(n) == n && n % 1 !== 0 ? '' : ''); -} - -function toMethodName(value) { - if (value.indexOf('%') >= 0) { - return 'Percent'; - } else if (value.indexOf('AUTO') >= 0) { - return 'Auto'; - } else if (value.indexOf('MAX_CONTENT') >= 0) { - return 'MaxContent'; - } else if (value.indexOf('FIT_CONTENT') >= 0) { - return 'FitContent'; - } else if (value.indexOf('STRETCH') >= 0) { - return 'Stretch'; - } - return ''; -} - -function keywordMethod(methodPrefix, nodeName, value) { - const methodSuffix = toMethodName(value); - if ( - methodSuffix == 'Auto' || - methodSuffix == 'MaxContent' || - methodSuffix == 'FitContent' || - methodSuffix == 'Stretch' - ) { - return nodeName + '.' + methodPrefix + methodSuffix + '();'; - } else { - return ( - nodeName + - '.' + - methodPrefix + - methodSuffix + - '(' + - toValueJava(value) + - 'f);' - ); - } -} - -const JavaEmitter = function () { - Emitter.call(this, 'java', ' '); -}; - -function toJavaUpper(symbol) { - let out = ''; - for (let i = 0; i < symbol.length; i++) { - const c = symbol[i]; - if ( - c == c.toUpperCase() && - i != 0 && - symbol[i - 1] != symbol[i - 1].toUpperCase() - ) { - out += '_'; - } - out += c.toUpperCase(); - } - return out; -} - -JavaEmitter.prototype = Object.create(Emitter.prototype, { - constructor: {value: JavaEmitter}, - - emitPrologue: { - value: function () { - this.push([ - 'package com.facebook.yoga;', - '', - 'import static org.junit.Assert.assertEquals;', - '', - 'import org.junit.Ignore;', - 'import org.junit.Test;', - 'import org.junit.runner.RunWith;', - 'import org.junit.runners.Parameterized;', - 'import com.facebook.yoga.utils.TestUtils;', - '', - '@RunWith(Parameterized.class)', - 'public class YogaTest {', - ]); - this.pushIndent(); - this.push([ - '@Parameterized.Parameters(name = "{0}")', - 'public static Iterable nodeFactories() {', - ]); - this.pushIndent(); - this.push('return TestParametrization.nodeFactories();'); - this.popIndent(); - this.push('}'); - this.push([ - '', - '@Parameterized.Parameter public TestParametrization.NodeFactory mNodeFactory;', - '', - ]); - }, - }, - - emitTestPrologue: { - value: function (name, experiments, disabled) { - this.push('@Test'); - if (disabled) { - this.push('@Ignore'); - } - this.push('public void test_' + name + '() {'); - this.pushIndent(); - - this.push('YogaConfig config = YogaConfigFactory.create();'); - for (const i in experiments) { - this.push( - 'config.setExperimentalFeatureEnabled(YogaExperimentalFeature.' + - toJavaUpper(experiments[i]) + - ', true);', - ); - } - this.push(''); - }, - }, - - emitTestTreePrologue: { - value: function (nodeName) { - this.push('final YogaNode ' + nodeName + ' = createNode(config);'); - }, - }, - - emitTestEpilogue: { - value: function (_experiments) { - this.popIndent(); - this.push(['}', '']); - }, - }, - - emitEpilogue: { - value: function (_lines) { - this.push('private YogaNode createNode(YogaConfig config) {'); - this.pushIndent(); - this.push('return mNodeFactory.create(config);'); - this.popIndent(); - this.push('}'); - this.popIndent(); - this.push(['}', '']); - }, - }, - - AssertEQ: { - value: function (v0, v1) { - this.push('assertEquals(' + v0 + 'f, ' + v1 + ', 0.0f);'); - }, - }, - - YGAlignAuto: {value: 'YogaAlign.AUTO'}, - YGAlignCenter: {value: 'YogaAlign.CENTER'}, - YGAlignFlexEnd: {value: 'YogaAlign.FLEX_END'}, - YGAlignFlexStart: {value: 'YogaAlign.FLEX_START'}, - YGAlignStretch: {value: 'YogaAlign.STRETCH'}, - YGAlignSpaceBetween: {value: 'YogaAlign.SPACE_BETWEEN'}, - YGAlignSpaceAround: {value: 'YogaAlign.SPACE_AROUND'}, - YGAlignSpaceEvenly: {value: 'YogaAlign.SPACE_EVENLY'}, - YGAlignBaseline: {value: 'YogaAlign.BASELINE'}, - - YGDirectionInherit: {value: 'YogaDirection.INHERIT'}, - YGDirectionLTR: {value: 'YogaDirection.LTR'}, - YGDirectionRTL: {value: 'YogaDirection.RTL'}, - - YGEdgeBottom: {value: 'YogaEdge.BOTTOM'}, - YGEdgeEnd: {value: 'YogaEdge.END'}, - YGEdgeLeft: {value: 'YogaEdge.LEFT'}, - YGEdgeRight: {value: 'YogaEdge.RIGHT'}, - YGEdgeStart: {value: 'YogaEdge.START'}, - YGEdgeTop: {value: 'YogaEdge.TOP'}, - - YGGutterAll: {value: 'YogaGutter.ALL'}, - YGGutterColumn: {value: 'YogaGutter.COLUMN'}, - YGGutterRow: {value: 'YogaGutter.ROW'}, - - YGFlexDirectionColumn: {value: 'YogaFlexDirection.COLUMN'}, - YGFlexDirectionColumnReverse: {value: 'YogaFlexDirection.COLUMN_REVERSE'}, - YGFlexDirectionRow: {value: 'YogaFlexDirection.ROW'}, - YGFlexDirectionRowReverse: {value: 'YogaFlexDirection.ROW_REVERSE'}, - - YGJustifyCenter: {value: 'YogaJustify.CENTER'}, - YGJustifyFlexEnd: {value: 'YogaJustify.FLEX_END'}, - YGJustifyFlexStart: {value: 'YogaJustify.FLEX_START'}, - YGJustifySpaceAround: {value: 'YogaJustify.SPACE_AROUND'}, - YGJustifySpaceBetween: {value: 'YogaJustify.SPACE_BETWEEN'}, - YGJustifySpaceEvenly: {value: 'YogaJustify.SPACE_EVENLY'}, - - YGOverflowHidden: {value: 'YogaOverflow.HIDDEN'}, - YGOverflowVisible: {value: 'YogaOverflow.VISIBLE'}, - YGOverflowScroll: {value: 'YogaOverflow.SCROLL'}, - - YGPositionTypeAbsolute: {value: 'YogaPositionType.ABSOLUTE'}, - YGPositionTypeRelative: {value: 'YogaPositionType.RELATIVE'}, - YGPositionTypeStatic: {value: 'YogaPositionType.STATIC'}, - - YGUndefined: {value: 'YogaConstants.UNDEFINED'}, - - YGDisplayFlex: {value: 'YogaDisplay.FLEX'}, - YGDisplayNone: {value: 'YogaDisplay.NONE'}, - YGDisplayContents: {value: 'YogaDisplay.CONTENTS'}, - YGAuto: {value: 'YogaConstants.AUTO'}, - - YGWrapNoWrap: {value: 'YogaWrap.NO_WRAP'}, - YGWrapWrap: {value: 'YogaWrap.WRAP'}, - YGWrapWrapReverse: {value: 'YogaWrap.WRAP_REVERSE'}, - - YGBoxSizingBorderBox: {value: 'YogaBoxSizing.BORDER_BOX'}, - YGBoxSizingContentBox: {value: 'YogaBoxSizing.CONTENT_BOX'}, - - YGMaxContent: {value: 'MAX_CONTENT'}, - YGFitContent: {value: 'FIT_CONTENT'}, - YGStretch: {value: 'STRETCH'}, - - YGNodeCalculateLayout: { - value: function (node, dir, _experiments) { - this.push(node + '.setDirection(' + dir + ');'); - this.push( - node + - '.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);', - ); - }, - }, - - YGNodeInsertChild: { - value: function (parentName, nodeName, index) { - this.push(parentName + '.addChildAt(' + nodeName + ', ' + index + ');'); - }, - }, - - YGNodeLayoutGetLeft: { - value: function (nodeName) { - return nodeName + '.getLayoutX()'; - }, - }, - - YGNodeLayoutGetTop: { - value: function (nodeName) { - return nodeName + '.getLayoutY()'; - }, - }, - - YGNodeLayoutGetWidth: { - value: function (nodeName) { - return nodeName + '.getLayoutWidth()'; - }, - }, - - YGNodeLayoutGetHeight: { - value: function (nodeName) { - return nodeName + '.getLayoutHeight()'; - }, - }, - - YGNodeStyleSetAlignContent: { - value: function (nodeName, value) { - this.push(nodeName + '.setAlignContent(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetAlignItems: { - value: function (nodeName, value) { - this.push(nodeName + '.setAlignItems(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetAlignSelf: { - value: function (nodeName, value) { - this.push(nodeName + '.setAlignSelf(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetAspectRatio: { - value: function (nodeName, value) { - this.push(nodeName + '.setAspectRatio(' + toValueJava(value) + 'f);'); - }, - }, - - YGNodeStyleSetBorder: { - value: function (nodeName, edge, value) { - this.push( - nodeName + '.setBorder(' + edge + ', ' + toValueJava(value) + 'f);', - ); - }, - }, - - YGNodeStyleSetDirection: { - value: function (nodeName, value) { - this.push(nodeName + '.setDirection(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetDisplay: { - value: function (nodeName, value) { - this.push(nodeName + '.setDisplay(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetFlexBasis: { - value: function (nodeName, value) { - this.push(keywordMethod('setFlexBasis', nodeName, value)); - }, - }, - - YGNodeStyleSetFlexDirection: { - value: function (nodeName, value) { - this.push(nodeName + '.setFlexDirection(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetFlexGrow: { - value: function (nodeName, value) { - this.push(nodeName + '.setFlexGrow(' + toValueJava(value) + 'f);'); - }, - }, - - YGNodeStyleSetFlexShrink: { - value: function (nodeName, value) { - this.push(nodeName + '.setFlexShrink(' + toValueJava(value) + 'f);'); - }, - }, - - YGNodeStyleSetFlexWrap: { - value: function (nodeName, value) { - this.push(nodeName + '.setWrap(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetJustifyContent: { - value: function (nodeName, value) { - this.push(nodeName + '.setJustifyContent(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetMargin: { - value: function (nodeName, edge, value) { - let valueStr = toValueJava(value); - if (valueStr != 'YogaConstants.AUTO') { - valueStr = ', ' + valueStr + 'f'; - } else { - valueStr = ''; - } - - this.push( - nodeName + - '.setMargin' + - toMethodName(value) + - '(' + - edge + - valueStr + - ');', - ); - }, - }, - - YGNodeStyleSetHeight: { - value: function (nodeName, value) { - this.push(keywordMethod('setHeight', nodeName, value)); - }, - }, - - YGNodeStyleSetWidth: { - value: function (nodeName, value) { - this.push(keywordMethod('setWidth', nodeName, value)); - }, - }, - - YGNodeStyleSetMaxHeight: { - value: function (nodeName, value) { - this.push(keywordMethod('setMaxHeight', nodeName, value)); - }, - }, - - YGNodeStyleSetMaxWidth: { - value: function (nodeName, value) { - this.push(keywordMethod('setMaxWidth', nodeName, value)); - }, - }, - - YGNodeStyleSetMinHeight: { - value: function (nodeName, value) { - this.push(keywordMethod('setMinHeight', nodeName, value)); - }, - }, - - YGNodeStyleSetMinWidth: { - value: function (nodeName, value) { - this.push(keywordMethod('setMinWidth', nodeName, value)); - }, - }, - - YGNodeStyleSetOverflow: { - value: function (nodeName, value) { - this.push(nodeName + '.setOverflow(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetPadding: { - value: function (nodeName, edge, value) { - this.push( - nodeName + - '.setPadding' + - toMethodName(value) + - '(' + - edge + - ', ' + - toValueJava(value) + - ');', - ); - }, - }, - - YGNodeStyleSetPosition: { - value: function (nodeName, edge, value) { - let valueStr = toValueJava(value); - - if (valueStr == 'YogaConstants.AUTO') { - valueStr = ''; - } else { - valueStr = ', ' + valueStr + 'f'; - } - this.push( - nodeName + - '.setPosition' + - toMethodName(value) + - '(' + - edge + - valueStr + - ');', - ); - }, - }, - - YGNodeStyleSetPositionType: { - value: function (nodeName, value) { - this.push(nodeName + '.setPositionType(' + toValueJava(value) + ');'); - }, - }, - - YGNodeStyleSetGap: { - value: function (nodeName, gap, value) { - this.push( - nodeName + - '.setGap' + - toMethodName(value) + - '(' + - gap + - ', ' + - toValueJava(value) + - 'f);', - ); - }, - }, - - YGNodeStyleSetBoxSizing: { - value: function (nodeName, value) { - this.push(nodeName + '.setBoxSizing(' + toValueJava(value) + ');'); - }, - }, - - YGNodeSetMeasureFunc: { - value: function (nodeName, innerText, _) { - this.push(`${nodeName}.setData("${innerText}");`); - this.push( - `${nodeName}.setMeasureFunction(new TestUtils.intrinsicMeasureFunction());`, - ); - }, - }, -}); diff --git a/gentest/gentest-javascript.js b/gentest/gentest-javascript.js deleted file mode 100644 index f3faf01628..0000000000 --- a/gentest/gentest-javascript.js +++ /dev/null @@ -1,440 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/* global Emitter:readable */ - -const JavascriptEmitter = function () { - Emitter.call(this, 'js', ' '); -}; - -function toValueJavascript(value) { - if (value.match(/^[0-9.e+-]+px$/i)) return parseFloat(value); - if (value.match(/^[0-9.e+-]+%/i)) return JSON.stringify(value); - if (value == 'Yoga.AUTO') return '"auto"'; - if (value == 'max-content') return '"max-content"'; - if (value == 'fit-content') return '"fit-content"'; - if (value == 'stretch') return '"stretch"'; - return value; -} - -JavascriptEmitter.prototype = Object.create(Emitter.prototype, { - constructor: {value: JavascriptEmitter}, - - emitPrologue: { - value: function () { - this.push( - "import { instrinsicSizeMeasureFunc } from '../tools/utils.ts'", - ); - this.push("import Yoga from 'yoga-layout';"); - this.push('import {'); - this.pushIndent(); - this.push('Align,'); - this.push('BoxSizing,'); - this.push('Direction,'); - this.push('Display,'); - this.push('Edge,'); - this.push('Errata,'); - this.push('ExperimentalFeature,'); - this.push('FlexDirection,'); - this.push('Gutter,'); - this.push('Justify,'); - this.push('MeasureMode,'); - this.push('Overflow,'); - this.push('PositionType,'); - this.push('Unit,'); - this.push('Wrap,'); - this.popIndent(); - this.push("} from 'yoga-layout';"); - this.push(''); - }, - }, - - emitTestPrologue: { - value: function (name, experiments, ignore) { - const testFn = ignore ? `test.skip` : 'test'; - this.push(`${testFn}('${name}', () => {`); - this.pushIndent(); - this.push('const config = Yoga.Config.create();'); - this.push('let root;'); - this.push(''); - - if (experiments.length > 0) { - for (const experiment of experiments) { - this.push( - `config.setExperimentalFeatureEnabled(ExperimentalFeature.${experiment}, true);`, - ); - } - this.push(''); - } - - this.push('try {'); - this.pushIndent(); - }, - }, - - emitTestTreePrologue: { - value: function (nodeName) { - if (nodeName === 'root') { - this.push(`root = Yoga.Node.create(config);`); - } else { - this.push(`const ${nodeName} = Yoga.Node.create(config);`); - } - }, - }, - - emitTestEpilogue: { - value: function (_experiments) { - this.popIndent(); - this.push('} finally {'); - this.pushIndent(); - - this.push("if (typeof root !== 'undefined') {"); - this.pushIndent(); - this.push('root.freeRecursive();'); - this.popIndent(); - this.push('}'); - this.push(''); - this.push('config.free();'); - - this.popIndent(); - this.push('}'); - - this.popIndent(); - this.push('});'); - }, - }, - - emitEpilogue: { - value: function () { - this.push(''); - }, - }, - - AssertEQ: { - value: function (v0, v1) { - this.push(`expect(${v1}).toBe(${v0});`); - }, - }, - - YGAlignAuto: {value: 'Align.Auto'}, - YGAlignCenter: {value: 'Align.Center'}, - YGAlignFlexEnd: {value: 'Align.FlexEnd'}, - YGAlignFlexStart: {value: 'Align.FlexStart'}, - YGAlignStretch: {value: 'Align.Stretch'}, - YGAlignSpaceBetween: {value: 'Align.SpaceBetween'}, - YGAlignSpaceAround: {value: 'Align.SpaceAround'}, - YGAlignSpaceEvenly: {value: 'Align.SpaceEvenly'}, - YGAlignBaseline: {value: 'Align.Baseline'}, - - YGDirectionInherit: {value: 'Direction.Inherit'}, - YGDirectionLTR: {value: 'Direction.LTR'}, - YGDirectionRTL: {value: 'Direction.RTL'}, - - YGEdgeBottom: {value: 'Edge.Bottom'}, - YGEdgeEnd: {value: 'Edge.End'}, - YGEdgeLeft: {value: 'Edge.Left'}, - YGEdgeRight: {value: 'Edge.Right'}, - YGEdgeStart: {value: 'Edge.Start'}, - YGEdgeTop: {value: 'Edge.Top'}, - - YGGutterAll: {value: 'Gutter.All'}, - YGGutterColumn: {value: 'Gutter.Column'}, - YGGutterRow: {value: 'Gutter.Row'}, - - YGFlexDirectionColumn: {value: 'FlexDirection.Column'}, - YGFlexDirectionColumnReverse: {value: 'FlexDirection.ColumnReverse'}, - YGFlexDirectionRow: {value: 'FlexDirection.Row'}, - YGFlexDirectionRowReverse: {value: 'FlexDirection.RowReverse'}, - - YGJustifyCenter: {value: 'Justify.Center'}, - YGJustifyFlexEnd: {value: 'Justify.FlexEnd'}, - YGJustifyFlexStart: {value: 'Justify.FlexStart'}, - YGJustifySpaceAround: {value: 'Justify.SpaceAround'}, - YGJustifySpaceBetween: {value: 'Justify.SpaceBetween'}, - YGJustifySpaceEvenly: {value: 'Justify.SpaceEvenly'}, - - YGOverflowHidden: {value: 'Overflow.Hidden'}, - YGOverflowVisible: {value: 'Overflow.Visible'}, - YGOverflowScroll: {value: 'Overflow.Scroll'}, - - YGPositionTypeAbsolute: {value: 'PositionType.Absolute'}, - YGPositionTypeRelative: {value: 'PositionType.Relative'}, - YGPositionTypeStatic: {value: 'PositionType.Static'}, - - YGAuto: {value: "'auto'"}, - YGUndefined: {value: 'undefined'}, - - YGWrapNoWrap: {value: 'Wrap.NoWrap'}, - YGWrapWrap: {value: 'Wrap.Wrap'}, - YGWrapWrapReverse: {value: 'Wrap.WrapReverse'}, - - YGDisplayFlex: {value: 'Display.Flex'}, - YGDisplayNone: {value: 'Display.None'}, - YGDisplayContents: {value: 'Display.Contents'}, - - YGBoxSizingBorderBox: {value: 'BoxSizing.BorderBox'}, - YGBoxSizingContentBox: {value: 'BoxSizing.ContentBox'}, - - YGMaxContent: {value: 'max-content'}, - YGFitContent: {value: 'fit-content'}, - YGStretch: {value: 'stretch'}, - - YGNodeCalculateLayout: { - value: function (node, dir, _experiments) { - this.push(node + '.calculateLayout(undefined, undefined, ' + dir + ');'); - }, - }, - - YGNodeInsertChild: { - value: function (parentName, nodeName, index) { - this.push(parentName + '.insertChild(' + nodeName + ', ' + index + ');'); - }, - }, - - YGNodeLayoutGetLeft: { - value: function (nodeName) { - return nodeName + '.getComputedLeft()'; - }, - }, - - YGNodeLayoutGetTop: { - value: function (nodeName) { - return nodeName + '.getComputedTop()'; - }, - }, - - YGNodeLayoutGetWidth: { - value: function (nodeName) { - return nodeName + '.getComputedWidth()'; - }, - }, - - YGNodeLayoutGetHeight: { - value: function (nodeName) { - return nodeName + '.getComputedHeight()'; - }, - }, - - YGNodeStyleSetAlignContent: { - value: function (nodeName, value) { - this.push( - nodeName + '.setAlignContent(' + toValueJavascript(value) + ');', - ); - }, - }, - - YGNodeStyleSetAlignItems: { - value: function (nodeName, value) { - this.push(nodeName + '.setAlignItems(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetAlignSelf: { - value: function (nodeName, value) { - this.push(nodeName + '.setAlignSelf(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetAspectRatio: { - value: function (nodeName, value) { - this.push( - nodeName + '.setAspectRatio(' + toValueJavascript(value) + ');', - ); - }, - }, - - YGNodeStyleSetBorder: { - value: function (nodeName, edge, value) { - this.push( - nodeName + - '.setBorder(' + - toValueJavascript(edge) + - ', ' + - toValueJavascript(value) + - ');', - ); - }, - }, - - YGNodeStyleSetDirection: { - value: function (nodeName, value) { - this.push(nodeName + '.setDirection(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetDisplay: { - value: function (nodeName, value) { - this.push(nodeName + '.setDisplay(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetFlexBasis: { - value: function (nodeName, value) { - this.push(nodeName + '.setFlexBasis(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetFlexDirection: { - value: function (nodeName, value) { - this.push( - nodeName + '.setFlexDirection(' + toValueJavascript(value) + ');', - ); - }, - }, - - YGNodeStyleSetFlexGrow: { - value: function (nodeName, value) { - this.push(nodeName + '.setFlexGrow(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetFlexShrink: { - value: function (nodeName, value) { - this.push(nodeName + '.setFlexShrink(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetFlexWrap: { - value: function (nodeName, value) { - this.push(nodeName + '.setFlexWrap(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetHeight: { - value: function (nodeName, value) { - this.push(nodeName + '.setHeight(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetJustifyContent: { - value: function (nodeName, value) { - this.push( - nodeName + '.setJustifyContent(' + toValueJavascript(value) + ');', - ); - }, - }, - - YGNodeStyleSetMargin: { - value: function (nodeName, edge, value) { - this.push( - nodeName + - '.setMargin(' + - toValueJavascript(edge) + - ', ' + - toValueJavascript(value) + - ');', - ); - }, - }, - - YGNodeStyleSetMaxHeight: { - value: function (nodeName, value) { - this.push(nodeName + '.setMaxHeight(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetMaxWidth: { - value: function (nodeName, value) { - this.push(nodeName + '.setMaxWidth(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetMinHeight: { - value: function (nodeName, value) { - this.push(nodeName + '.setMinHeight(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetMinWidth: { - value: function (nodeName, value) { - this.push(nodeName + '.setMinWidth(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetOverflow: { - value: function (nodeName, value) { - this.push(nodeName + '.setOverflow(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetPadding: { - value: function (nodeName, edge, value) { - this.push( - nodeName + - '.setPadding(' + - toValueJavascript(edge) + - ', ' + - toValueJavascript(value) + - ');', - ); - }, - }, - - YGNodeStyleSetPosition: { - value: function (nodeName, edge, value) { - const valueStr = toValueJavascript(value); - - if (valueStr == "'auto'") { - this.push( - nodeName + '.setPositionAuto(' + toValueJavascript(edge) + ');', - ); - } else { - this.push( - nodeName + - '.setPosition(' + - toValueJavascript(edge) + - ', ' + - valueStr + - ');', - ); - } - }, - }, - - YGNodeStyleSetPositionType: { - value: function (nodeName, value) { - this.push( - nodeName + '.setPositionType(' + toValueJavascript(value) + ');', - ); - }, - }, - - YGNodeStyleSetWidth: { - value: function (nodeName, value) { - this.push(nodeName + '.setWidth(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeStyleSetGap: { - value: function (nodeName, gap, value) { - this.push( - nodeName + - '.setGap(' + - toValueJavascript(gap) + - ', ' + - toValueJavascript(value) + - ');', - ); - }, - }, - - YGNodeStyleSetBoxSizing: { - value: function (nodeName, value) { - this.push(nodeName + '.setBoxSizing(' + toValueJavascript(value) + ');'); - }, - }, - - YGNodeSetMeasureFunc: { - value: function (nodeName, innerText, flexDirection) { - this.push( - `${nodeName}.setMeasureFunc(instrinsicSizeMeasureFunc.bind({text: "${innerText}", flexDirection: ${toValueJavascript( - flexDirection, - )}}));`, - ); - }, - }, -}); diff --git a/gentest/gentest-log.js b/gentest/gentest-log.js deleted file mode 100644 index 7f235218cf..0000000000 --- a/gentest/gentest-log.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// eslint-disable-next-line no-unused-vars -function gentestLog(message) { - console.log('gentest-log: ', message); -} diff --git a/gentest/gentest.js b/gentest/gentest.js deleted file mode 100755 index 801408c682..0000000000 --- a/gentest/gentest.js +++ /dev/null @@ -1,860 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -/* eslint-env browser */ -/* global CPPEmitter:readable, JavaEmitter:readable, JavascriptEmitter:readable */ - -const INVISIBLE_BORDER_STYLES = ['none', 'initial']; - -window.onload = function () { - checkDefaultValues(); - - printTest( - new CPPEmitter(), - 'cpp', - document.body.children[0], - document.body.children[1], - document.body.children[2], - ); - - printTest( - new JavaEmitter(), - 'java', - document.body.children[0], - document.body.children[1], - document.body.children[2], - ); - - printTest( - new JavascriptEmitter(), - 'js', - document.body.children[0], - document.body.children[1], - document.body.children[2], - ); -}; - -function assert(condition, message) { - if (!condition) { - throw new Error(message); - } -} - -function printTest(e, ext, LTRContainer, RTLContainer, genericContainer) { - e.push([ - ext === 'js' ? '/**' : '/*', - ' * Copyright (c) Meta Platforms, Inc. and affiliates.', - ' *', - ' * This source code is licensed under the MIT license found in the', - ' * LICENSE file in the root directory of this source tree.', - ext === 'cpp' ? ' *\n * clang-format off' : ' *', - ` * MAGIC_PLACEHOLDER`, - ' * generated by gentest/gentest-driver.ts from gentest/fixtures/' + - document.title + - '.html', - ' */', - '', - ]); - e.emitPrologue(); - - const LTRLayoutTree = calculateTree(LTRContainer, 0, 0); - const RTLLayoutTree = calculateTree(RTLContainer, 0, 0); - const genericLayoutTree = calculateTree(genericContainer, 0, 0); - - for (let i = 0; i < genericLayoutTree.length; i++) { - e.emitTestPrologue( - genericLayoutTree[i].name, - genericLayoutTree[i].experiments, - genericLayoutTree[i].disabled, - ); - - if (genericLayoutTree[i].name == 'wrap_column') { - // Modify width and left values due to both safari and chrome not abiding by the - // specification. The undefined dimension of a parent should be defined by the total size - // of their children in that dimension. - // See diagram under flex-wrap header https://www.w3.org/TR/css-flexbox-1/ - assert( - LTRLayoutTree[0].width == 30, - 'wrap_column LTR root.width should be 30', - ); - LTRLayoutTree[0].width = 60; - assert( - RTLLayoutTree[0].width == 30, - 'wrap_column RTL root.width should be 30', - ); - RTLLayoutTree[0].width = 60; - const children = RTLLayoutTree[0].children; - assert( - children[0].left == 0, - 'wrap_column RTL root_child0.left should be 0', - ); - children[0].left = 30; - assert( - children[1].left == 0, - 'wrap_column RTL root_child0.left should be 0', - ); - children[1].left = 30; - assert( - children[2].left == 0, - 'wrap_column RTL root_child2.left should be 0', - ); - children[2].left = 30; - assert( - children[3].left == -30, - 'wrap_column RTL root_child3.left should be -30', - ); - children[3].left = 0; - } - - setupTestTree( - e, - undefined, - LTRLayoutTree[i], - genericLayoutTree[i], - 'root', - null, - ); - - e.YGNodeCalculateLayout( - 'root', - e.YGDirectionLTR, - genericLayoutTree[i].experiments, - ); - e.push(''); - - assertTestTree(e, LTRLayoutTree[i], 'root', null); - e.push(''); - - e.YGNodeCalculateLayout( - 'root', - e.YGDirectionRTL, - genericLayoutTree[i].experiments, - ); - e.push(''); - - assertTestTree(e, RTLLayoutTree[i], 'root', null); - - e.emitTestEpilogue(genericLayoutTree[i].experiments); - } - e.emitEpilogue(); - - e.print(); -} - -function assertTestTree(e, node, nodeName, _parentName) { - e.AssertEQ(node.left, e.YGNodeLayoutGetLeft(nodeName)); - e.AssertEQ(node.top, e.YGNodeLayoutGetTop(nodeName)); - e.AssertEQ(node.width, e.YGNodeLayoutGetWidth(nodeName)); - e.AssertEQ(node.height, e.YGNodeLayoutGetHeight(nodeName)); - - for (let i = 0; i < node.children.length; i++) { - e.push(''); - const childName = nodeName + '_child' + i; - assertTestTree(e, node.children[i], childName, nodeName); - } -} - -function checkDefaultValues() { - // Sanity check of the Yoga default values by test-template.html - [ - {style: 'flex-direction', value: 'column'}, - {style: 'justify-content', value: 'flex-start'}, - {style: 'align-content', value: 'flex-start'}, - {style: 'align-items', value: 'stretch'}, - {style: 'position', value: 'relative'}, - {style: 'flex-wrap', value: 'nowrap'}, - {style: 'overflow', value: 'visible'}, - {style: 'flex-grow', value: '0'}, - {style: 'flex-shrink', value: '0'}, - {style: 'left', value: 'undefined'}, - {style: 'top', value: 'undefined'}, - {style: 'right', value: 'undefined'}, - {style: 'bottom', value: 'undefined'}, - {style: 'display', value: 'flex'}, - {style: 'box-sizing', value: 'border-box'}, - ].forEach(item => { - assert( - isDefaultStyleValue(item.style, item.value), - item.style + ' should be ' + item.value, - ); - }); -} - -function setupTestTree( - e, - parent, - node, - genericNode, - nodeName, - parentName, - index, -) { - e.emitTestTreePrologue(nodeName); - for (const style in node.style) { - // Skip position info for root as it messes up tests - if ( - node.declaredStyle[style] === '' && - (style == 'left' || - style == 'top' || - style == 'right' || - style == 'bottom' || - style == 'width' || - style == 'height') - ) { - continue; - } - if (!isDefaultStyleValue(style, node.style[style])) { - switch (style) { - case 'aspect-ratio': - e.YGNodeStyleSetAspectRatio( - nodeName, - pointValue(e, node.style[style]), - ); - break; - case 'gap': - e.YGNodeStyleSetGap( - nodeName, - e.YGGutterAll, - pointValue(e, node.style[style]), - ); - break; - case 'column-gap': - e.YGNodeStyleSetGap( - nodeName, - e.YGGutterColumn, - pointValue(e, node.style[style]), - ); - break; - case 'row-gap': - e.YGNodeStyleSetGap( - nodeName, - e.YGGutterRow, - pointValue(e, node.style[style]), - ); - break; - case 'direction': - e.YGNodeStyleSetDirection( - nodeName, - directionValue(e, node.style[style]), - ); - break; - case 'flex-direction': - e.YGNodeStyleSetFlexDirection( - nodeName, - flexDirectionValue(e, node.style[style]), - ); - break; - case 'justify-content': - e.YGNodeStyleSetJustifyContent( - nodeName, - justifyValue(e, node.style[style]), - ); - break; - case 'align-content': - e.YGNodeStyleSetAlignContent( - nodeName, - alignValue(e, node.style[style]), - ); - break; - case 'align-items': - e.YGNodeStyleSetAlignItems( - nodeName, - alignValue(e, node.style[style]), - ); - break; - case 'align-self': - if (!parent || node.style[style] !== parent.style['align-items']) { - e.YGNodeStyleSetAlignSelf( - nodeName, - alignValue(e, node.style[style]), - ); - } - break; - case 'position': - e.YGNodeStyleSetPositionType( - nodeName, - positionValue(e, node.style[style]), - ); - break; - case 'flex-wrap': - e.YGNodeStyleSetFlexWrap(nodeName, wrapValue(e, node.style[style])); - break; - case 'overflow': - e.YGNodeStyleSetOverflow( - nodeName, - overflowValue(e, node.style[style]), - ); - break; - case 'flex-grow': - e.YGNodeStyleSetFlexGrow(nodeName, node.style[style]); - break; - case 'flex-shrink': - e.YGNodeStyleSetFlexShrink(nodeName, node.style[style]); - break; - case 'flex-basis': - e.YGNodeStyleSetFlexBasis(nodeName, pointValue(e, node.style[style])); - break; - case 'left': - if (genericNode.rawStyle.indexOf('start:') >= 0) { - e.YGNodeStyleSetPosition( - nodeName, - e.YGEdgeStart, - pointValue(e, node.style[style]), - ); - } else { - e.YGNodeStyleSetPosition( - nodeName, - e.YGEdgeLeft, - pointValue(e, node.style[style]), - ); - } - break; - case 'top': - e.YGNodeStyleSetPosition( - nodeName, - e.YGEdgeTop, - pointValue(e, node.style[style]), - ); - break; - case 'right': - if (genericNode.rawStyle.indexOf('end:') >= 0) { - e.YGNodeStyleSetPosition( - nodeName, - e.YGEdgeEnd, - pointValue(e, node.style[style]), - ); - } else { - e.YGNodeStyleSetPosition( - nodeName, - e.YGEdgeRight, - pointValue(e, node.style[style]), - ); - } - break; - case 'bottom': - e.YGNodeStyleSetPosition( - nodeName, - e.YGEdgeBottom, - pointValue(e, node.style[style]), - ); - break; - case 'margin-left': - if (genericNode.rawStyle.indexOf('margin-start:') >= 0) { - e.YGNodeStyleSetMargin( - nodeName, - e.YGEdgeStart, - pointValue(e, node.style[style]), - ); - } else { - e.YGNodeStyleSetMargin( - nodeName, - e.YGEdgeLeft, - pointValue(e, node.style[style]), - ); - } - break; - case 'margin-top': - e.YGNodeStyleSetMargin( - nodeName, - e.YGEdgeTop, - pointValue(e, node.style[style]), - ); - break; - case 'margin-right': - if (genericNode.rawStyle.indexOf('margin-end:') >= 0) { - e.YGNodeStyleSetMargin( - nodeName, - e.YGEdgeEnd, - pointValue(e, node.style[style]), - ); - } else { - e.YGNodeStyleSetMargin( - nodeName, - e.YGEdgeRight, - pointValue(e, node.style[style]), - ); - } - break; - case 'margin-bottom': - e.YGNodeStyleSetMargin( - nodeName, - e.YGEdgeBottom, - pointValue(e, node.style[style]), - ); - break; - case 'padding-left': - if (genericNode.rawStyle.indexOf('padding-start:') >= 0) { - e.YGNodeStyleSetPadding( - nodeName, - e.YGEdgeStart, - pointValue(e, node.style[style]), - ); - } else { - e.YGNodeStyleSetPadding( - nodeName, - e.YGEdgeLeft, - pointValue(e, node.style[style]), - ); - } - break; - case 'padding-top': - e.YGNodeStyleSetPadding( - nodeName, - e.YGEdgeTop, - pointValue(e, node.style[style]), - ); - break; - case 'padding-right': - if (genericNode.rawStyle.indexOf('padding-end:') >= 0) { - e.YGNodeStyleSetPadding( - nodeName, - e.YGEdgeEnd, - pointValue(e, node.style[style]), - ); - } else { - e.YGNodeStyleSetPadding( - nodeName, - e.YGEdgeRight, - pointValue(e, node.style[style]), - ); - } - break; - case 'padding-bottom': - e.YGNodeStyleSetPadding( - nodeName, - e.YGEdgeBottom, - pointValue(e, node.style[style]), - ); - break; - case 'border-left-width': - if ( - !INVISIBLE_BORDER_STYLES.includes( - node.declaredStyle['border-left-style'], - ) - ) { - if (genericNode.rawStyle.indexOf('border-start-width:') >= 0) { - e.YGNodeStyleSetBorder( - nodeName, - e.YGEdgeStart, - pointValue(e, node.style[style]), - ); - } else { - e.YGNodeStyleSetBorder( - nodeName, - e.YGEdgeLeft, - pointValue(e, node.style[style]), - ); - } - } - break; - case 'border-top-width': - if ( - !INVISIBLE_BORDER_STYLES.includes( - node.declaredStyle['border-top-style'], - ) - ) { - e.YGNodeStyleSetBorder( - nodeName, - e.YGEdgeTop, - pointValue(e, node.style[style]), - ); - } - break; - case 'border-right-width': - if ( - !INVISIBLE_BORDER_STYLES.includes( - node.declaredStyle['border-right-style'], - ) - ) { - if (genericNode.rawStyle.indexOf('border-end-width:') >= 0) { - e.YGNodeStyleSetBorder( - nodeName, - e.YGEdgeEnd, - pointValue(e, node.style[style]), - ); - } else { - e.YGNodeStyleSetBorder( - nodeName, - e.YGEdgeRight, - pointValue(e, node.style[style]), - ); - } - } - break; - case 'border-bottom-width': - if ( - !INVISIBLE_BORDER_STYLES.includes( - node.declaredStyle['border-bottom-style'], - ) - ) { - e.YGNodeStyleSetBorder( - nodeName, - e.YGEdgeBottom, - pointValue(e, node.style[style]), - ); - } - break; - case 'width': - e.YGNodeStyleSetWidth(nodeName, pointValue(e, node.style[style])); - break; - case 'min-width': - e.YGNodeStyleSetMinWidth(nodeName, pointValue(e, node.style[style])); - break; - case 'max-width': - e.YGNodeStyleSetMaxWidth(nodeName, pointValue(e, node.style[style])); - break; - case 'height': - e.YGNodeStyleSetHeight(nodeName, pointValue(e, node.style[style])); - break; - case 'min-height': - e.YGNodeStyleSetMinHeight(nodeName, pointValue(e, node.style[style])); - break; - case 'max-height': - e.YGNodeStyleSetMaxHeight(nodeName, pointValue(e, node.style[style])); - break; - case 'display': - e.YGNodeStyleSetDisplay(nodeName, displayValue(e, node.style[style])); - break; - case 'box-sizing': - e.YGNodeStyleSetBoxSizing( - nodeName, - boxSizingValue(e, node.style[style]), - ); - } - } - } - - if (parentName) { - e.YGNodeInsertChild(parentName, nodeName, index); - } - - if (node.innerText && node.children.length === 0) { - e.YGNodeSetMeasureFunc( - nodeName, - node.innerText, - flexDirectionValue(e, node.style['flex-direction']), - ); - } - - for (let i = 0; i < node.children.length; i++) { - e.push(''); - const childName = nodeName + '_child' + i; - setupTestTree( - e, - node, - node.children[i], - genericNode.children[i], - childName, - nodeName, - i, - ); - } -} - -function overflowValue(e, value) { - switch (value) { - case 'visible': - return e.YGOverflowVisible; - case 'hidden': - return e.YGOverflowHidden; - case 'scroll': - return e.YGOverflowScroll; - } -} - -function wrapValue(e, value) { - switch (value) { - case 'wrap': - return e.YGWrapWrap; - case 'wrap-reverse': - return e.YGWrapWrapReverse; - case 'nowrap': - return e.YGWrapNoWrap; - } -} - -function flexDirectionValue(e, value) { - switch (value) { - case 'row': - return e.YGFlexDirectionRow; - case 'row-reverse': - return e.YGFlexDirectionRowReverse; - case 'column': - return e.YGFlexDirectionColumn; - case 'column-reverse': - return e.YGFlexDirectionColumnReverse; - } -} - -function justifyValue(e, value) { - switch (value) { - case 'center': - return e.YGJustifyCenter; - case 'space-around': - return e.YGJustifySpaceAround; - case 'space-between': - return e.YGJustifySpaceBetween; - case 'space-evenly': - return e.YGJustifySpaceEvenly; - case 'flex-start': - return e.YGJustifyFlexStart; - case 'flex-end': - return e.YGJustifyFlexEnd; - } -} - -function positionValue(e, value) { - switch (value) { - case 'absolute': - return e.YGPositionTypeAbsolute; - case 'static': - return e.YGPositionTypeStatic; - default: - return e.YGPositionTypeRelative; - } -} - -function directionValue(e, value) { - switch (value) { - case 'ltr': - return e.YGDirectionLTR; - case 'rtl': - return e.YGDirectionRTL; - case 'inherit': - return e.YGDirectionInherit; - } -} - -function alignValue(e, value) { - switch (value) { - case 'auto': - return e.YGAlignAuto; - case 'center': - return e.YGAlignCenter; - case 'stretch': - return e.YGAlignStretch; - case 'flex-start': - return e.YGAlignFlexStart; - case 'flex-end': - return e.YGAlignFlexEnd; - case 'space-between': - return e.YGAlignSpaceBetween; - case 'space-around': - return e.YGAlignSpaceAround; - case 'space-evenly': - return e.YGAlignSpaceEvenly; - case 'baseline': - return e.YGAlignBaseline; - } -} - -function pointValue(e, value) { - switch (value) { - case 'auto': - return e.YGAuto; - case 'undefined': - return e.YGUndefined; - case 'max-content': - return e.YGMaxContent; - case 'fit-content': - return e.YGFitContent; - case 'stretch': - case '-webkit-fill-available': - return e.YGStretch; - default: - return value; - } -} - -function displayValue(e, value) { - switch (value) { - case 'flex': - return e.YGDisplayFlex; - case 'none': - return e.YGDisplayNone; - case 'contents': - return e.YGDisplayContents; - } -} - -function boxSizingValue(e, value) { - switch (value) { - case 'border-box': - return e.YGBoxSizingBorderBox; - case 'content-box': - return e.YGBoxSizingContentBox; - } -} - -const DEFAULT_STYLES = new Map(); - -function isDefaultStyleValue(style, value) { - let defaultStyle = DEFAULT_STYLES.get(style); - if (defaultStyle == null) { - switch (style) { - case 'position': - defaultStyle = new Set(['relative']); - break; - - case 'left': - case 'top': - case 'right': - case 'bottom': - case 'start': - case 'end': - defaultStyle = new Set(['undefined']); - break; - - case 'min-height': - case 'min-width': - defaultStyle = new Set(['0', '0px', 'auto']); - break; - - default: { - const node = document.getElementById('default'); - defaultStyle = new Set([getComputedStyle(node, null)[style]]); - break; - } - } - DEFAULT_STYLES.set(style, defaultStyle); - } - return DEFAULT_STYLES.get(style).has(value); -} - -function getRoundedSize(node) { - const boundingRect = node.getBoundingClientRect(); - return { - width: Math.round(boundingRect.right) - Math.round(boundingRect.left), - height: Math.round(boundingRect.bottom) - Math.round(boundingRect.top), - }; -} - -function calculateTree(root, parentOffsetLeft, parentOffsetTop) { - const rootLayout = []; - - for (let i = 0; i < root.children.length; i++) { - const child = root.children[i]; - const boundingRect = child.getBoundingClientRect(); - const layout = { - name: child.id !== '' ? child.id : 'INSERT_NAME_HERE', - left: Math.round(boundingRect.left - parentOffsetLeft), - top: Math.round(boundingRect.top - parentOffsetTop), - width: child.offsetWidth, - height: child.offsetHeight, - children: calculateTree(child, boundingRect.left, boundingRect.top), - style: getYogaStyle(child), - declaredStyle: child.style, - rawStyle: child.getAttribute('style'), - experiments: child.dataset.experiments - ? child.dataset.experiments.split(' ') - : [], - disabled: child.dataset.disabled === 'true', - innerText: child.innerText, - }; - - const size = getRoundedSize(child); - layout.width = size.width; - layout.height = size.height; - - rootLayout.push(layout); - } - - return rootLayout; -} - -function getYogaStyle(node) { - // TODO: Relying on computed style means we cannot test shorthand props like - // "padding", "margin", "gap", or negative values. - return [ - 'direction', - 'flex-direction', - 'justify-content', - 'align-content', - 'align-items', - 'align-self', - 'position', - 'flex-wrap', - 'overflow', - 'flex-grow', - 'flex-shrink', - 'flex-basis', - 'left', - 'top', - 'right', - 'bottom', - 'margin-left', - 'margin-top', - 'margin-right', - 'margin-bottom', - 'padding-left', - 'padding-top', - 'padding-right', - 'padding-bottom', - 'border-left-width', - 'border-top-width', - 'border-right-width', - 'border-bottom-width', - 'width', - 'min-width', - 'max-width', - 'height', - 'min-height', - 'max-height', - 'column-gap', - 'row-gap', - 'display', - 'aspect-ratio', - 'box-sizing', - ].reduce((map, key) => { - map[key] = - node.style[key] || getComputedStyle(node, null).getPropertyValue(key); - return map; - }, {}); -} - -const Emitter = function (lang, indent) { - this.lang = lang; - this.indent = indent; - this.indents = []; - this.lines = []; -}; - -Emitter.prototype = Object.create(Object.prototype, { - constructor: {value: Emitter}, - - pushIndent: { - value: function () { - this.indents.push(this.indent); - }, - }, - - popIndent: { - value: function () { - this.indents.pop(); - }, - }, - - push: { - value: function (line) { - if (line instanceof Array) { - line.forEach(function (element) { - this.push(element); - }, this); - return; - } else if (line.length > 0) { - line = this.indents.join('') + line; - } - this.lines.push(line); - }, - }, - - print: { - value: function () { - console.log(this.lines.join('\n')); - }, - }, -}); diff --git a/gentest/package.json b/gentest/package.json index 4211fb0fb4..e7b71f0b4c 100644 --- a/gentest/package.json +++ b/gentest/package.json @@ -3,8 +3,8 @@ "version": "0.0.0", "private": true, "scripts": { - "gentest": "node --disable-warning=ExperimentalWarning --loader=babel-register-esm ./gentest-driver.ts", - "gentest-validate": "node --disable-warning=ExperimentalWarning --loader=babel-register-esm ./gentest-validate.ts" + "gentest": "node --disable-warning=ExperimentalWarning --loader=babel-register-esm ./src/cli.ts", + "gentest-validate": "node --disable-warning=ExperimentalWarning --loader=babel-register-esm ./scripts/gentest-validate.ts" }, "type": "module", "dependencies": { @@ -15,9 +15,8 @@ "devDependencies": { "@babel/core": "^7.23.0", "@babel/preset-typescript": "^7.23.0", - "@tsconfig/node18": "^18.2.2", "@types/minimist": "^1.2.5", - "@types/node": "^20.10.3", + "@types/node": "^22.0.0", "@types/selenium-webdriver": "^4.1.21", "babel-register-esm": "^1.2.5", "glob": "^10.4.2" diff --git a/gentest/gentest-validate.ts b/gentest/scripts/gentest-validate.ts similarity index 93% rename from gentest/gentest-validate.ts rename to gentest/scripts/gentest-validate.ts index 406c9c4ed9..72dddf346e 100644 --- a/gentest/gentest-validate.ts +++ b/gentest/scripts/gentest-validate.ts @@ -13,7 +13,7 @@ import {fileURLToPath} from 'url'; import signedsource from 'signedsource'; import {glob} from 'glob'; -const yogaRootDir = dirname(dirname(fileURLToPath(import.meta.url))); +const yogaRootDir = dirname(dirname(dirname(fileURLToPath(import.meta.url)))); const filesToValidate = await glob( [ diff --git a/gentest/src/ChromePool.ts b/gentest/src/ChromePool.ts new file mode 100644 index 0000000000..0da88fff6f --- /dev/null +++ b/gentest/src/ChromePool.ts @@ -0,0 +1,78 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import {Builder} from 'selenium-webdriver'; +import {Options} from 'selenium-webdriver/chrome.js'; +import type {WebDriver} from 'selenium-webdriver'; + +export interface ChromePool { + acquire(): Promise; + release(driver: WebDriver): void; + shutdown(): Promise; +} + +/** + * Create a pool of headless Chrome WebDriver instances. + * acquire() returns a driver when one is available; callers are + * queued FIFO when all instances are busy. + */ +export function createChromePool(size: number): ChromePool { + const available: WebDriver[] = []; + const waitQueue: Array<(driver: WebDriver) => void> = []; + const allDrivers: Promise[] = []; + + function addDriver(driver: WebDriver): void { + const waiter = waitQueue.shift(); + if (waiter) { + waiter(driver); + } else { + available.push(driver); + } + } + + // Create all Chrome instances in parallel, making each available as it resolves + for (let i = 0; i < size; i++) { + const driverPromise = createDriver(); + allDrivers.push(driverPromise); + driverPromise.then(addDriver); + } + + return { + acquire(): Promise { + const driver = available.pop(); + if (driver) { + return Promise.resolve(driver); + } + return new Promise(resolve => { + waitQueue.push(resolve); + }); + }, + + release(driver: WebDriver): void { + addDriver(driver); + }, + + async shutdown(): Promise { + const drivers = await Promise.all(allDrivers); + await Promise.all(drivers.map(d => d.quit())); + }, + }; +} + +function createDriver(): Promise { + const options = new Options(); + options.addArguments( + '--force-device-scale-factor=1', + '--window-position=0,0', + '--hide-scrollbars', + '--headless', + ); + + return new Builder().forBrowser('chrome').setChromeOptions(options).build(); +} diff --git a/gentest/src/CssToYoga.ts b/gentest/src/CssToYoga.ts new file mode 100644 index 0000000000..3ee3e1c93d --- /dev/null +++ b/gentest/src/CssToYoga.ts @@ -0,0 +1,1171 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import type Emitter from './emitters/Emitter.ts'; +import type { + ParsedStyles, + ValueWithUnit, + GridTrack, + GridTrackValue, +} from './Types.ts'; + +const INVISIBLE_BORDER_STYLES = new Set(['none', 'initial']); + +/** + * Parse a raw inline style attribute string into a Map of property → value. + * Expands common shorthands used in fixtures so individual longhand + * properties are always present in the returned map. + */ +export function parseStyleAttribute(styleAttr: string): ParsedStyles { + const styles: ParsedStyles = new Map(); + if (!styleAttr) return styles; + + const declarations = styleAttr.split(';'); + for (const decl of declarations) { + const trimmed = decl.trim(); + if (!trimmed) continue; + + const colonIdx = trimmed.indexOf(':'); + if (colonIdx === -1) continue; + + const prop = trimmed.slice(0, colonIdx).trim(); + let value = trimmed.slice(colonIdx + 1).trim(); + + // Strip single or double quotes from values (e.g., align-items: 'stretch') + if ( + (value.startsWith("'") && value.endsWith("'")) || + (value.startsWith('"') && value.endsWith('"')) + ) { + value = value.slice(1, -1); + } + + expandShorthand(styles, prop, value); + } + + return styles; +} + +function expandShorthand( + styles: ParsedStyles, + prop: string, + value: string, +): void { + switch (prop) { + case 'flex': { + // Only handle `flex: N` (single numeric value) as used in fixtures + const n = parseFloat(value); + if (!isNaN(n) && value.trim() === String(n)) { + styles.set('flex-grow', String(n)); + styles.set('flex-shrink', '1'); + styles.set('flex-basis', '0%'); + } else { + // Pass through complex flex values as-is + styles.set(prop, value); + } + break; + } + + default: + styles.set(prop, value); + break; + } +} + +/** + * Map parsed CSS properties to Yoga emitter method calls. + */ +export function applyStyles( + emitter: Emitter, + nodeName: string, + styles: ParsedStyles, + isRoot: boolean, +): void { + // Root nodes get implicit absolute positioning from the template CSS. + if (isRoot && !styles.has('position')) { + emitter.setPositionType(nodeName, positionValue('absolute')); + } + + for (const [prop, value] of styles) { + switch (prop) { + case 'direction': + emitter.setDirection(nodeName, directionValue(value)); + break; + + case 'position': + if (value !== 'relative') { + emitter.setPositionType(nodeName, positionValue(value)); + } + break; + + case 'flex-direction': + if (value !== 'column') { + emitter.setFlexDirection(nodeName, flexDirectionValue(value)); + } + break; + + case 'justify-content': { + const mapped = justifyValue(value); + if (mapped !== undefined && value !== 'flex-start') { + emitter.setJustifyContent(nodeName, mapped); + } + break; + } + + case 'align-content': { + const mapped = alignValue(value); + if (mapped !== undefined && value !== 'flex-start') { + emitter.setAlignContent(nodeName, mapped); + } + break; + } + + case 'align-items': { + const mapped = alignValue(value); + if (mapped !== undefined && value !== 'stretch') { + emitter.setAlignItems(nodeName, mapped); + } + break; + } + + case 'align-self': { + const mapped = alignValue(value); + if (mapped !== undefined) { + emitter.setAlignSelf(nodeName, mapped); + } + break; + } + + case 'justify-items': { + const mapped = justifyValue(value); + if (mapped !== undefined) { + emitter.setJustifyItems(nodeName, mapped); + } + break; + } + + case 'justify-self': { + const mapped = justifyValue(value); + if (mapped !== undefined) { + emitter.setJustifySelf(nodeName, mapped); + } + break; + } + + case 'flex-wrap': + if (value !== 'nowrap') { + emitter.setFlexWrap(nodeName, wrapValue(value)); + } + break; + + case 'overflow': + if (value !== 'visible') { + emitter.setOverflow(nodeName, overflowValue(value)); + } + break; + + case 'display': + if (value !== 'flex') { + emitter.setDisplay(nodeName, displayValue(value)); + } + break; + + case 'box-sizing': + if (value !== 'border-box') { + emitter.setBoxSizing(nodeName, boxSizingValue(value)); + } + break; + + case 'flex-grow': + if (value !== '0') { + emitter.setFlexGrow(nodeName, value); + } + break; + + case 'flex-shrink': + if (value !== '0') { + emitter.setFlexShrink(nodeName, value); + } + break; + + case 'flex-basis': { + const parsed = parseCssLength(value); + if (parsed != null) emitter.setFlexBasis(nodeName, parsed); + break; + } + + case 'aspect-ratio': + emitter.setAspectRatio(nodeName, parseValueWithUnit(value)); + break; + + // Dimensions + case 'width': { + const parsed = parseCssLength(value); + if (parsed != null) emitter.setWidth(nodeName, parsed); + break; + } + case 'height': { + const parsed = parseCssLength(value); + if (parsed != null) emitter.setHeight(nodeName, parsed); + break; + } + case 'min-width': { + if (value !== '0' && value !== '0px' && value !== 'auto') { + const parsed = parseCssLength(value); + if (parsed != null) emitter.setMinWidth(nodeName, parsed); + } + break; + } + case 'min-height': { + if (value !== '0' && value !== '0px' && value !== 'auto') { + const parsed = parseCssLength(value); + if (parsed != null) emitter.setMinHeight(nodeName, parsed); + } + break; + } + case 'max-width': { + const parsed = parseCssLength(value); + if (parsed != null) emitter.setMaxWidth(nodeName, parsed); + break; + } + case 'max-height': { + const parsed = parseCssLength(value); + if (parsed != null) emitter.setMaxHeight(nodeName, parsed); + break; + } + + // Insets - physical + case 'left': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPosition(nodeName, edgeValue('left'), parsed); + } + break; + } + case 'top': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPosition(nodeName, edgeValue('top'), parsed); + } + break; + } + case 'right': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPosition(nodeName, edgeValue('right'), parsed); + } + break; + } + case 'bottom': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPosition(nodeName, edgeValue('bottom'), parsed); + } + break; + } + + // Insets - logical + case 'inset-inline-start': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPosition(nodeName, edgeValue('start'), parsed); + } + break; + } + case 'inset-inline-end': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPosition(nodeName, edgeValue('end'), parsed); + } + break; + } + case 'inset-block-start': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPosition(nodeName, edgeValue('top'), parsed); + } + break; + } + case 'inset-block-end': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPosition(nodeName, edgeValue('bottom'), parsed); + } + break; + } + + // Box shorthands + case 'margin': + case 'padding': + case 'border-width': { + const parse = + prop === 'border-width' ? parseBorderWidth : parseCssLength; + const emit = (edge: string, v: ValueWithUnit) => { + if (prop === 'margin') emitter.setMargin(nodeName, edge, v); + else if (prop === 'padding') emitter.setPadding(nodeName, edge, v); + else emitter.setBorder(nodeName, edge, v); + }; + const parts = value.split(/\s+/); + switch (parts.length) { + case 1: { + const parsed = parse(parts[0]); + if (parsed != null) { + emit(edgeValue('all'), parsed); + } + break; + } + case 2: { + const vertVal = parse(parts[0]); + const horizVal = parse(parts[1]); + if (vertVal != null) { + emit(edgeValue('vertical'), vertVal); + } + if (horizVal != null) { + emit(edgeValue('horizontal'), horizVal); + } + break; + } + case 3: { + const topVal = parse(parts[0]); + const horizVal = parse(parts[1]); + const bottomVal = parse(parts[2]); + if (topVal != null) { + emit(edgeValue('top'), topVal); + } + if (horizVal != null) { + emit(edgeValue('horizontal'), horizVal); + } + if (bottomVal != null) { + emit(edgeValue('bottom'), bottomVal); + } + break; + } + case 4: { + const topVal = parse(parts[0]); + const rightVal = parse(parts[1]); + const bottomVal = parse(parts[2]); + const leftVal = parse(parts[3]); + if (topVal != null) { + emit(edgeValue('top'), topVal); + } + if (rightVal != null) { + emit(edgeValue('right'), rightVal); + } + if (bottomVal != null) { + emit(edgeValue('bottom'), bottomVal); + } + if (leftVal != null) { + emit(edgeValue('left'), leftVal); + } + break; + } + } + break; + } + + // Gap shorthand + case 'gap': { + const parts = value.split(/\s+/); + if (parts.length === 1) { + const parsed = parseCssLength(parts[0]); + if (parsed != null) { + emitter.setGap(nodeName, gutterValue('all'), parsed); + } + } else { + const rowVal = parseCssLength(parts[0]); + const colVal = parseCssLength(parts[1]); + if (rowVal != null) { + emitter.setGap(nodeName, gutterValue('row'), rowVal); + } + if (colVal != null) { + emitter.setGap(nodeName, gutterValue('column'), colVal); + } + } + break; + } + + // Margins - shorthand logical + case 'margin-inline': { + const parts = value.split(/\s+/); + if (parts.length === 1) { + const parsed = parseCssLength(parts[0]); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('horizontal'), parsed); + } + } else { + const startVal = parseCssLength(parts[0]); + const endVal = parseCssLength(parts[1]); + if (startVal != null) { + emitter.setMargin(nodeName, edgeValue('start'), startVal); + } + if (endVal != null) { + emitter.setMargin(nodeName, edgeValue('end'), endVal); + } + } + break; + } + case 'margin-block': { + const parts = value.split(/\s+/); + if (parts.length === 1) { + const parsed = parseCssLength(parts[0]); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('vertical'), parsed); + } + } else { + const topVal = parseCssLength(parts[0]); + const bottomVal = parseCssLength(parts[1]); + if (topVal != null) { + emitter.setMargin(nodeName, edgeValue('top'), topVal); + } + if (bottomVal != null) { + emitter.setMargin(nodeName, edgeValue('bottom'), bottomVal); + } + } + break; + } + + // Margins - physical + case 'margin-left': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('left'), parsed); + } + break; + } + case 'margin-top': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('top'), parsed); + } + break; + } + case 'margin-right': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('right'), parsed); + } + break; + } + case 'margin-bottom': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('bottom'), parsed); + } + break; + } + + // Margins - logical + case 'margin-inline-start': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('start'), parsed); + } + break; + } + case 'margin-inline-end': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('end'), parsed); + } + break; + } + case 'margin-block-start': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('top'), parsed); + } + break; + } + case 'margin-block-end': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setMargin(nodeName, edgeValue('bottom'), parsed); + } + break; + } + + // Padding - physical + case 'padding-left': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('left'), parsed); + } + break; + } + case 'padding-top': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('top'), parsed); + } + break; + } + case 'padding-right': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('right'), parsed); + } + break; + } + case 'padding-bottom': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('bottom'), parsed); + } + break; + } + + // Padding - logical + case 'padding-inline-start': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('start'), parsed); + } + break; + } + case 'padding-inline-end': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('end'), parsed); + } + break; + } + case 'padding-inline': { + const parts = value.split(/\s+/); + if (parts.length === 1) { + const parsed = parseCssLength(parts[0]); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('horizontal'), parsed); + } + } else { + const startVal = parseCssLength(parts[0]); + const endVal = parseCssLength(parts[1]); + if (startVal != null) { + emitter.setPadding(nodeName, edgeValue('start'), startVal); + } + if (endVal != null) { + emitter.setPadding(nodeName, edgeValue('end'), endVal); + } + } + break; + } + case 'padding-block': { + const parts = value.split(/\s+/); + if (parts.length === 1) { + const parsed = parseCssLength(parts[0]); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('vertical'), parsed); + } + } else { + const topVal = parseCssLength(parts[0]); + const bottomVal = parseCssLength(parts[1]); + if (topVal != null) { + emitter.setPadding(nodeName, edgeValue('top'), topVal); + } + if (bottomVal != null) { + emitter.setPadding(nodeName, edgeValue('bottom'), bottomVal); + } + } + break; + } + case 'padding-block-start': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('top'), parsed); + } + break; + } + case 'padding-block-end': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setPadding(nodeName, edgeValue('bottom'), parsed); + } + break; + } + + // Border - compound shorthands (e.g. `border: 10px solid black`) + case 'border': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('all'), width); + } + break; + } + case 'border-top': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('top'), width); + } + break; + } + case 'border-right': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('right'), width); + } + break; + } + case 'border-bottom': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('bottom'), width); + } + break; + } + case 'border-left': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('left'), width); + } + break; + } + case 'border-block': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('vertical'), width); + } + break; + } + case 'border-inline': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('horizontal'), width); + } + break; + } + case 'border-block-start': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('top'), width); + } + break; + } + case 'border-block-end': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('bottom'), width); + } + break; + } + case 'border-inline-start': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('start'), width); + } + break; + } + case 'border-inline-end': { + const width = extractBorderWidth(value); + if (width != null) { + emitter.setBorder(nodeName, edgeValue('end'), width); + } + break; + } + + // Border - physical + case 'border-left-width': { + const borderStyle = styles.get('border-left-style'); + if (!borderStyle || !INVISIBLE_BORDER_STYLES.has(borderStyle)) { + const parsed = parseBorderWidth(value); + if (parsed != null) { + emitter.setBorder(nodeName, edgeValue('left'), parsed); + } + } + break; + } + case 'border-top-width': { + const borderStyle = styles.get('border-top-style'); + if (!borderStyle || !INVISIBLE_BORDER_STYLES.has(borderStyle)) { + const parsed = parseBorderWidth(value); + if (parsed != null) { + emitter.setBorder(nodeName, edgeValue('top'), parsed); + } + } + break; + } + case 'border-right-width': { + const borderStyle = styles.get('border-right-style'); + if (!borderStyle || !INVISIBLE_BORDER_STYLES.has(borderStyle)) { + const parsed = parseBorderWidth(value); + if (parsed != null) { + emitter.setBorder(nodeName, edgeValue('right'), parsed); + } + } + break; + } + case 'border-bottom-width': { + const borderStyle = styles.get('border-bottom-style'); + if (!borderStyle || !INVISIBLE_BORDER_STYLES.has(borderStyle)) { + const parsed = parseBorderWidth(value); + if (parsed != null) { + emitter.setBorder(nodeName, edgeValue('bottom'), parsed); + } + } + break; + } + + // Border - logical + case 'border-inline-start-width': { + const borderStyle = styles.get('border-inline-start-style'); + if (!borderStyle || !INVISIBLE_BORDER_STYLES.has(borderStyle)) { + const parsed = parseBorderWidth(value); + if (parsed != null) { + emitter.setBorder(nodeName, edgeValue('start'), parsed); + } + } + break; + } + case 'border-inline-end-width': { + const borderStyle = styles.get('border-inline-end-style'); + if (!borderStyle || !INVISIBLE_BORDER_STYLES.has(borderStyle)) { + const parsed = parseBorderWidth(value); + if (parsed != null) { + emitter.setBorder(nodeName, edgeValue('end'), parsed); + } + } + break; + } + case 'border-block-start-width': { + const borderStyle = styles.get('border-block-start-style'); + if (!borderStyle || !INVISIBLE_BORDER_STYLES.has(borderStyle)) { + const parsed = parseBorderWidth(value); + if (parsed != null) { + emitter.setBorder(nodeName, edgeValue('top'), parsed); + } + } + break; + } + case 'border-block-end-width': { + const borderStyle = styles.get('border-block-end-style'); + if (!borderStyle || !INVISIBLE_BORDER_STYLES.has(borderStyle)) { + const parsed = parseBorderWidth(value); + if (parsed != null) { + emitter.setBorder(nodeName, edgeValue('bottom'), parsed); + } + } + break; + } + + // Gap + case 'row-gap': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setGap(nodeName, gutterValue('row'), parsed); + } + break; + } + case 'column-gap': { + const parsed = parseCssLength(value); + if (parsed != null) { + emitter.setGap(nodeName, gutterValue('column'), parsed); + } + break; + } + + // Grid template + case 'grid-template-columns': { + if (value && value !== 'none') { + const tracks = parseGridTrackList(value); + if (tracks && tracks.length > 0) { + emitter.setGridTemplateColumns(nodeName, tracks); + } + } + break; + } + case 'grid-template-rows': { + if (value && value !== 'none') { + const tracks = parseGridTrackList(value); + if (tracks && tracks.length > 0) { + emitter.setGridTemplateRows(nodeName, tracks); + } + } + break; + } + case 'grid-auto-columns': { + if (value && value !== 'auto') { + const tracks = parseGridTrackList(value); + if (tracks && tracks.length > 0) { + emitter.setGridAutoColumns(nodeName, tracks); + } + } + break; + } + case 'grid-auto-rows': { + if (value && value !== 'auto') { + const tracks = parseGridTrackList(value); + if (tracks && tracks.length > 0) { + emitter.setGridAutoRows(nodeName, tracks); + } + } + break; + } + + // Grid placement - shorthands + case 'grid-column': { + const [start, end] = parseGridPlacementShorthand(value); + if (start !== undefined) { + emitGridPlacement(emitter, nodeName, 'column', 'start', start); + } + if (end !== undefined) { + emitGridPlacement(emitter, nodeName, 'column', 'end', end); + } + break; + } + case 'grid-row': { + const [start, end] = parseGridPlacementShorthand(value); + if (start !== undefined) { + emitGridPlacement(emitter, nodeName, 'row', 'start', start); + } + if (end !== undefined) { + emitGridPlacement(emitter, nodeName, 'row', 'end', end); + } + break; + } + + // Grid placement - longhands + case 'grid-column-start': + if (value && value !== 'auto') { + emitGridPlacement(emitter, nodeName, 'column', 'start', value); + } + break; + case 'grid-column-end': + if (value && value !== 'auto') { + emitGridPlacement(emitter, nodeName, 'column', 'end', value); + } + break; + case 'grid-row-start': + if (value && value !== 'auto') { + emitGridPlacement(emitter, nodeName, 'row', 'start', value); + } + break; + case 'grid-row-end': + if (value && value !== 'auto') { + emitGridPlacement(emitter, nodeName, 'row', 'end', value); + } + break; + } + } +} + +// Value parsers + +export function parseValueWithUnit(value: string): ValueWithUnit { + if (value === 'auto') return {type: 'auto'}; + if (value === 'undefined') return {type: 'undefined'}; + if (value === 'max-content') return {type: 'max-content'}; + if (value === 'fit-content') return {type: 'fit-content'}; + if (value === 'stretch' || value === '-webkit-fill-available') + return {type: 'stretch'}; + if (value.endsWith('%')) return {type: 'percent', value: parseFloat(value)}; + return {type: 'points', value: parseFloat(value)}; +} + +/** + * Parse a CSS length value, rejecting unitless non-zero numbers. + * In CSS, only `0` is valid without a unit for length properties. + * Invalid values (e.g. `padding-top: 10` without `px`) return null. + */ +export function parseCssLength(value: string): ValueWithUnit | null { + if (value === 'auto') return {type: 'auto'}; + if (value === 'undefined') return {type: 'undefined'}; + if (value === 'max-content') return {type: 'max-content'}; + if (value === 'fit-content') return {type: 'fit-content'}; + if (value === 'stretch' || value === '-webkit-fill-available') + return {type: 'stretch'}; + if (value.endsWith('%')) return {type: 'percent', value: parseFloat(value)}; + if (value.endsWith('px')) return {type: 'points', value: parseFloat(value)}; + // Unitless 0 is valid + const num = parseFloat(value); + if (num === 0 && !isNaN(num)) return {type: 'points', value: 0}; + // Unitless non-zero number is invalid CSS for length properties + return null; +} + +/** + * Parse a CSS border-width value. Rejects unitless non-zero numbers + * and percentage values (CSS border-width does not accept percentages). + */ +function parseBorderWidth(value: string): ValueWithUnit | null { + const parsed = parseCssLength(value); + if (parsed != null && parsed.type === 'percent') return null; + return parsed; +} + +/** + * Extract the width component from a compound border shorthand value + * like `10px solid black` or `solid black 5px`. Returns null if the + * border style is invisible (none/initial) or no valid width is found. + */ +function extractBorderWidth(value: string): ValueWithUnit | null { + const parts = value.split(/\s+/); + const BORDER_STYLES = new Set([ + 'none', + 'hidden', + 'dotted', + 'dashed', + 'solid', + 'double', + 'groove', + 'ridge', + 'inset', + 'outset', + 'initial', + ]); + + let widthStr: string | null = null; + let styleStr: string | null = null; + + for (const part of parts) { + if (BORDER_STYLES.has(part)) { + styleStr = part; + } else if (/^[\d.]/.test(part)) { + widthStr = part; + } + // color values are ignored + } + + if (styleStr && INVISIBLE_BORDER_STYLES.has(styleStr)) return null; + if (widthStr == null) return null; + return parseBorderWidth(widthStr); +} + +// Enum value mappers + +function directionValue(value: string): string { + const map: Record = { + ltr: 'YGDirectionLTR', + rtl: 'YGDirectionRTL', + inherit: 'YGDirectionInherit', + }; + return map[value] ?? value; +} + +function flexDirectionValue(value: string): string { + const map: Record = { + row: 'YGFlexDirectionRow', + 'row-reverse': 'YGFlexDirectionRowReverse', + column: 'YGFlexDirectionColumn', + 'column-reverse': 'YGFlexDirectionColumnReverse', + }; + return map[value] ?? value; +} + +function justifyValue(value: string): string | undefined { + const map: Record = { + center: 'YGJustifyCenter', + 'space-around': 'YGJustifySpaceAround', + 'space-between': 'YGJustifySpaceBetween', + 'space-evenly': 'YGJustifySpaceEvenly', + 'flex-start': 'YGJustifyFlexStart', + 'flex-end': 'YGJustifyFlexEnd', + stretch: 'YGJustifyStretch', + start: 'YGJustifyStart', + end: 'YGJustifyEnd', + auto: 'YGJustifyAuto', + }; + return map[value]; +} + +function alignValue(value: string): string | undefined { + const map: Record = { + auto: 'YGAlignAuto', + center: 'YGAlignCenter', + stretch: 'YGAlignStretch', + 'flex-start': 'YGAlignFlexStart', + 'flex-end': 'YGAlignFlexEnd', + 'space-between': 'YGAlignSpaceBetween', + 'space-around': 'YGAlignSpaceAround', + 'space-evenly': 'YGAlignSpaceEvenly', + baseline: 'YGAlignBaseline', + start: 'YGAlignStart', + end: 'YGAlignEnd', + }; + return map[value]; +} + +function positionValue(value: string): string { + const map: Record = { + absolute: 'YGPositionTypeAbsolute', + static: 'YGPositionTypeStatic', + relative: 'YGPositionTypeRelative', + }; + return map[value] ?? 'YGPositionTypeRelative'; +} + +function wrapValue(value: string): string { + const map: Record = { + wrap: 'YGWrapWrap', + 'wrap-reverse': 'YGWrapWrapReverse', + nowrap: 'YGWrapNoWrap', + }; + return map[value] ?? value; +} + +function overflowValue(value: string): string { + const map: Record = { + visible: 'YGOverflowVisible', + hidden: 'YGOverflowHidden', + scroll: 'YGOverflowScroll', + }; + return map[value] ?? value; +} + +function displayValue(value: string): string { + const map: Record = { + flex: 'YGDisplayFlex', + none: 'YGDisplayNone', + contents: 'YGDisplayContents', + grid: 'YGDisplayGrid', + }; + return map[value] ?? value; +} + +function boxSizingValue(value: string): string { + const map: Record = { + 'border-box': 'YGBoxSizingBorderBox', + 'content-box': 'YGBoxSizingContentBox', + }; + return map[value] ?? value; +} + +function edgeValue(edge: string): string { + const map: Record = { + left: 'YGEdgeLeft', + right: 'YGEdgeRight', + top: 'YGEdgeTop', + bottom: 'YGEdgeBottom', + start: 'YGEdgeStart', + end: 'YGEdgeEnd', + all: 'YGEdgeAll', + vertical: 'YGEdgeVertical', + horizontal: 'YGEdgeHorizontal', + }; + return map[edge] ?? edge; +} + +function gutterValue(gutter: string): string { + const map: Record = { + row: 'YGGutterRow', + column: 'YGGutterColumn', + all: 'YGGutterAll', + }; + return map[gutter] ?? gutter; +} + +// Grid track parsing + +export function parseGridTrackList(value: string): GridTrack[] | null { + if (!value || value === 'none') return null; + + const tracks: GridTrack[] = []; + const parts = value.trim().split(/\s+/); + + let i = 0; + while (i < parts.length) { + const part = parts[i]; + + if (part.startsWith('minmax(')) { + let minmaxStr = part; + while (!minmaxStr.includes(')') && i < parts.length - 1) { + i++; + minmaxStr += ' ' + parts[i]; + } + + const match = minmaxStr.match(/minmax\(([^,]+),\s*([^)]+)\)/); + if (match) { + const min = match[1].trim(); + const max = match[2].trim(); + tracks.push({ + type: 'minmax', + min: parseGridTrackValue(min), + max: parseGridTrackValue(max), + }); + } + } else { + tracks.push(parseGridTrackValue(part)); + } + i++; + } + + return tracks; +} + +function parseGridTrackValue(value: string): GridTrackValue { + if (value === 'auto') return {type: 'auto'}; + if (value.endsWith('px')) return {type: 'points', value: parseFloat(value)}; + if (value.endsWith('%')) return {type: 'percent', value: parseFloat(value)}; + if (value.endsWith('fr')) return {type: 'fr', value: parseFloat(value)}; + return {type: 'auto'}; +} + +/** + * Parse a grid-row or grid-column shorthand value. + * Formats: ``, ` / `. + * Each side can be an integer, `span `, or `auto`. + * Returns [start, end] where either may be undefined if auto or absent. + */ +function parseGridPlacementShorthand( + value: string, +): [string | undefined, string | undefined] { + const parts = value.split('/').map(s => s.trim()); + const start = parts[0] === 'auto' ? undefined : parts[0]; + const end = + parts.length > 1 ? (parts[1] === 'auto' ? undefined : parts[1]) : undefined; + return [start, end]; +} + +/** + * Emit a grid placement call (start or end, row or column). + */ +function emitGridPlacement( + emitter: Emitter, + nodeName: string, + axis: 'row' | 'column', + side: 'start' | 'end', + value: string, +): void { + if (value.startsWith('span ')) { + const n = parseInt(value.substring(5)); + if (axis === 'column') { + if (side === 'start') { + emitter.setGridColumnStartSpan(nodeName, n); + } else { + emitter.setGridColumnEndSpan(nodeName, n); + } + } else { + if (side === 'start') { + emitter.setGridRowStartSpan(nodeName, n); + } else { + emitter.setGridRowEndSpan(nodeName, n); + } + } + } else { + const n = parseInt(value); + if (axis === 'column') { + if (side === 'start') { + emitter.setGridColumnStart(nodeName, n); + } else { + emitter.setGridColumnEnd(nodeName, n); + } + } else { + if (side === 'start') { + emitter.setGridRowStart(nodeName, n); + } else { + emitter.setGridRowEnd(nodeName, n); + } + } + } +} + +/** + * Get the flex direction value string for measure function. + * Used when emitting setMeasureFunc calls. + */ +export function getFlexDirectionForMeasure(styles: ParsedStyles): string { + const fd = styles.get('flex-direction'); + return flexDirectionValue(fd ?? 'column'); +} diff --git a/gentest/src/buildLayoutTree.ts b/gentest/src/buildLayoutTree.ts new file mode 100644 index 0000000000..32505ccf32 --- /dev/null +++ b/gentest/src/buildLayoutTree.ts @@ -0,0 +1,98 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import type {WebDriver} from 'selenium-webdriver'; +import type {LayoutNode} from './Types.ts'; + +/** + * Build the layout tree by querying the DOM via a single executeScript call. + * Sets the document direction first, then walks the DOM under #container. + */ +export default async function buildLayoutTree( + driver: WebDriver, + direction: 'ltr' | 'rtl', +): Promise { + const rawNodes = await driver.executeScript(` + var container = document.getElementById('container'); + + // Save original style attributes before we modify them with direction. + var originalStyles = new Map(); + function saveStyles(parent) { + for (var i = 0; i < parent.children.length; i++) { + var child = parent.children[i]; + originalStyles.set(child, child.getAttribute('style') || ''); + saveStyles(child); + } + } + saveStyles(container); + + // Set direction on each test case element (not on ) so that the + // container stays LTR and root elements remain at (0, 0). + for (var i = 0; i < container.children.length; i++) { + container.children[i].style.direction = '${direction}'; + } + + function getRoundedSize(node) { + var rect = node.getBoundingClientRect(); + return { + width: Math.round(rect.right) - Math.round(rect.left), + height: Math.round(rect.bottom) - Math.round(rect.top) + }; + } + + function walkTree(parent, parentLeft, parentTop) { + var result = []; + for (var i = 0; i < parent.children.length; i++) { + var child = parent.children[i]; + var rect = child.getBoundingClientRect(); + var size = getRoundedSize(child); + var left = Math.round(rect.left - parentLeft); + var top = Math.round(rect.top - parentTop); + + var innerText = ''; + if (child.children.length === 0 && child.innerText) { + innerText = child.innerText; + } + + result.push({ + id: child.id || '', + left: left, + top: top, + width: size.width, + height: size.height, + styleAttr: originalStyles.get(child) || '', + experiments: child.dataset.experiments ? child.dataset.experiments.split(' ') : [], + disabled: child.dataset.disabled === 'true', + innerText: innerText, + children: walkTree(child, rect.left, rect.top) + }); + } + return result; + } + + var containerRect = container.getBoundingClientRect(); + return walkTree(container, containerRect.left, containerRect.top); + `); + + return rawNodes as LayoutNode[]; +} + +// Internal type for the raw JSON returned from executeScript +interface RawNode { + id: string; + left: number; + top: number; + width: number; + height: number; + styleAttr: string; + experiments: string[]; + disabled: boolean; + innerText: string; + children: RawNode[]; +} diff --git a/gentest/src/cli.ts b/gentest/src/cli.ts new file mode 100644 index 0000000000..744f6ff343 --- /dev/null +++ b/gentest/src/cli.ts @@ -0,0 +1,157 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import * as fs from 'node:fs/promises'; +import {dirname, parse, relative, resolve} from 'path'; +import * as process from 'node:process'; +import {fileURLToPath, pathToFileURL} from 'url'; +import {stdin, stdout} from 'node:process'; +import {randomUUID} from 'node:crypto'; +import minimist from 'minimist'; +import readline from 'node:readline/promises'; +import signedsource from 'signedsource'; +import {glob} from 'glob'; + +import type {LayoutNode} from './Types.ts'; +import {createChromePool} from './ChromePool.ts'; +import buildLayoutTree from './buildLayoutTree.ts'; +import {CppEmitter} from './emitters/CppEmitter.ts'; +import {JavaEmitter} from './emitters/JavaEmitter.ts'; +import {JavascriptEmitter} from './emitters/JavascriptEmitter.ts'; + +function addSignatureToSourceCode(sourceCode: string): string { + const codeWithToken = sourceCode.replace( + 'MAGIC_PLACEHOLDER', + signedsource.getSigningToken(), + ); + + return signedsource.signFile(codeWithToken); +} + +const argv = minimist(process.argv.slice(2)); +const specificFixture = argv.f || argv.fixture; +const suspend = argv.s || argv.suspend; +const poolSize = parseInt(argv['pool-size'] || '8', 10); + +const gentestDir = dirname(dirname(fileURLToPath(import.meta.url))); +const yogaDir = dirname(gentestDir); +const fixturesDir = `${gentestDir}/fixtures`; +const fontPath = pathToFileURL( + resolve(gentestDir, 'fonts/Ahem.ttf'), +).toString(); + +// Discover fixtures +let fixtures: string[]; +try { + if (specificFixture != null) { + const fixturePath = `${fixturesDir}/${specificFixture}.html`; + await fs.access(fixturePath, fs.constants.F_OK); + fixtures = [fixturePath]; + } else { + fixtures = await glob(`${fixturesDir}/**/*.html`); + } +} catch (e) { + const errorMessage = e instanceof Error ? e.message : ''; + console.log( + `Trying to access ${specificFixture}.html threw an exception. Executing against all fixtures. ${errorMessage}`, + ); + fixtures = await glob(`${fixturesDir}/**/*.html`); +} + +// Read template +const template = await fs.readFile(`${gentestDir}/test-template.html`, 'utf8'); +const templateWithFont = template.replace('%FONT_PATH%', fontPath); + +// Create Chrome pool +const pool = createChromePool(poolSize); + +// Process all fixtures in parallel (limited by pool size) +async function processFixture(fixturePath: string): Promise { + // Acquire Chrome instance + const driver = await pool.acquire(); + + const fixture = await fs.readFile(fixturePath, 'utf8'); + const relativePath = relative(fixturesDir, fixturePath); + const fileNameNoExtension = parse(relativePath).name; + + // Inject fixture into template + const html = templateWithFont.replace('%FIXTURE%', fixture); + + // Write to temp file + const tmpFile = `/tmp/gentest-${randomUUID()}.html`; + await fs.writeFile(tmpFile, html); + + let ltrTree: LayoutNode[]; + let rtlTree: LayoutNode[]; + try { + await driver.get('file://' + tmpFile); + + // Build LTR layout tree + ltrTree = await buildLayoutTree(driver, 'ltr'); + + // Build RTL layout tree (same page, just change direction) + rtlTree = await buildLayoutTree(driver, 'rtl'); + } finally { + pool.release(driver); + // Clean up temp file + await fs.unlink(tmpFile).catch(() => undefined); + } + + // Build test cases from top-level elements + const testCases = ltrTree.map((ltrNode, i) => ({ + name: ltrNode.id || 'INSERT_NAME_HERE', + ltrLayout: ltrNode, + rtlLayout: rtlTree[i], + experiments: ltrNode.experiments, + disabled: ltrNode.disabled, + })); + + // Generate test code for each language (CPU-bound, fast) + const [cppCode, javaCode, jsCode] = await Promise.all([ + Promise.resolve( + new CppEmitter().generateFixture(fileNameNoExtension, testCases), + ), + Promise.resolve( + new JavaEmitter().generateFixture(fileNameNoExtension, testCases), + ), + Promise.resolve( + new JavascriptEmitter().generateFixture(fileNameNoExtension, testCases), + ), + ]); + + // Sign and write output files + await Promise.all([ + fs.writeFile( + `${yogaDir}/tests/generated/${fileNameNoExtension}.cpp`, + addSignatureToSourceCode(cppCode), + ), + fs.writeFile( + `${yogaDir}/java/tests/generated/com/facebook/yoga/${fileNameNoExtension}.java`, + addSignatureToSourceCode(javaCode), + ), + fs.writeFile( + `${yogaDir}/javascript/tests/generated/${fileNameNoExtension}.test.ts`, + addSignatureToSourceCode(jsCode), + ), + ]); + + console.log('Generated', fileNameNoExtension); + + if (suspend) { + const rl = readline.createInterface({input: stdin, output: stdout}); + await rl.question(''); + rl.close(); + } +} + +try { + await Promise.all(fixtures.map(f => processFixture(f))); +} finally { + await pool.shutdown(); +} diff --git a/gentest/src/emitters/CppEmitter.ts b/gentest/src/emitters/CppEmitter.ts new file mode 100644 index 0000000000..7ae717f171 --- /dev/null +++ b/gentest/src/emitters/CppEmitter.ts @@ -0,0 +1,559 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import Emitter from './Emitter.ts'; +import type {ValueWithUnit, GridTrack, GridTrackValue} from '../Types.ts'; + +function toValueCpp(value: string | number): string { + const n = value.toString().replace('px', '').replace('%', ''); + if (!Number.isFinite(Number(n))) { + return n; + } + + return n + (Number(n) % 1 !== 0 ? 'f' : ''); +} + +function toFunctionNameCpp(value: ValueWithUnit): string { + switch (value.type) { + case 'percent': + return 'Percent'; + case 'auto': + return 'Auto'; + case 'max-content': + return 'MaxContent'; + case 'fit-content': + return 'FitContent'; + case 'stretch': + return 'Stretch'; + default: + return ''; + } +} + +function valueWithUnitToString(value: ValueWithUnit): string { + switch (value.type) { + case 'points': + return toValueCpp(value.value); + case 'percent': + return toValueCpp(value.value); + case 'auto': + return 'YGAuto'; + case 'max-content': + return 'MaxContent'; + case 'fit-content': + return 'FitContent'; + case 'stretch': + return 'Stretch'; + case 'undefined': + return 'YGUndefined'; + } +} + +function formatGridTrackValue(track: GridTrackValue): string { + switch (track.type) { + case 'auto': + return 'YGAuto()'; + case 'points': + return `YGPoints(${toValueCpp(track.value)})`; + case 'percent': + return `YGPercent(${toValueCpp(track.value)})`; + case 'fr': + return `YGFr(${toValueCpp(track.value)})`; + default: + return 'YGAuto()'; + } +} + +export class CppEmitter extends Emitter { + constructor() { + super(' '); + } + + emitCommentHeader(fixtureName: string): void { + this.push([ + '/*', + ' * Copyright (c) Meta Platforms, Inc. and affiliates.', + ' *', + ' * This source code is licensed under the MIT license found in the', + ' * LICENSE file in the root directory of this source tree.', + ' *', + ' * clang-format off', + ' * MAGIC_PLACEHOLDER', + ' * generated by gentest/src/GentestDriver.ts from gentest/fixtures/' + + fixtureName + + '.html', + ' */', + '', + ]); + } + + emitPrologue(_fixtureName: string): void { + this.push([ + '#include ', + '#include ', + '#include "../util/TestUtil.h"', + '', + ]); + } + + emitTestPrologue( + name: string, + experiments: string[], + disabled: boolean, + ): void { + this.push('TEST(YogaTest, ' + name + ') {'); + this.pushIndent(); + + if (disabled) { + this.push('GTEST_SKIP();'); + this.push(''); + } + + this.push('YGConfigRef config = YGConfigNew();'); + for (const experiment of experiments) { + this.push( + 'YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeature' + + experiment + + ', true);', + ); + } + this.push(''); + } + + emitTestTreePrologue(nodeName: string): void { + this.push('YGNodeRef ' + nodeName + ' = YGNodeNewWithConfig(config);'); + } + + emitTestEpilogue(_experiments: string[]): void { + this.push(['', 'YGNodeFreeRecursive(root);']); + this.push(''); + this.push('YGConfigFree(config);'); + this.popIndent(); + this.push(['}', '']); + } + + emitEpilogue(): void { + // no-op for C++ + } + + assertEQ(v0: number, v1: string): void { + this.push('ASSERT_FLOAT_EQ(' + toValueCpp(v0) + ', ' + v1 + ');'); + } + + layoutGetLeft(node: string): string { + return 'YGNodeLayoutGetLeft(' + node + ')'; + } + + layoutGetTop(node: string): string { + return 'YGNodeLayoutGetTop(' + node + ')'; + } + + layoutGetWidth(node: string): string { + return 'YGNodeLayoutGetWidth(' + node + ')'; + } + + layoutGetHeight(node: string): string { + return 'YGNodeLayoutGetHeight(' + node + ')'; + } + + insertChild(parent: string, child: string, index: number): void { + this.push( + 'YGNodeInsertChild(' + parent + ', ' + child + ', ' + index + ');', + ); + } + + calculateLayout( + node: string, + direction: string, + _experiments: string[], + ): void { + this.push( + 'YGNodeCalculateLayout(' + + node + + ', YGUndefined, YGUndefined, ' + + direction + + ');', + ); + } + + setMeasureFunc(node: string, text: string, _flexDirection: string): void { + this.push(`YGNodeSetContext(${node}, (void*)"${text}");`); + this.push( + `YGNodeSetMeasureFunc(${node}, &facebook::yoga::test::IntrinsicSizeMeasure);`, + ); + } + + setDirection(node: string, value: string): void { + this.push( + 'YGNodeStyleSetDirection(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setFlexDirection(node: string, value: string): void { + this.push( + 'YGNodeStyleSetFlexDirection(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setJustifyContent(node: string, value: string): void { + this.push( + 'YGNodeStyleSetJustifyContent(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setJustifyItems(node: string, value: string): void { + this.push( + 'YGNodeStyleSetJustifyItems(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setJustifySelf(node: string, value: string): void { + this.push( + 'YGNodeStyleSetJustifySelf(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setAlignContent(node: string, value: string): void { + this.push( + 'YGNodeStyleSetAlignContent(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setAlignItems(node: string, value: string): void { + this.push( + 'YGNodeStyleSetAlignItems(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setAlignSelf(node: string, value: string): void { + this.push( + 'YGNodeStyleSetAlignSelf(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setPositionType(node: string, value: string): void { + this.push( + 'YGNodeStyleSetPositionType(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setFlexWrap(node: string, value: string): void { + this.push( + 'YGNodeStyleSetFlexWrap(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setOverflow(node: string, value: string): void { + this.push( + 'YGNodeStyleSetOverflow(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setDisplay(node: string, value: string): void { + this.push( + 'YGNodeStyleSetDisplay(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setBoxSizing(node: string, value: string): void { + this.push( + 'YGNodeStyleSetBoxSizing(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setFlexGrow(node: string, value: string): void { + this.push( + 'YGNodeStyleSetFlexGrow(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setFlexShrink(node: string, value: string): void { + this.push( + 'YGNodeStyleSetFlexShrink(' + node + ', ' + toValueCpp(value) + ');', + ); + } + + setFlexBasis(node: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push('YGNodeStyleSetFlexBasis' + suffix + '(' + node + ');'); + } else { + this.push( + 'YGNodeStyleSetFlexBasis' + suffix + '(' + node + ', ' + v + ');', + ); + } + } + + setWidth(node: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push('YGNodeStyleSetWidth' + suffix + '(' + node + ');'); + } else { + this.push('YGNodeStyleSetWidth' + suffix + '(' + node + ', ' + v + ');'); + } + } + + setHeight(node: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push('YGNodeStyleSetHeight' + suffix + '(' + node + ');'); + } else { + this.push('YGNodeStyleSetHeight' + suffix + '(' + node + ', ' + v + ');'); + } + } + + setMinWidth(node: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push('YGNodeStyleSetMinWidth' + suffix + '(' + node + ');'); + } else { + this.push( + 'YGNodeStyleSetMinWidth' + suffix + '(' + node + ', ' + v + ');', + ); + } + } + + setMinHeight(node: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push('YGNodeStyleSetMinHeight' + suffix + '(' + node + ');'); + } else { + this.push( + 'YGNodeStyleSetMinHeight' + suffix + '(' + node + ', ' + v + ');', + ); + } + } + + setMaxWidth(node: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push('YGNodeStyleSetMaxWidth' + suffix + '(' + node + ');'); + } else { + this.push( + 'YGNodeStyleSetMaxWidth' + suffix + '(' + node + ', ' + v + ');', + ); + } + } + + setMaxHeight(node: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push('YGNodeStyleSetMaxHeight' + suffix + '(' + node + ');'); + } else { + this.push( + 'YGNodeStyleSetMaxHeight' + suffix + '(' + node + ', ' + v + ');', + ); + } + } + + setMargin(node: string, edge: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + if (suffix === 'Auto') { + this.push('YGNodeStyleSetMarginAuto(' + node + ', ' + edge + ');'); + } else { + this.push( + 'YGNodeStyleSetMargin' + + suffix + + '(' + + node + + ', ' + + edge + + ', ' + + v + + ');', + ); + } + } + + setPadding(node: string, edge: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + this.push( + 'YGNodeStyleSetPadding' + + suffix + + '(' + + node + + ', ' + + edge + + ', ' + + v + + ');', + ); + } + + setPosition(node: string, edge: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + if (suffix === 'Auto') { + this.push('YGNodeStyleSetPositionAuto(' + node + ', ' + edge + ');'); + } else { + this.push( + 'YGNodeStyleSetPosition' + + suffix + + '(' + + node + + ', ' + + edge + + ', ' + + v + + ');', + ); + } + } + + setBorder(node: string, edge: string, value: ValueWithUnit): void { + const v = valueWithUnitToString(value); + this.push('YGNodeStyleSetBorder(' + node + ', ' + edge + ', ' + v + ');'); + } + + setGap(node: string, gutter: string, value: ValueWithUnit): void { + const suffix = toFunctionNameCpp(value); + const v = valueWithUnitToString(value); + this.push( + 'YGNodeStyleSetGap' + + suffix + + '(' + + node + + ', ' + + gutter + + ', ' + + v + + ');', + ); + } + + setAspectRatio(node: string, value: ValueWithUnit): void { + const v = valueWithUnitToString(value); + this.push('YGNodeStyleSetAspectRatio(' + node + ', ' + v + ');'); + } + + private emitGridTrackList( + node: string, + varName: string, + setterName: string, + tracks: GridTrack[], + ): void { + this.push(`auto ${node}_${varName} = YGGridTrackListCreate();`); + for (const track of tracks) { + if (track.type === 'minmax') { + const minVal = formatGridTrackValue(track.min); + const maxVal = formatGridTrackValue(track.max); + this.push( + `YGGridTrackListAddTrack(${node}_${varName}, YGMinMax(${minVal}, ${maxVal}));`, + ); + } else { + const val = formatGridTrackValue(track); + this.push(`YGGridTrackListAddTrack(${node}_${varName}, ${val});`); + } + } + this.push(`YGNodeStyleSet${setterName}(${node}, ${node}_${varName});`); + this.push(`YGGridTrackListFree(${node}_${varName});`); + } + + setGridTemplateColumns(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList( + node, + 'gridTemplateColumns', + 'GridTemplateColumns', + tracks, + ); + } + + setGridTemplateRows(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList( + node, + 'gridTemplateRows', + 'GridTemplateRows', + tracks, + ); + } + + setGridAutoColumns(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList(node, 'gridAutoColumns', 'GridAutoColumns', tracks); + } + + setGridAutoRows(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList(node, 'gridAutoRows', 'GridAutoRows', tracks); + } + + setGridColumnStart(node: string, value: number): void { + this.push(`YGNodeStyleSetGridColumnStart(${node}, ${value});`); + } + + setGridColumnStartSpan(node: string, value: number): void { + this.push(`YGNodeStyleSetGridColumnStartSpan(${node}, ${value});`); + } + + setGridColumnEnd(node: string, value: number): void { + this.push(`YGNodeStyleSetGridColumnEnd(${node}, ${value});`); + } + + setGridColumnEndSpan(node: string, value: number): void { + this.push(`YGNodeStyleSetGridColumnEndSpan(${node}, ${value});`); + } + + setGridRowStart(node: string, value: number): void { + this.push(`YGNodeStyleSetGridRowStart(${node}, ${value});`); + } + + setGridRowStartSpan(node: string, value: number): void { + this.push(`YGNodeStyleSetGridRowStartSpan(${node}, ${value});`); + } + + setGridRowEnd(node: string, value: number): void { + this.push(`YGNodeStyleSetGridRowEnd(${node}, ${value});`); + } + + setGridRowEndSpan(node: string, value: number): void { + this.push(`YGNodeStyleSetGridRowEndSpan(${node}, ${value});`); + } +} diff --git a/gentest/src/emitters/Emitter.ts b/gentest/src/emitters/Emitter.ts new file mode 100644 index 0000000000..e63400f57b --- /dev/null +++ b/gentest/src/emitters/Emitter.ts @@ -0,0 +1,220 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import type {ValueWithUnit, GridTrack, LayoutNode} from '../Types.ts'; +import { + parseStyleAttribute, + applyStyles, + getFlexDirectionForMeasure, +} from '../CssToYoga.ts'; + +interface TestCase { + name: string; + ltrLayout: LayoutNode; + rtlLayout: LayoutNode; + experiments: string[]; + disabled: boolean; +} + +/** + * Abstract base class for language-specific test code emitters. + * Accumulates lines of output with indentation management. + */ +export default abstract class Emitter { + protected lines: string[] = []; + protected indents: string[] = []; + protected indent: string; + + constructor(indent: string) { + this.indent = indent; + } + + push(line: string | string[]): void { + if (Array.isArray(line)) { + for (const l of line) { + this.push(l); + } + return; + } + if (line.length > 0) { + line = this.indents.join('') + line; + } + this.lines.push(line); + } + + pushIndent(): void { + this.indents.push(this.indent); + } + + popIndent(): void { + this.indents.pop(); + } + + getOutput(): string { + return this.lines.join('\n'); + } + + // Comment header + abstract emitCommentHeader(fixtureName: string): void; + + // Lifecycle + abstract emitPrologue(fixtureName: string): void; + abstract emitEpilogue(): void; + abstract emitTestPrologue( + name: string, + experiments: string[], + disabled: boolean, + ): void; + abstract emitTestEpilogue(experiments: string[]): void; + abstract emitTestTreePrologue(nodeName: string): void; + + // Node operations + abstract insertChild(parent: string, child: string, index: number): void; + abstract calculateLayout( + node: string, + direction: string, + experiments: string[], + ): void; + abstract setMeasureFunc( + node: string, + text: string, + flexDirection: string, + ): void; + + // Assertions + abstract assertEQ(expected: number, actual: string): void; + abstract layoutGetLeft(node: string): string; + abstract layoutGetTop(node: string): string; + abstract layoutGetWidth(node: string): string; + abstract layoutGetHeight(node: string): string; + + // Style setters + abstract setDirection(node: string, value: string): void; + abstract setFlexDirection(node: string, value: string): void; + abstract setJustifyContent(node: string, value: string): void; + abstract setJustifyItems(node: string, value: string): void; + abstract setJustifySelf(node: string, value: string): void; + abstract setAlignContent(node: string, value: string): void; + abstract setAlignItems(node: string, value: string): void; + abstract setAlignSelf(node: string, value: string): void; + abstract setPositionType(node: string, value: string): void; + abstract setFlexWrap(node: string, value: string): void; + abstract setOverflow(node: string, value: string): void; + abstract setDisplay(node: string, value: string): void; + abstract setBoxSizing(node: string, value: string): void; + abstract setFlexGrow(node: string, value: string): void; + abstract setFlexShrink(node: string, value: string): void; + abstract setFlexBasis(node: string, value: ValueWithUnit): void; + abstract setWidth(node: string, value: ValueWithUnit): void; + abstract setHeight(node: string, value: ValueWithUnit): void; + abstract setMinWidth(node: string, value: ValueWithUnit): void; + abstract setMinHeight(node: string, value: ValueWithUnit): void; + abstract setMaxWidth(node: string, value: ValueWithUnit): void; + abstract setMaxHeight(node: string, value: ValueWithUnit): void; + abstract setMargin(node: string, edge: string, value: ValueWithUnit): void; + abstract setPadding(node: string, edge: string, value: ValueWithUnit): void; + abstract setPosition(node: string, edge: string, value: ValueWithUnit): void; + abstract setBorder(node: string, edge: string, value: ValueWithUnit): void; + abstract setGap(node: string, gutter: string, value: ValueWithUnit): void; + abstract setAspectRatio(node: string, value: ValueWithUnit): void; + + // Grid + abstract setGridTemplateColumns(node: string, tracks: GridTrack[]): void; + abstract setGridTemplateRows(node: string, tracks: GridTrack[]): void; + abstract setGridAutoColumns(node: string, tracks: GridTrack[]): void; + abstract setGridAutoRows(node: string, tracks: GridTrack[]): void; + abstract setGridColumnStart(node: string, value: number): void; + abstract setGridColumnStartSpan(node: string, value: number): void; + abstract setGridColumnEnd(node: string, value: number): void; + abstract setGridColumnEndSpan(node: string, value: number): void; + abstract setGridRowStart(node: string, value: number): void; + abstract setGridRowStartSpan(node: string, value: number): void; + abstract setGridRowEnd(node: string, value: number): void; + abstract setGridRowEndSpan(node: string, value: number): void; + + /** + * Generate test code for a complete fixture. + */ + generateFixture(fixtureName: string, testCases: TestCase[]): string { + this.emitCommentHeader(fixtureName); + + this.emitPrologue(fixtureName); + + for (const testCase of testCases) { + const ltrTree = testCase.ltrLayout; + const rtlTree = testCase.rtlLayout; + + this.emitTestPrologue( + testCase.name, + testCase.experiments, + testCase.disabled, + ); + + this.setupTestTree(ltrTree, 'root', null, undefined); + + this.calculateLayout('root', 'YGDirectionLTR', testCase.experiments); + this.push(''); + + this.assertTestTree(ltrTree, 'root'); + this.push(''); + + this.calculateLayout('root', 'YGDirectionRTL', testCase.experiments); + this.push(''); + + this.assertTestTree(rtlTree, 'root'); + + this.emitTestEpilogue(testCase.experiments); + } + + this.emitEpilogue(); + + return this.getOutput(); + } + + private setupTestTree( + node: LayoutNode, + nodeName: string, + parentName: string | null, + index: number | undefined, + ): void { + this.emitTestTreePrologue(nodeName); + + const styles = parseStyleAttribute(node.styleAttr); + const isRoot = parentName === null; + applyStyles(this, nodeName, styles, isRoot); + + if (parentName !== null && index !== undefined) { + this.insertChild(parentName, nodeName, index); + } + + if (node.innerText && node.children.length === 0) { + const flexDirection = getFlexDirectionForMeasure(styles); + this.setMeasureFunc(nodeName, node.innerText, flexDirection); + } + + for (let i = 0; i < node.children.length; i++) { + this.push(''); + const childName = nodeName + '_child' + i; + this.setupTestTree(node.children[i], childName, nodeName, i); + } + } + + private assertTestTree(node: LayoutNode, nodeName: string): void { + this.assertEQ(node.left, this.layoutGetLeft(nodeName)); + this.assertEQ(node.top, this.layoutGetTop(nodeName)); + this.assertEQ(node.width, this.layoutGetWidth(nodeName)); + this.assertEQ(node.height, this.layoutGetHeight(nodeName)); + + for (let i = 0; i < node.children.length; i++) { + this.push(''); + const childName = nodeName + '_child' + i; + this.assertTestTree(node.children[i], childName); + } + } +} diff --git a/gentest/src/emitters/JavaEmitter.ts b/gentest/src/emitters/JavaEmitter.ts new file mode 100644 index 0000000000..61a4c92157 --- /dev/null +++ b/gentest/src/emitters/JavaEmitter.ts @@ -0,0 +1,579 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import Emitter from './Emitter.ts'; +import type {ValueWithUnit, GridTrack, GridTrackValue} from '../Types.ts'; + +function toValueJava(value: string | number): string { + const n = value.toString().replace('px', '').replace('%', ''); + return n; +} + +function toMethodName(value: ValueWithUnit): string { + switch (value.type) { + case 'percent': + return 'Percent'; + case 'auto': + return 'Auto'; + case 'max-content': + return 'MaxContent'; + case 'fit-content': + return 'FitContent'; + case 'stretch': + return 'Stretch'; + default: + return ''; + } +} + +function valueWithUnitToString(value: ValueWithUnit): string { + switch (value.type) { + case 'points': + return toValueJava(value.value); + case 'percent': + return toValueJava(value.value); + case 'auto': + return 'YogaConstants.AUTO'; + case 'max-content': + return 'MAX_CONTENT'; + case 'fit-content': + return 'FIT_CONTENT'; + case 'stretch': + return 'STRETCH'; + case 'undefined': + return 'YogaConstants.UNDEFINED'; + } +} + +function toJavaUpper(symbol: string): string { + let out = ''; + for (let i = 0; i < symbol.length; i++) { + const c = symbol[i]; + if ( + c === c.toUpperCase() && + i !== 0 && + symbol[i - 1] !== symbol[i - 1].toUpperCase() + ) { + out += '_'; + } + out += c.toUpperCase(); + } + return out; +} + +function formatGridTrackValueJava(track: GridTrackValue): string { + switch (track.type) { + case 'auto': + return 'YogaGridTrackValue.auto()'; + case 'points': + return `YogaGridTrackValue.points(${toValueJava(track.value)}f)`; + case 'percent': + return `YogaGridTrackValue.percent(${toValueJava(track.value)}f)`; + case 'fr': + return `YogaGridTrackValue.fr(${toValueJava(track.value)}f)`; + default: + return 'YogaGridTrackValue.auto()'; + } +} + +export class JavaEmitter extends Emitter { + private static enumMap: Record = { + YGAlignAuto: 'YogaAlign.AUTO', + YGAlignCenter: 'YogaAlign.CENTER', + YGAlignFlexEnd: 'YogaAlign.FLEX_END', + YGAlignFlexStart: 'YogaAlign.FLEX_START', + YGAlignStretch: 'YogaAlign.STRETCH', + YGAlignSpaceBetween: 'YogaAlign.SPACE_BETWEEN', + YGAlignSpaceAround: 'YogaAlign.SPACE_AROUND', + YGAlignSpaceEvenly: 'YogaAlign.SPACE_EVENLY', + YGAlignBaseline: 'YogaAlign.BASELINE', + YGAlignStart: 'YogaAlign.START', + YGAlignEnd: 'YogaAlign.END', + YGDirectionInherit: 'YogaDirection.INHERIT', + YGDirectionLTR: 'YogaDirection.LTR', + YGDirectionRTL: 'YogaDirection.RTL', + YGEdgeBottom: 'YogaEdge.BOTTOM', + YGEdgeEnd: 'YogaEdge.END', + YGEdgeLeft: 'YogaEdge.LEFT', + YGEdgeRight: 'YogaEdge.RIGHT', + YGEdgeStart: 'YogaEdge.START', + YGEdgeTop: 'YogaEdge.TOP', + YGEdgeAll: 'YogaEdge.ALL', + YGEdgeVertical: 'YogaEdge.VERTICAL', + YGEdgeHorizontal: 'YogaEdge.HORIZONTAL', + YGGutterAll: 'YogaGutter.ALL', + YGGutterColumn: 'YogaGutter.COLUMN', + YGGutterRow: 'YogaGutter.ROW', + YGFlexDirectionColumn: 'YogaFlexDirection.COLUMN', + YGFlexDirectionColumnReverse: 'YogaFlexDirection.COLUMN_REVERSE', + YGFlexDirectionRow: 'YogaFlexDirection.ROW', + YGFlexDirectionRowReverse: 'YogaFlexDirection.ROW_REVERSE', + YGJustifyCenter: 'YogaJustify.CENTER', + YGJustifyFlexEnd: 'YogaJustify.FLEX_END', + YGJustifyFlexStart: 'YogaJustify.FLEX_START', + YGJustifySpaceAround: 'YogaJustify.SPACE_AROUND', + YGJustifySpaceBetween: 'YogaJustify.SPACE_BETWEEN', + YGJustifySpaceEvenly: 'YogaJustify.SPACE_EVENLY', + YGJustifyStretch: 'YogaJustify.STRETCH', + YGJustifyStart: 'YogaJustify.START', + YGJustifyEnd: 'YogaJustify.END', + YGJustifyAuto: 'YogaJustify.AUTO', + YGOverflowHidden: 'YogaOverflow.HIDDEN', + YGOverflowVisible: 'YogaOverflow.VISIBLE', + YGOverflowScroll: 'YogaOverflow.SCROLL', + YGPositionTypeAbsolute: 'YogaPositionType.ABSOLUTE', + YGPositionTypeRelative: 'YogaPositionType.RELATIVE', + YGPositionTypeStatic: 'YogaPositionType.STATIC', + YGWrapNoWrap: 'YogaWrap.NO_WRAP', + YGWrapWrap: 'YogaWrap.WRAP', + YGWrapWrapReverse: 'YogaWrap.WRAP_REVERSE', + YGDisplayFlex: 'YogaDisplay.FLEX', + YGDisplayNone: 'YogaDisplay.NONE', + YGDisplayContents: 'YogaDisplay.CONTENTS', + YGDisplayGrid: 'YogaDisplay.GRID', + YGBoxSizingBorderBox: 'YogaBoxSizing.BORDER_BOX', + YGBoxSizingContentBox: 'YogaBoxSizing.CONTENT_BOX', + }; + + private tr(value: string): string { + return JavaEmitter.enumMap[value] ?? value; + } + + constructor() { + super(' '); + } + + emitCommentHeader(fixtureName: string): void { + this.push([ + '/*', + ' * Copyright (c) Meta Platforms, Inc. and affiliates.', + ' *', + ' * This source code is licensed under the MIT license found in the', + ' * LICENSE file in the root directory of this source tree.', + ' *', + ' * MAGIC_PLACEHOLDER', + ' * generated by gentest/src/GentestDriver.ts from gentest/fixtures/' + + fixtureName + + '.html', + ' */', + '', + ]); + } + + emitPrologue(fixtureName: string): void { + this.push([ + 'package com.facebook.yoga;', + '', + 'import static org.junit.Assert.assertEquals;', + '', + 'import org.junit.Ignore;', + 'import org.junit.Test;', + 'import org.junit.runner.RunWith;', + 'import org.junit.runners.Parameterized;', + 'import com.facebook.yoga.utils.TestUtils;', + '', + '@RunWith(Parameterized.class)', + 'public class ' + fixtureName + ' {', + ]); + this.pushIndent(); + this.push([ + '@Parameterized.Parameters(name = "{0}")', + 'public static Iterable nodeFactories() {', + ]); + this.pushIndent(); + this.push('return TestParametrization.nodeFactories();'); + this.popIndent(); + this.push('}'); + this.push([ + '', + '@Parameterized.Parameter public TestParametrization.NodeFactory mNodeFactory;', + '', + ]); + } + + emitTestPrologue( + name: string, + experiments: string[], + disabled: boolean, + ): void { + this.push('@Test'); + if (disabled) { + this.push('@Ignore'); + } + this.push('public void test_' + name + '() {'); + this.pushIndent(); + + this.push('YogaConfig config = YogaConfigFactory.create();'); + for (const experiment of experiments) { + this.push( + 'config.setExperimentalFeatureEnabled(YogaExperimentalFeature.' + + toJavaUpper(experiment) + + ', true);', + ); + } + this.push(''); + } + + emitTestTreePrologue(nodeName: string): void { + this.push('final YogaNode ' + nodeName + ' = createNode(config);'); + } + + emitTestEpilogue(_experiments: string[]): void { + this.popIndent(); + this.push(['}', '']); + } + + emitEpilogue(): void { + this.push('private YogaNode createNode(YogaConfig config) {'); + this.pushIndent(); + this.push('return mNodeFactory.create(config);'); + this.popIndent(); + this.push('}'); + this.popIndent(); + this.push(['}', '']); + } + + assertEQ(v0: number, v1: string): void { + this.push('assertEquals(' + v0 + 'f, ' + v1 + ', 0.0f);'); + } + + layoutGetLeft(node: string): string { + return node + '.getLayoutX()'; + } + + layoutGetTop(node: string): string { + return node + '.getLayoutY()'; + } + + layoutGetWidth(node: string): string { + return node + '.getLayoutWidth()'; + } + + layoutGetHeight(node: string): string { + return node + '.getLayoutHeight()'; + } + + insertChild(parent: string, child: string, index: number): void { + this.push(parent + '.addChildAt(' + child + ', ' + index + ');'); + } + + calculateLayout( + node: string, + direction: string, + _experiments: string[], + ): void { + this.push(node + '.setDirection(' + this.tr(direction) + ');'); + this.push( + node + + '.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);', + ); + } + + setMeasureFunc(node: string, text: string, _flexDirection: string): void { + this.push(`${node}.setData("${text}");`); + this.push( + `${node}.setMeasureFunction(new TestUtils.intrinsicMeasureFunction());`, + ); + } + + setDirection(node: string, value: string): void { + this.push(node + '.setDirection(' + this.tr(value) + ');'); + } + + setFlexDirection(node: string, value: string): void { + this.push(node + '.setFlexDirection(' + this.tr(value) + ');'); + } + + setJustifyContent(node: string, value: string): void { + this.push(node + '.setJustifyContent(' + this.tr(value) + ');'); + } + + setJustifyItems(node: string, value: string): void { + this.push(node + '.setJustifyItems(' + this.tr(value) + ');'); + } + + setJustifySelf(node: string, value: string): void { + this.push(node + '.setJustifySelf(' + this.tr(value) + ');'); + } + + setAlignContent(node: string, value: string): void { + this.push(node + '.setAlignContent(' + this.tr(value) + ');'); + } + + setAlignItems(node: string, value: string): void { + this.push(node + '.setAlignItems(' + this.tr(value) + ');'); + } + + setAlignSelf(node: string, value: string): void { + this.push(node + '.setAlignSelf(' + this.tr(value) + ');'); + } + + setPositionType(node: string, value: string): void { + this.push(node + '.setPositionType(' + this.tr(value) + ');'); + } + + setFlexWrap(node: string, value: string): void { + this.push(node + '.setWrap(' + this.tr(value) + ');'); + } + + setOverflow(node: string, value: string): void { + this.push(node + '.setOverflow(' + this.tr(value) + ');'); + } + + setDisplay(node: string, value: string): void { + this.push(node + '.setDisplay(' + this.tr(value) + ');'); + } + + setBoxSizing(node: string, value: string): void { + this.push(node + '.setBoxSizing(' + this.tr(value) + ');'); + } + + setFlexGrow(node: string, value: string): void { + this.push(node + '.setFlexGrow(' + value + 'f);'); + } + + setFlexShrink(node: string, value: string): void { + this.push(node + '.setFlexShrink(' + value + 'f);'); + } + + setFlexBasis(node: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push(node + '.setFlexBasis' + suffix + '();'); + } else { + this.push(node + '.setFlexBasis' + suffix + '(' + v + 'f);'); + } + } + + setWidth(node: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push(node + '.setWidth' + suffix + '();'); + } else { + this.push(node + '.setWidth' + suffix + '(' + v + 'f);'); + } + } + + setHeight(node: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push(node + '.setHeight' + suffix + '();'); + } else { + this.push(node + '.setHeight' + suffix + '(' + v + 'f);'); + } + } + + setMinWidth(node: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push(node + '.setMinWidth' + suffix + '();'); + } else { + this.push(node + '.setMinWidth' + suffix + '(' + v + 'f);'); + } + } + + setMinHeight(node: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push(node + '.setMinHeight' + suffix + '();'); + } else { + this.push(node + '.setMinHeight' + suffix + '(' + v + 'f);'); + } + } + + setMaxWidth(node: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push(node + '.setMaxWidth' + suffix + '();'); + } else { + this.push(node + '.setMaxWidth' + suffix + '(' + v + 'f);'); + } + } + + setMaxHeight(node: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + if ( + suffix === 'Auto' || + suffix === 'MaxContent' || + suffix === 'FitContent' || + suffix === 'Stretch' + ) { + this.push(node + '.setMaxHeight' + suffix + '();'); + } else { + this.push(node + '.setMaxHeight' + suffix + '(' + v + 'f);'); + } + } + + setMargin(node: string, edge: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + if (suffix === 'Auto') { + this.push(node + '.setMarginAuto(' + this.tr(edge) + ');'); + } else { + this.push( + node + '.setMargin' + suffix + '(' + this.tr(edge) + ', ' + v + 'f);', + ); + } + } + + setPadding(node: string, edge: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + this.push( + node + '.setPadding' + suffix + '(' + this.tr(edge) + ', ' + v + ');', + ); + } + + setPosition(node: string, edge: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + if (suffix === 'Auto') { + this.push(node + '.setPositionAuto(' + this.tr(edge) + ');'); + } else { + this.push( + node + '.setPosition' + suffix + '(' + this.tr(edge) + ', ' + v + 'f);', + ); + } + } + + setBorder(node: string, edge: string, value: ValueWithUnit): void { + const v = valueWithUnitToString(value); + this.push(node + '.setBorder(' + this.tr(edge) + ', ' + v + 'f);'); + } + + setGap(node: string, gutter: string, value: ValueWithUnit): void { + const suffix = toMethodName(value); + const v = valueWithUnitToString(value); + this.push( + node + '.setGap' + suffix + '(' + this.tr(gutter) + ', ' + v + 'f);', + ); + } + + setAspectRatio(node: string, value: ValueWithUnit): void { + const v = valueWithUnitToString(value); + this.push(node + '.setAspectRatio(' + v + 'f);'); + } + + private emitGridTrackList( + node: string, + varName: string, + setterName: string, + tracks: GridTrack[], + ): void { + this.push(`YogaGridTrackList ${node}${varName} = new YogaGridTrackList();`); + for (const track of tracks) { + if (track.type === 'minmax') { + const minVal = formatGridTrackValueJava(track.min); + const maxVal = formatGridTrackValueJava(track.max); + this.push( + `${node}${varName}.addTrack(YogaGridTrackValue.minMax(${minVal}, ${maxVal}));`, + ); + } else { + const val = formatGridTrackValueJava(track); + this.push(`${node}${varName}.addTrack(${val});`); + } + } + this.push(`${node}.set${setterName}(${node}${varName});`); + } + + setGridTemplateColumns(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList( + node, + 'GridTemplateColumns', + 'GridTemplateColumns', + tracks, + ); + } + + setGridTemplateRows(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList( + node, + 'GridTemplateRows', + 'GridTemplateRows', + tracks, + ); + } + + setGridAutoColumns(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList(node, 'GridAutoColumns', 'GridAutoColumns', tracks); + } + + setGridAutoRows(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList(node, 'GridAutoRows', 'GridAutoRows', tracks); + } + + setGridColumnStart(node: string, value: number): void { + this.push(`${node}.setGridColumnStart(${value});`); + } + + setGridColumnStartSpan(node: string, value: number): void { + this.push(`${node}.setGridColumnStartSpan(${value});`); + } + + setGridColumnEnd(node: string, value: number): void { + this.push(`${node}.setGridColumnEnd(${value});`); + } + + setGridColumnEndSpan(node: string, value: number): void { + this.push(`${node}.setGridColumnEndSpan(${value});`); + } + + setGridRowStart(node: string, value: number): void { + this.push(`${node}.setGridRowStart(${value});`); + } + + setGridRowStartSpan(node: string, value: number): void { + this.push(`${node}.setGridRowStartSpan(${value});`); + } + + setGridRowEnd(node: string, value: number): void { + this.push(`${node}.setGridRowEnd(${value});`); + } + + setGridRowEndSpan(node: string, value: number): void { + this.push(`${node}.setGridRowEndSpan(${value});`); + } +} diff --git a/gentest/src/emitters/JavascriptEmitter.ts b/gentest/src/emitters/JavascriptEmitter.ts new file mode 100644 index 0000000000..0cdb054a7a --- /dev/null +++ b/gentest/src/emitters/JavascriptEmitter.ts @@ -0,0 +1,483 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +import Emitter from './Emitter.ts'; +import type {ValueWithUnit, GridTrack, GridTrackValue} from '../Types.ts'; + +function toValueJavascript(value: ValueWithUnit): string { + switch (value.type) { + case 'points': + return String(value.value); + case 'percent': + return JSON.stringify(value.value + '%'); + case 'auto': + return '"auto"'; + case 'max-content': + return '"max-content"'; + case 'fit-content': + return '"fit-content"'; + case 'stretch': + return '"stretch"'; + case 'undefined': + return 'undefined'; + } +} + +function formatGridTrackValueJS(track: GridTrackValue): string { + switch (track.type) { + case 'auto': + return '{type: GridTrackType.Auto}'; + case 'points': + return `{type: GridTrackType.Points, value: ${track.value}}`; + case 'percent': + return `{type: GridTrackType.Percent, value: ${track.value}}`; + case 'fr': + return `{type: GridTrackType.Fr, value: ${track.value}}`; + default: + return '{type: GridTrackType.Auto}'; + } +} + +export class JavascriptEmitter extends Emitter { + private static enumMap: Record = { + YGAlignAuto: 'Align.Auto', + YGAlignCenter: 'Align.Center', + YGAlignFlexEnd: 'Align.FlexEnd', + YGAlignFlexStart: 'Align.FlexStart', + YGAlignStretch: 'Align.Stretch', + YGAlignSpaceBetween: 'Align.SpaceBetween', + YGAlignSpaceAround: 'Align.SpaceAround', + YGAlignSpaceEvenly: 'Align.SpaceEvenly', + YGAlignBaseline: 'Align.Baseline', + YGAlignStart: 'Align.Start', + YGAlignEnd: 'Align.End', + YGDirectionInherit: 'Direction.Inherit', + YGDirectionLTR: 'Direction.LTR', + YGDirectionRTL: 'Direction.RTL', + YGEdgeBottom: 'Edge.Bottom', + YGEdgeEnd: 'Edge.End', + YGEdgeLeft: 'Edge.Left', + YGEdgeRight: 'Edge.Right', + YGEdgeStart: 'Edge.Start', + YGEdgeTop: 'Edge.Top', + YGEdgeAll: 'Edge.All', + YGEdgeVertical: 'Edge.Vertical', + YGEdgeHorizontal: 'Edge.Horizontal', + YGGutterAll: 'Gutter.All', + YGGutterColumn: 'Gutter.Column', + YGGutterRow: 'Gutter.Row', + YGFlexDirectionColumn: 'FlexDirection.Column', + YGFlexDirectionColumnReverse: 'FlexDirection.ColumnReverse', + YGFlexDirectionRow: 'FlexDirection.Row', + YGFlexDirectionRowReverse: 'FlexDirection.RowReverse', + YGJustifyCenter: 'Justify.Center', + YGJustifyFlexEnd: 'Justify.FlexEnd', + YGJustifyFlexStart: 'Justify.FlexStart', + YGJustifySpaceAround: 'Justify.SpaceAround', + YGJustifySpaceBetween: 'Justify.SpaceBetween', + YGJustifySpaceEvenly: 'Justify.SpaceEvenly', + YGJustifyStretch: 'Justify.Stretch', + YGJustifyStart: 'Justify.Start', + YGJustifyEnd: 'Justify.End', + YGJustifyAuto: 'Justify.Auto', + YGOverflowHidden: 'Overflow.Hidden', + YGOverflowVisible: 'Overflow.Visible', + YGOverflowScroll: 'Overflow.Scroll', + YGPositionTypeAbsolute: 'PositionType.Absolute', + YGPositionTypeRelative: 'PositionType.Relative', + YGPositionTypeStatic: 'PositionType.Static', + YGWrapNoWrap: 'Wrap.NoWrap', + YGWrapWrap: 'Wrap.Wrap', + YGWrapWrapReverse: 'Wrap.WrapReverse', + YGDisplayFlex: 'Display.Flex', + YGDisplayNone: 'Display.None', + YGDisplayContents: 'Display.Contents', + YGDisplayGrid: 'Display.Grid', + YGBoxSizingBorderBox: 'BoxSizing.BorderBox', + YGBoxSizingContentBox: 'BoxSizing.ContentBox', + }; + + private tr(value: string): string { + return JavascriptEmitter.enumMap[value] ?? value; + } + + constructor() { + super(' '); + } + + emitCommentHeader(fixtureName: string): void { + this.push([ + '/**', + ' * Copyright (c) Meta Platforms, Inc. and affiliates.', + ' *', + ' * This source code is licensed under the MIT license found in the', + ' * LICENSE file in the root directory of this source tree.', + ' *', + ' * MAGIC_PLACEHOLDER', + ' * generated by gentest/src/GentestDriver.ts from gentest/fixtures/' + + fixtureName + + '.html', + ' */', + '', + ]); + } + + emitPrologue(_fixtureName: string): void { + this.push("import { instrinsicSizeMeasureFunc } from '../tools/utils.ts'"); + this.push("import Yoga from 'yoga-layout';"); + this.push('import {'); + this.pushIndent(); + this.push('Align,'); + this.push('BoxSizing,'); + this.push('Direction,'); + this.push('Display,'); + this.push('Edge,'); + this.push('Errata,'); + this.push('ExperimentalFeature,'); + this.push('FlexDirection,'); + this.push('GridTrackType,'); + this.push('Gutter,'); + this.push('Justify,'); + this.push('MeasureMode,'); + this.push('Overflow,'); + this.push('PositionType,'); + this.push('Unit,'); + this.push('Wrap,'); + this.popIndent(); + this.push("} from 'yoga-layout';"); + this.push(''); + } + + emitTestPrologue( + name: string, + experiments: string[], + disabled: boolean, + ): void { + const testFn = disabled ? 'test.skip' : 'test'; + this.push(`${testFn}('${name}', () => {`); + this.pushIndent(); + this.push('const config = Yoga.Config.create();'); + this.push('let root;'); + this.push(''); + + if (experiments.length > 0) { + for (const experiment of experiments) { + this.push( + `config.setExperimentalFeatureEnabled(ExperimentalFeature.${experiment}, true);`, + ); + } + this.push(''); + } + + this.push('try {'); + this.pushIndent(); + } + + emitTestTreePrologue(nodeName: string): void { + if (nodeName === 'root') { + this.push('root = Yoga.Node.create(config);'); + } else { + this.push(`const ${nodeName} = Yoga.Node.create(config);`); + } + } + + emitTestEpilogue(_experiments: string[]): void { + this.popIndent(); + this.push('} finally {'); + this.pushIndent(); + + this.push("if (typeof root !== 'undefined') {"); + this.pushIndent(); + this.push('root.freeRecursive();'); + this.popIndent(); + this.push('}'); + this.push(''); + this.push('config.free();'); + + this.popIndent(); + this.push('}'); + + this.popIndent(); + this.push('});'); + } + + emitEpilogue(): void { + this.push(''); + } + + assertEQ(v0: number, v1: string): void { + this.push(`expect(${v1}).toBe(${v0});`); + } + + layoutGetLeft(node: string): string { + return node + '.getComputedLeft()'; + } + + layoutGetTop(node: string): string { + return node + '.getComputedTop()'; + } + + layoutGetWidth(node: string): string { + return node + '.getComputedWidth()'; + } + + layoutGetHeight(node: string): string { + return node + '.getComputedHeight()'; + } + + insertChild(parent: string, child: string, index: number): void { + this.push(parent + '.insertChild(' + child + ', ' + index + ');'); + } + + calculateLayout( + node: string, + direction: string, + _experiments: string[], + ): void { + this.push( + node + + '.calculateLayout(undefined, undefined, ' + + this.tr(direction) + + ');', + ); + } + + setMeasureFunc(node: string, text: string, flexDirection: string): void { + this.push( + `${node}.setMeasureFunc(instrinsicSizeMeasureFunc.bind({text: "${text}", flexDirection: ${this.tr( + flexDirection, + )}}));`, + ); + } + + setDirection(node: string, value: string): void { + this.push(node + '.setDirection(' + this.tr(value) + ');'); + } + + setFlexDirection(node: string, value: string): void { + this.push(node + '.setFlexDirection(' + this.tr(value) + ');'); + } + + setJustifyContent(node: string, value: string): void { + this.push(node + '.setJustifyContent(' + this.tr(value) + ');'); + } + + setJustifyItems(node: string, value: string): void { + this.push(node + '.setJustifyItems(' + this.tr(value) + ');'); + } + + setJustifySelf(node: string, value: string): void { + this.push(node + '.setJustifySelf(' + this.tr(value) + ');'); + } + + setAlignContent(node: string, value: string): void { + this.push(node + '.setAlignContent(' + this.tr(value) + ');'); + } + + setAlignItems(node: string, value: string): void { + this.push(node + '.setAlignItems(' + this.tr(value) + ');'); + } + + setAlignSelf(node: string, value: string): void { + this.push(node + '.setAlignSelf(' + this.tr(value) + ');'); + } + + setPositionType(node: string, value: string): void { + this.push(node + '.setPositionType(' + this.tr(value) + ');'); + } + + setFlexWrap(node: string, value: string): void { + this.push(node + '.setFlexWrap(' + this.tr(value) + ');'); + } + + setOverflow(node: string, value: string): void { + this.push(node + '.setOverflow(' + this.tr(value) + ');'); + } + + setDisplay(node: string, value: string): void { + this.push(node + '.setDisplay(' + this.tr(value) + ');'); + } + + setBoxSizing(node: string, value: string): void { + this.push(node + '.setBoxSizing(' + this.tr(value) + ');'); + } + + setFlexGrow(node: string, value: string): void { + this.push(node + '.setFlexGrow(' + value + ');'); + } + + setFlexShrink(node: string, value: string): void { + this.push(node + '.setFlexShrink(' + value + ');'); + } + + setFlexBasis(node: string, value: ValueWithUnit): void { + this.push(node + '.setFlexBasis(' + toValueJavascript(value) + ');'); + } + + setWidth(node: string, value: ValueWithUnit): void { + this.push(node + '.setWidth(' + toValueJavascript(value) + ');'); + } + + setHeight(node: string, value: ValueWithUnit): void { + this.push(node + '.setHeight(' + toValueJavascript(value) + ');'); + } + + setMinWidth(node: string, value: ValueWithUnit): void { + this.push(node + '.setMinWidth(' + toValueJavascript(value) + ');'); + } + + setMinHeight(node: string, value: ValueWithUnit): void { + this.push(node + '.setMinHeight(' + toValueJavascript(value) + ');'); + } + + setMaxWidth(node: string, value: ValueWithUnit): void { + this.push(node + '.setMaxWidth(' + toValueJavascript(value) + ');'); + } + + setMaxHeight(node: string, value: ValueWithUnit): void { + this.push(node + '.setMaxHeight(' + toValueJavascript(value) + ');'); + } + + setMargin(node: string, edge: string, value: ValueWithUnit): void { + this.push( + node + + '.setMargin(' + + this.tr(edge) + + ', ' + + toValueJavascript(value) + + ');', + ); + } + + setPadding(node: string, edge: string, value: ValueWithUnit): void { + this.push( + node + + '.setPadding(' + + this.tr(edge) + + ', ' + + toValueJavascript(value) + + ');', + ); + } + + setPosition(node: string, edge: string, value: ValueWithUnit): void { + const v = toValueJavascript(value); + if (v === '"auto"') { + this.push(node + '.setPositionAuto(' + this.tr(edge) + ');'); + } else { + this.push(node + '.setPosition(' + this.tr(edge) + ', ' + v + ');'); + } + } + + setBorder(node: string, edge: string, value: ValueWithUnit): void { + this.push( + node + + '.setBorder(' + + this.tr(edge) + + ', ' + + toValueJavascript(value) + + ');', + ); + } + + setGap(node: string, gutter: string, value: ValueWithUnit): void { + this.push( + node + + '.setGap(' + + this.tr(gutter) + + ', ' + + toValueJavascript(value) + + ');', + ); + } + + setAspectRatio(node: string, value: ValueWithUnit): void { + this.push(node + '.setAspectRatio(' + toValueJavascript(value) + ');'); + } + + private emitGridTrackList( + node: string, + varName: string, + setterName: string, + tracks: GridTrack[], + ): void { + this.push(`const ${node}${varName} = [];`); + for (const track of tracks) { + if (track.type === 'minmax') { + const minVal = formatGridTrackValueJS(track.min); + const maxVal = formatGridTrackValueJS(track.max); + this.push( + `${node}${varName}.push({type: GridTrackType.Minmax, min: ${minVal}, max: ${maxVal}});`, + ); + } else { + const val = formatGridTrackValueJS(track); + this.push(`${node}${varName}.push(${val});`); + } + } + this.push(`${node}.set${setterName}(${node}${varName});`); + } + + setGridTemplateColumns(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList( + node, + 'GridTemplateColumns', + 'GridTemplateColumns', + tracks, + ); + } + + setGridTemplateRows(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList( + node, + 'GridTemplateRows', + 'GridTemplateRows', + tracks, + ); + } + + setGridAutoColumns(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList(node, 'GridAutoColumns', 'GridAutoColumns', tracks); + } + + setGridAutoRows(node: string, tracks: GridTrack[]): void { + this.emitGridTrackList(node, 'GridAutoRows', 'GridAutoRows', tracks); + } + + setGridColumnStart(node: string, value: number): void { + this.push(`${node}.setGridColumnStart(${value});`); + } + + setGridColumnStartSpan(node: string, value: number): void { + this.push(`${node}.setGridColumnStartSpan(${value});`); + } + + setGridColumnEnd(node: string, value: number): void { + this.push(`${node}.setGridColumnEnd(${value});`); + } + + setGridColumnEndSpan(node: string, value: number): void { + this.push(`${node}.setGridColumnEndSpan(${value});`); + } + + setGridRowStart(node: string, value: number): void { + this.push(`${node}.setGridRowStart(${value});`); + } + + setGridRowStartSpan(node: string, value: number): void { + this.push(`${node}.setGridRowStartSpan(${value});`); + } + + setGridRowEnd(node: string, value: number): void { + this.push(`${node}.setGridRowEnd(${value});`); + } + + setGridRowEndSpan(node: string, value: number): void { + this.push(`${node}.setGridRowEndSpan(${value});`); + } +} diff --git a/gentest/src/types.ts b/gentest/src/types.ts new file mode 100644 index 0000000000..3dcf10d5e5 --- /dev/null +++ b/gentest/src/types.ts @@ -0,0 +1,51 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + */ + +export type ValueWithUnit = + | {type: 'points'; value: number} + | {type: 'percent'; value: number} + | {type: 'auto'} + | {type: 'max-content'} + | {type: 'fit-content'} + | {type: 'stretch'} + | {type: 'undefined'}; + +export type GridTrackValue = + | {type: 'auto'} + | {type: 'points'; value: number} + | {type: 'percent'; value: number} + | {type: 'fr'; value: number}; + +export type GridTrack = + | GridTrackValue + | {type: 'minmax'; min: GridTrackValue; max: GridTrackValue}; + +export type ParsedStyles = Map; + +export interface LayoutNode { + id: string; + left: number; + top: number; + width: number; + height: number; + styleAttr: string; + experiments: string[]; + disabled: boolean; + innerText: string; + children: LayoutNode[]; +} + +export interface TestCase { + name: string; + ltrLayout: LayoutNode; + rtlLayout: LayoutNode; + styleAttr: string; + experiments: string[]; + disabled: boolean; +} diff --git a/gentest/test-template.html b/gentest/test-template.html index 9638961b4e..3a44c77f91 100644 --- a/gentest/test-template.html +++ b/gentest/test-template.html @@ -1,30 +1,19 @@ - - %s - - - - - - - -
- - %s - -
-
-
- - %s - -
-
- -
- - %s - +
+ %FIXTURE%
- diff --git a/gentest/tsconfig.json b/gentest/tsconfig.json index 6380e0c6b7..ac29585ce7 100644 --- a/gentest/tsconfig.json +++ b/gentest/tsconfig.json @@ -1,6 +1,13 @@ { - "extends": "@tsconfig/node18/tsconfig.json", "compilerOptions": { - "noEmit": true + "allowImportingTsExtensions": true, + "esModuleInterop": true, + "lib": ["es2023"], + "moduleResolution": "nodenext", + "module": "nodenext", + "noEmit": true, + "skipLibCheck": true, + "strict": true, + "target": "es2022" } } diff --git a/java/com/facebook/yoga/YogaAlign.java b/java/com/facebook/yoga/YogaAlign.java index 00535154fc..6f1c456581 100644 --- a/java/com/facebook/yoga/YogaAlign.java +++ b/java/com/facebook/yoga/YogaAlign.java @@ -18,7 +18,9 @@ public enum YogaAlign { BASELINE(5), SPACE_BETWEEN(6), SPACE_AROUND(7), - SPACE_EVENLY(8); + SPACE_EVENLY(8), + START(9), + END(10); private final int mIntValue; @@ -41,6 +43,8 @@ public static YogaAlign fromInt(int value) { case 6: return SPACE_BETWEEN; case 7: return SPACE_AROUND; case 8: return SPACE_EVENLY; + case 9: return START; + case 10: return END; default: throw new IllegalArgumentException("Unknown enum value: " + value); } } diff --git a/java/com/facebook/yoga/YogaDisplay.java b/java/com/facebook/yoga/YogaDisplay.java index 4dae871936..8e7e0f83cd 100644 --- a/java/com/facebook/yoga/YogaDisplay.java +++ b/java/com/facebook/yoga/YogaDisplay.java @@ -12,7 +12,8 @@ public enum YogaDisplay { FLEX(0), NONE(1), - CONTENTS(2); + CONTENTS(2), + GRID(3); private final int mIntValue; @@ -29,6 +30,7 @@ public static YogaDisplay fromInt(int value) { case 0: return FLEX; case 1: return NONE; case 2: return CONTENTS; + case 3: return GRID; default: throw new IllegalArgumentException("Unknown enum value: " + value); } } diff --git a/java/com/facebook/yoga/YogaGridTrackList.java b/java/com/facebook/yoga/YogaGridTrackList.java new file mode 100644 index 0000000000..ff39ccf899 --- /dev/null +++ b/java/com/facebook/yoga/YogaGridTrackList.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.yoga; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * Represents a list of grid tracks for use with grid-template-rows/columns. + */ +public class YogaGridTrackList { + private final List tracks; + + public YogaGridTrackList() { + this.tracks = new ArrayList<>(); + } + + public void addTrack(YogaGridTrackValue track) { + tracks.add(track); + } + + public List getTracks() { + return Collections.unmodifiableList(tracks); + } + + public int size() { + return tracks.size(); + } + + public YogaGridTrackValue get(int index) { + return tracks.get(index); + } +} diff --git a/java/com/facebook/yoga/YogaGridTrackType.java b/java/com/facebook/yoga/YogaGridTrackType.java new file mode 100644 index 0000000000..e3d22d25be --- /dev/null +++ b/java/com/facebook/yoga/YogaGridTrackType.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// @generated by enums.py + +package com.facebook.yoga; + +public enum YogaGridTrackType { + AUTO(0), + POINTS(1), + PERCENT(2), + FR(3), + MINMAX(4); + + private final int mIntValue; + + YogaGridTrackType(int intValue) { + mIntValue = intValue; + } + + public int intValue() { + return mIntValue; + } + + public static YogaGridTrackType fromInt(int value) { + switch (value) { + case 0: return AUTO; + case 1: return POINTS; + case 2: return PERCENT; + case 3: return FR; + case 4: return MINMAX; + default: throw new IllegalArgumentException("Unknown enum value: " + value); + } + } +} diff --git a/java/com/facebook/yoga/YogaGridTrackValue.java b/java/com/facebook/yoga/YogaGridTrackValue.java new file mode 100644 index 0000000000..b5285e54c2 --- /dev/null +++ b/java/com/facebook/yoga/YogaGridTrackValue.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.yoga; + +/** + * Represents a grid track value for use with grid-template-rows/columns. + */ +public class YogaGridTrackValue { + public enum Type { + AUTO, + POINTS, + PERCENT, + FR, + MINMAX + } + + private final Type type; + private final float value; + private final YogaGridTrackValue minValue; + private final YogaGridTrackValue maxValue; + + private YogaGridTrackValue(Type type, float value) { + this.type = type; + this.value = value; + this.minValue = null; + this.maxValue = null; + } + + private YogaGridTrackValue(YogaGridTrackValue min, YogaGridTrackValue max) { + this.type = Type.MINMAX; + this.value = 0; + this.minValue = min; + this.maxValue = max; + } + + public static YogaGridTrackValue auto() { + return new YogaGridTrackValue(Type.AUTO, 0); + } + + public static YogaGridTrackValue points(float points) { + return new YogaGridTrackValue(Type.POINTS, points); + } + + public static YogaGridTrackValue percent(float percent) { + return new YogaGridTrackValue(Type.PERCENT, percent); + } + + public static YogaGridTrackValue fr(float fr) { + return new YogaGridTrackValue(Type.FR, fr); + } + + public static YogaGridTrackValue minMax(YogaGridTrackValue min, YogaGridTrackValue max) { + return new YogaGridTrackValue(min, max); + } + + public Type getType() { + return type; + } + + public float getValue() { + return value; + } + + public YogaGridTrackValue getMinValue() { + return minValue; + } + + public YogaGridTrackValue getMaxValue() { + return maxValue; + } +} diff --git a/java/com/facebook/yoga/YogaJustify.java b/java/com/facebook/yoga/YogaJustify.java index 4be1ed71d3..778238ec66 100644 --- a/java/com/facebook/yoga/YogaJustify.java +++ b/java/com/facebook/yoga/YogaJustify.java @@ -10,12 +10,16 @@ package com.facebook.yoga; public enum YogaJustify { - FLEX_START(0), - CENTER(1), - FLEX_END(2), - SPACE_BETWEEN(3), - SPACE_AROUND(4), - SPACE_EVENLY(5); + AUTO(0), + FLEX_START(1), + CENTER(2), + FLEX_END(3), + SPACE_BETWEEN(4), + SPACE_AROUND(5), + SPACE_EVENLY(6), + STRETCH(7), + START(8), + END(9); private final int mIntValue; @@ -29,12 +33,16 @@ public int intValue() { public static YogaJustify fromInt(int value) { switch (value) { - case 0: return FLEX_START; - case 1: return CENTER; - case 2: return FLEX_END; - case 3: return SPACE_BETWEEN; - case 4: return SPACE_AROUND; - case 5: return SPACE_EVENLY; + case 0: return AUTO; + case 1: return FLEX_START; + case 2: return CENTER; + case 3: return FLEX_END; + case 4: return SPACE_BETWEEN; + case 5: return SPACE_AROUND; + case 6: return SPACE_EVENLY; + case 7: return STRETCH; + case 8: return START; + case 9: return END; default: throw new IllegalArgumentException("Unknown enum value: " + value); } } diff --git a/java/com/facebook/yoga/YogaNative.kt b/java/com/facebook/yoga/YogaNative.kt index 5ce6a02872..45e28e5aa4 100644 --- a/java/com/facebook/yoga/YogaNative.kt +++ b/java/com/facebook/yoga/YogaNative.kt @@ -328,4 +328,68 @@ public object YogaNative { nativePointer: Long, alwaysFormContainingBlock: Boolean, ) + + @JvmStatic + public external fun jni_YGNodeStyleSetGridTemplateColumnsJNI( + nativePointer: Long, + types: IntArray, + values: FloatArray, + minTypes: IntArray, + minValues: FloatArray, + maxTypes: IntArray, + maxValues: FloatArray, + ) + + @JvmStatic + public external fun jni_YGNodeStyleSetGridTemplateRowsJNI( + nativePointer: Long, + types: IntArray, + values: FloatArray, + minTypes: IntArray, + minValues: FloatArray, + maxTypes: IntArray, + maxValues: FloatArray, + ) + + @JvmStatic + public external fun jni_YGNodeStyleSetGridAutoColumnsJNI( + nativePointer: Long, + types: IntArray, + values: FloatArray, + minTypes: IntArray, + minValues: FloatArray, + maxTypes: IntArray, + maxValues: FloatArray, + ) + + @JvmStatic + public external fun jni_YGNodeStyleSetGridAutoRowsJNI( + nativePointer: Long, + types: IntArray, + values: FloatArray, + minTypes: IntArray, + minValues: FloatArray, + maxTypes: IntArray, + maxValues: FloatArray, + ) + + @JvmStatic + public external fun jni_YGNodeStyleSetGridColumnStartJNI(nativePointer: Long, value: Int) + + @JvmStatic + public external fun jni_YGNodeStyleSetGridColumnStartSpanJNI(nativePointer: Long, span: Int) + + @JvmStatic public external fun jni_YGNodeStyleSetGridColumnEndJNI(nativePointer: Long, value: Int) + + @JvmStatic + public external fun jni_YGNodeStyleSetGridColumnEndSpanJNI(nativePointer: Long, span: Int) + + @JvmStatic public external fun jni_YGNodeStyleSetGridRowStartJNI(nativePointer: Long, value: Int) + + @JvmStatic + public external fun jni_YGNodeStyleSetGridRowStartSpanJNI(nativePointer: Long, span: Int) + + @JvmStatic public external fun jni_YGNodeStyleSetGridRowEndJNI(nativePointer: Long, value: Int) + + @JvmStatic public external fun jni_YGNodeStyleSetGridRowEndSpanJNI(nativePointer: Long, span: Int) } diff --git a/java/com/facebook/yoga/YogaNode.kt b/java/com/facebook/yoga/YogaNode.kt index fbd06f2e1b..4867faa4ad 100644 --- a/java/com/facebook/yoga/YogaNode.kt +++ b/java/com/facebook/yoga/YogaNode.kt @@ -210,6 +210,30 @@ public abstract class YogaNode : YogaProps { public abstract fun setGapPercent(gutter: YogaGutter, gapLength: Float) + public abstract fun setGridTemplateColumns(trackList: YogaGridTrackList) + + public abstract fun setGridTemplateRows(trackList: YogaGridTrackList) + + public abstract fun setGridAutoColumns(trackList: YogaGridTrackList) + + public abstract fun setGridAutoRows(trackList: YogaGridTrackList) + + public abstract fun setGridColumnStart(value: Int) + + public abstract fun setGridColumnStartSpan(span: Int) + + public abstract fun setGridColumnEnd(value: Int) + + public abstract fun setGridColumnEndSpan(span: Int) + + public abstract fun setGridRowStart(value: Int) + + public abstract fun setGridRowStartSpan(span: Int) + + public abstract fun setGridRowEnd(value: Int) + + public abstract fun setGridRowEndSpan(span: Int) + public abstract val layoutX: Float public abstract val layoutY: Float diff --git a/java/com/facebook/yoga/YogaNodeJNIBase.java b/java/com/facebook/yoga/YogaNodeJNIBase.java index 9fb0e51954..999c4bc98c 100644 --- a/java/com/facebook/yoga/YogaNodeJNIBase.java +++ b/java/com/facebook/yoga/YogaNodeJNIBase.java @@ -824,4 +824,140 @@ public void setGap(YogaGutter gutter, float gapLength) { public void setGapPercent(YogaGutter gutter, float gapLength) { YogaNative.jni_YGNodeStyleSetGapPercentJNI(mNativePointer, gutter.intValue(), gapLength); } + + @Override + public void setGridTemplateColumns(YogaGridTrackList trackList) { + int[] types = new int[trackList.size()]; + float[] values = new float[trackList.size()]; + int[] minTypes = new int[trackList.size()]; + float[] minValues = new float[trackList.size()]; + int[] maxTypes = new int[trackList.size()]; + float[] maxValues = new float[trackList.size()]; + + for (int i = 0; i < trackList.size(); i++) { + YogaGridTrackValue track = trackList.get(i); + types[i] = track.getType().ordinal(); + values[i] = track.getValue(); + if (track.getType() == YogaGridTrackValue.Type.MINMAX) { + minTypes[i] = track.getMinValue().getType().ordinal(); + minValues[i] = track.getMinValue().getValue(); + maxTypes[i] = track.getMaxValue().getType().ordinal(); + maxValues[i] = track.getMaxValue().getValue(); + } + } + YogaNative.jni_YGNodeStyleSetGridTemplateColumnsJNI( + mNativePointer, types, values, minTypes, minValues, maxTypes, maxValues); + } + + @Override + public void setGridTemplateRows(YogaGridTrackList trackList) { + int[] types = new int[trackList.size()]; + float[] values = new float[trackList.size()]; + int[] minTypes = new int[trackList.size()]; + float[] minValues = new float[trackList.size()]; + int[] maxTypes = new int[trackList.size()]; + float[] maxValues = new float[trackList.size()]; + + for (int i = 0; i < trackList.size(); i++) { + YogaGridTrackValue track = trackList.get(i); + types[i] = track.getType().ordinal(); + values[i] = track.getValue(); + if (track.getType() == YogaGridTrackValue.Type.MINMAX) { + minTypes[i] = track.getMinValue().getType().ordinal(); + minValues[i] = track.getMinValue().getValue(); + maxTypes[i] = track.getMaxValue().getType().ordinal(); + maxValues[i] = track.getMaxValue().getValue(); + } + } + YogaNative.jni_YGNodeStyleSetGridTemplateRowsJNI( + mNativePointer, types, values, minTypes, minValues, maxTypes, maxValues); + } + + @Override + public void setGridAutoColumns(YogaGridTrackList trackList) { + int[] types = new int[trackList.size()]; + float[] values = new float[trackList.size()]; + int[] minTypes = new int[trackList.size()]; + float[] minValues = new float[trackList.size()]; + int[] maxTypes = new int[trackList.size()]; + float[] maxValues = new float[trackList.size()]; + + for (int i = 0; i < trackList.size(); i++) { + YogaGridTrackValue track = trackList.get(i); + types[i] = track.getType().ordinal(); + values[i] = track.getValue(); + if (track.getType() == YogaGridTrackValue.Type.MINMAX) { + minTypes[i] = track.getMinValue().getType().ordinal(); + minValues[i] = track.getMinValue().getValue(); + maxTypes[i] = track.getMaxValue().getType().ordinal(); + maxValues[i] = track.getMaxValue().getValue(); + } + } + YogaNative.jni_YGNodeStyleSetGridAutoColumnsJNI( + mNativePointer, types, values, minTypes, minValues, maxTypes, maxValues); + } + + @Override + public void setGridAutoRows(YogaGridTrackList trackList) { + int[] types = new int[trackList.size()]; + float[] values = new float[trackList.size()]; + int[] minTypes = new int[trackList.size()]; + float[] minValues = new float[trackList.size()]; + int[] maxTypes = new int[trackList.size()]; + float[] maxValues = new float[trackList.size()]; + + for (int i = 0; i < trackList.size(); i++) { + YogaGridTrackValue track = trackList.get(i); + types[i] = track.getType().ordinal(); + values[i] = track.getValue(); + if (track.getType() == YogaGridTrackValue.Type.MINMAX) { + minTypes[i] = track.getMinValue().getType().ordinal(); + minValues[i] = track.getMinValue().getValue(); + maxTypes[i] = track.getMaxValue().getType().ordinal(); + maxValues[i] = track.getMaxValue().getValue(); + } + } + YogaNative.jni_YGNodeStyleSetGridAutoRowsJNI( + mNativePointer, types, values, minTypes, minValues, maxTypes, maxValues); + } + + @Override + public void setGridColumnStart(int value) { + YogaNative.jni_YGNodeStyleSetGridColumnStartJNI(mNativePointer, value); + } + + @Override + public void setGridColumnStartSpan(int span) { + YogaNative.jni_YGNodeStyleSetGridColumnStartSpanJNI(mNativePointer, span); + } + + @Override + public void setGridColumnEnd(int value) { + YogaNative.jni_YGNodeStyleSetGridColumnEndJNI(mNativePointer, value); + } + + @Override + public void setGridColumnEndSpan(int span) { + YogaNative.jni_YGNodeStyleSetGridColumnEndSpanJNI(mNativePointer, span); + } + + @Override + public void setGridRowStart(int value) { + YogaNative.jni_YGNodeStyleSetGridRowStartJNI(mNativePointer, value); + } + + @Override + public void setGridRowStartSpan(int span) { + YogaNative.jni_YGNodeStyleSetGridRowStartSpanJNI(mNativePointer, span); + } + + @Override + public void setGridRowEnd(int value) { + YogaNative.jni_YGNodeStyleSetGridRowEndJNI(mNativePointer, value); + } + + @Override + public void setGridRowEndSpan(int span) { + YogaNative.jni_YGNodeStyleSetGridRowEndSpanJNI(mNativePointer, span); + } } diff --git a/java/jni/YGJNIVanilla.cpp b/java/jni/YGJNIVanilla.cpp index c5fdd8c791..8aeed52d2e 100644 --- a/java/jni/YGJNIVanilla.cpp +++ b/java/jni/YGJNIVanilla.cpp @@ -6,6 +6,7 @@ */ #include "YGJNIVanilla.h" +#include #include #include #include @@ -762,6 +763,277 @@ static void jni_YGNodeStyleSetGapPercentJNI( // Yoga specific properties, not compatible with flexbox specification YG_NODE_JNI_STYLE_PROP(jfloat, float, AspectRatio); +enum GridTrackType { + GRID_TRACK_AUTO = 0, + GRID_TRACK_POINTS = 1, + GRID_TRACK_PERCENT = 2, + GRID_TRACK_FR = 3, + GRID_TRACK_MINMAX = 4 +}; + +static YGGridTrackValueRef createTrackValue(int type, float value) { + switch (type) { + case GRID_TRACK_AUTO: + return YGAuto(); + case GRID_TRACK_POINTS: + return YGPoints(value); + case GRID_TRACK_PERCENT: + return YGPercent(value); + case GRID_TRACK_FR: + return YGFr(value); + default: + return YGAuto(); + } +} + +static void jni_YGNodeStyleSetGridTemplateColumnsJNI( + JNIEnv* env, + jobject /*obj*/, + jlong nativePointer, + jintArray types, + jfloatArray values, + jintArray minTypes, + jfloatArray minValues, + jintArray maxTypes, + jfloatArray maxValues) { + YGNodeRef node = _jlong2YGNodeRef(nativePointer); + YGGridTrackListRef trackList = YGGridTrackListCreate(); + + jint* typesArr = env->GetIntArrayElements(types, nullptr); + jfloat* valuesArr = env->GetFloatArrayElements(values, nullptr); + jint* minTypesArr = env->GetIntArrayElements(minTypes, nullptr); + jfloat* minValuesArr = env->GetFloatArrayElements(minValues, nullptr); + jint* maxTypesArr = env->GetIntArrayElements(maxTypes, nullptr); + jfloat* maxValuesArr = env->GetFloatArrayElements(maxValues, nullptr); + jsize length = env->GetArrayLength(types); + + for (jsize i = 0; i < length; i++) { + YGGridTrackValueRef trackValue; + if (typesArr[i] == GRID_TRACK_MINMAX) { + YGGridTrackValueRef minVal = + createTrackValue(minTypesArr[i], minValuesArr[i]); + YGGridTrackValueRef maxVal = + createTrackValue(maxTypesArr[i], maxValuesArr[i]); + trackValue = YGMinMax(minVal, maxVal); + } else { + trackValue = createTrackValue(typesArr[i], valuesArr[i]); + } + YGGridTrackListAddTrack(trackList, trackValue); + } + + env->ReleaseIntArrayElements(types, typesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(values, valuesArr, JNI_ABORT); + env->ReleaseIntArrayElements(minTypes, minTypesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(minValues, minValuesArr, JNI_ABORT); + env->ReleaseIntArrayElements(maxTypes, maxTypesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(maxValues, maxValuesArr, JNI_ABORT); + + YGNodeStyleSetGridTemplateColumns(node, trackList); + YGGridTrackListFree(trackList); +} + +static void jni_YGNodeStyleSetGridTemplateRowsJNI( + JNIEnv* env, + jobject /*obj*/, + jlong nativePointer, + jintArray types, + jfloatArray values, + jintArray minTypes, + jfloatArray minValues, + jintArray maxTypes, + jfloatArray maxValues) { + YGNodeRef node = _jlong2YGNodeRef(nativePointer); + YGGridTrackListRef trackList = YGGridTrackListCreate(); + + jint* typesArr = env->GetIntArrayElements(types, nullptr); + jfloat* valuesArr = env->GetFloatArrayElements(values, nullptr); + jint* minTypesArr = env->GetIntArrayElements(minTypes, nullptr); + jfloat* minValuesArr = env->GetFloatArrayElements(minValues, nullptr); + jint* maxTypesArr = env->GetIntArrayElements(maxTypes, nullptr); + jfloat* maxValuesArr = env->GetFloatArrayElements(maxValues, nullptr); + jsize length = env->GetArrayLength(types); + + for (jsize i = 0; i < length; i++) { + YGGridTrackValueRef trackValue; + if (typesArr[i] == GRID_TRACK_MINMAX) { + YGGridTrackValueRef minVal = + createTrackValue(minTypesArr[i], minValuesArr[i]); + YGGridTrackValueRef maxVal = + createTrackValue(maxTypesArr[i], maxValuesArr[i]); + trackValue = YGMinMax(minVal, maxVal); + } else { + trackValue = createTrackValue(typesArr[i], valuesArr[i]); + } + YGGridTrackListAddTrack(trackList, trackValue); + } + + env->ReleaseIntArrayElements(types, typesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(values, valuesArr, JNI_ABORT); + env->ReleaseIntArrayElements(minTypes, minTypesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(minValues, minValuesArr, JNI_ABORT); + env->ReleaseIntArrayElements(maxTypes, maxTypesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(maxValues, maxValuesArr, JNI_ABORT); + + YGNodeStyleSetGridTemplateRows(node, trackList); + YGGridTrackListFree(trackList); +} + +static void jni_YGNodeStyleSetGridAutoColumnsJNI( + JNIEnv* env, + jobject /*obj*/, + jlong nativePointer, + jintArray types, + jfloatArray values, + jintArray minTypes, + jfloatArray minValues, + jintArray maxTypes, + jfloatArray maxValues) { + YGNodeRef node = _jlong2YGNodeRef(nativePointer); + YGGridTrackListRef trackList = YGGridTrackListCreate(); + + jint* typesArr = env->GetIntArrayElements(types, nullptr); + jfloat* valuesArr = env->GetFloatArrayElements(values, nullptr); + jint* minTypesArr = env->GetIntArrayElements(minTypes, nullptr); + jfloat* minValuesArr = env->GetFloatArrayElements(minValues, nullptr); + jint* maxTypesArr = env->GetIntArrayElements(maxTypes, nullptr); + jfloat* maxValuesArr = env->GetFloatArrayElements(maxValues, nullptr); + jsize length = env->GetArrayLength(types); + + for (jsize i = 0; i < length; i++) { + YGGridTrackValueRef trackValue; + if (typesArr[i] == GRID_TRACK_MINMAX) { + YGGridTrackValueRef minVal = + createTrackValue(minTypesArr[i], minValuesArr[i]); + YGGridTrackValueRef maxVal = + createTrackValue(maxTypesArr[i], maxValuesArr[i]); + trackValue = YGMinMax(minVal, maxVal); + } else { + trackValue = createTrackValue(typesArr[i], valuesArr[i]); + } + YGGridTrackListAddTrack(trackList, trackValue); + } + + env->ReleaseIntArrayElements(types, typesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(values, valuesArr, JNI_ABORT); + env->ReleaseIntArrayElements(minTypes, minTypesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(minValues, minValuesArr, JNI_ABORT); + env->ReleaseIntArrayElements(maxTypes, maxTypesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(maxValues, maxValuesArr, JNI_ABORT); + + YGNodeStyleSetGridAutoColumns(node, trackList); + YGGridTrackListFree(trackList); +} + +static void jni_YGNodeStyleSetGridAutoRowsJNI( + JNIEnv* env, + jobject /*obj*/, + jlong nativePointer, + jintArray types, + jfloatArray values, + jintArray minTypes, + jfloatArray minValues, + jintArray maxTypes, + jfloatArray maxValues) { + YGNodeRef node = _jlong2YGNodeRef(nativePointer); + YGGridTrackListRef trackList = YGGridTrackListCreate(); + + jint* typesArr = env->GetIntArrayElements(types, nullptr); + jfloat* valuesArr = env->GetFloatArrayElements(values, nullptr); + jint* minTypesArr = env->GetIntArrayElements(minTypes, nullptr); + jfloat* minValuesArr = env->GetFloatArrayElements(minValues, nullptr); + jint* maxTypesArr = env->GetIntArrayElements(maxTypes, nullptr); + jfloat* maxValuesArr = env->GetFloatArrayElements(maxValues, nullptr); + jsize length = env->GetArrayLength(types); + + for (jsize i = 0; i < length; i++) { + YGGridTrackValueRef trackValue; + if (typesArr[i] == GRID_TRACK_MINMAX) { + YGGridTrackValueRef minVal = + createTrackValue(minTypesArr[i], minValuesArr[i]); + YGGridTrackValueRef maxVal = + createTrackValue(maxTypesArr[i], maxValuesArr[i]); + trackValue = YGMinMax(minVal, maxVal); + } else { + trackValue = createTrackValue(typesArr[i], valuesArr[i]); + } + YGGridTrackListAddTrack(trackList, trackValue); + } + + env->ReleaseIntArrayElements(types, typesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(values, valuesArr, JNI_ABORT); + env->ReleaseIntArrayElements(minTypes, minTypesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(minValues, minValuesArr, JNI_ABORT); + env->ReleaseIntArrayElements(maxTypes, maxTypesArr, JNI_ABORT); + env->ReleaseFloatArrayElements(maxValues, maxValuesArr, JNI_ABORT); + + YGNodeStyleSetGridAutoRows(node, trackList); + YGGridTrackListFree(trackList); +} + +static void jni_YGNodeStyleSetGridColumnStartJNI( + JNIEnv* /*env*/, + jobject /*obj*/, + jlong nativePointer, + jint value) { + YGNodeStyleSetGridColumnStart(_jlong2YGNodeRef(nativePointer), value); +} + +static void jni_YGNodeStyleSetGridColumnStartSpanJNI( + JNIEnv* /*env*/, + jobject /*obj*/, + jlong nativePointer, + jint span) { + YGNodeStyleSetGridColumnStartSpan(_jlong2YGNodeRef(nativePointer), span); +} + +static void jni_YGNodeStyleSetGridColumnEndJNI( + JNIEnv* /*env*/, + jobject /*obj*/, + jlong nativePointer, + jint value) { + YGNodeStyleSetGridColumnEnd(_jlong2YGNodeRef(nativePointer), value); +} + +static void jni_YGNodeStyleSetGridColumnEndSpanJNI( + JNIEnv* /*env*/, + jobject /*obj*/, + jlong nativePointer, + jint span) { + YGNodeStyleSetGridColumnEndSpan(_jlong2YGNodeRef(nativePointer), span); +} + +static void jni_YGNodeStyleSetGridRowStartJNI( + JNIEnv* /*env*/, + jobject /*obj*/, + jlong nativePointer, + jint value) { + YGNodeStyleSetGridRowStart(_jlong2YGNodeRef(nativePointer), value); +} + +static void jni_YGNodeStyleSetGridRowStartSpanJNI( + JNIEnv* /*env*/, + jobject /*obj*/, + jlong nativePointer, + jint span) { + YGNodeStyleSetGridRowStartSpan(_jlong2YGNodeRef(nativePointer), span); +} + +static void jni_YGNodeStyleSetGridRowEndJNI( + JNIEnv* /*env*/, + jobject /*obj*/, + jlong nativePointer, + jint value) { + YGNodeStyleSetGridRowEnd(_jlong2YGNodeRef(nativePointer), value); +} + +static void jni_YGNodeStyleSetGridRowEndSpanJNI( + JNIEnv* /*env*/, + jobject /*obj*/, + jlong nativePointer, + jint span) { + YGNodeStyleSetGridRowEndSpan(_jlong2YGNodeRef(nativePointer), span); +} + static JNINativeMethod methods[] = { {"jni_YGConfigNewJNI", "()J", (void*)jni_YGConfigNewJNI}, {"jni_YGConfigFreeJNI", "(J)V", (void*)jni_YGConfigFreeJNI}, @@ -1070,6 +1342,42 @@ static JNINativeMethod methods[] = { "(JZ)V", (void*)jni_YGNodeSetAlwaysFormsContainingBlockJNI}, {"jni_YGNodeCloneJNI", "(J)J", (void*)jni_YGNodeCloneJNI}, + {"jni_YGNodeStyleSetGridTemplateColumnsJNI", + "(J[I[F[I[F[I[F)V", + (void*)jni_YGNodeStyleSetGridTemplateColumnsJNI}, + {"jni_YGNodeStyleSetGridTemplateRowsJNI", + "(J[I[F[I[F[I[F)V", + (void*)jni_YGNodeStyleSetGridTemplateRowsJNI}, + {"jni_YGNodeStyleSetGridAutoColumnsJNI", + "(J[I[F[I[F[I[F)V", + (void*)jni_YGNodeStyleSetGridAutoColumnsJNI}, + {"jni_YGNodeStyleSetGridAutoRowsJNI", + "(J[I[F[I[F[I[F)V", + (void*)jni_YGNodeStyleSetGridAutoRowsJNI}, + {"jni_YGNodeStyleSetGridColumnStartJNI", + "(JI)V", + (void*)jni_YGNodeStyleSetGridColumnStartJNI}, + {"jni_YGNodeStyleSetGridColumnStartSpanJNI", + "(JI)V", + (void*)jni_YGNodeStyleSetGridColumnStartSpanJNI}, + {"jni_YGNodeStyleSetGridColumnEndJNI", + "(JI)V", + (void*)jni_YGNodeStyleSetGridColumnEndJNI}, + {"jni_YGNodeStyleSetGridColumnEndSpanJNI", + "(JI)V", + (void*)jni_YGNodeStyleSetGridColumnEndSpanJNI}, + {"jni_YGNodeStyleSetGridRowStartJNI", + "(JI)V", + (void*)jni_YGNodeStyleSetGridRowStartJNI}, + {"jni_YGNodeStyleSetGridRowStartSpanJNI", + "(JI)V", + (void*)jni_YGNodeStyleSetGridRowStartSpanJNI}, + {"jni_YGNodeStyleSetGridRowEndJNI", + "(JI)V", + (void*)jni_YGNodeStyleSetGridRowEndJNI}, + {"jni_YGNodeStyleSetGridRowEndSpanJNI", + "(JI)V", + (void*)jni_YGNodeStyleSetGridRowEndSpanJNI}, }; void YGJNIVanilla::registerNatives(JNIEnv* env) { diff --git a/java/tests/generated/com/facebook/yoga/YGAbsolutePositionTest.java b/java/tests/generated/com/facebook/yoga/YGAbsolutePositionTest.java index d8b808e52a..9786ef98b9 100644 --- a/java/tests/generated/com/facebook/yoga/YGAbsolutePositionTest.java +++ b/java/tests/generated/com/facebook/yoga/YGAbsolutePositionTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAbsolutePositionTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAbsolutePositionTest.html */ package com.facebook.yoga; @@ -37,11 +37,11 @@ public void test_absolute_layout_width_height_start_top() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setWidth(10f); + root_child0.setHeight(10f); root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setPosition(YogaEdge.START, 10f); root_child0.setPosition(YogaEdge.TOP, 10f); - root_child0.setWidth(10f); - root_child0.setHeight(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -80,11 +80,11 @@ public void test_absolute_layout_width_height_left_auto_right() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setWidth(10f); + root_child0.setHeight(10f); root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setPositionAuto(YogaEdge.LEFT); root_child0.setPosition(YogaEdge.RIGHT, 10f); - root_child0.setWidth(10f); - root_child0.setHeight(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -123,11 +123,11 @@ public void test_absolute_layout_width_height_left_right_auto() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setWidth(10f); + root_child0.setHeight(10f); root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setPosition(YogaEdge.LEFT, 10f); root_child0.setPositionAuto(YogaEdge.RIGHT); - root_child0.setWidth(10f); - root_child0.setHeight(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -166,11 +166,11 @@ public void test_absolute_layout_width_height_left_auto_right_auto() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setWidth(10f); + root_child0.setHeight(10f); root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setPositionAuto(YogaEdge.LEFT); root_child0.setPositionAuto(YogaEdge.RIGHT); - root_child0.setWidth(10f); - root_child0.setHeight(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -209,11 +209,11 @@ public void test_absolute_layout_width_height_end_bottom() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setWidth(10f); + root_child0.setHeight(10f); root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setPosition(YogaEdge.END, 10f); root_child0.setPosition(YogaEdge.BOTTOM, 10f); - root_child0.setWidth(10f); - root_child0.setHeight(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -295,13 +295,13 @@ public void test_absolute_layout_width_height_start_top_end_bottom() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setWidth(10f); + root_child0.setHeight(10f); root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setPosition(YogaEdge.START, 10f); root_child0.setPosition(YogaEdge.TOP, 10f); root_child0.setPosition(YogaEdge.END, 10f); root_child0.setPosition(YogaEdge.BOTTOM, 10f); - root_child0.setWidth(10f); - root_child0.setHeight(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -335,11 +335,11 @@ public void test_do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_ YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setOverflow(YogaOverflow.HIDDEN); - root.setWidth(50f); root.setHeight(50f); + root.setWidth(50f); + root.setOverflow(YogaOverflow.HIDDEN); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -394,59 +394,44 @@ public void test_absolute_layout_within_border() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.LEFT, 10f); - root.setMargin(YogaEdge.TOP, 10f); - root.setMargin(YogaEdge.RIGHT, 10f); - root.setMargin(YogaEdge.BOTTOM, 10f); - root.setPadding(YogaEdge.LEFT, 10); - root.setPadding(YogaEdge.TOP, 10); - root.setPadding(YogaEdge.RIGHT, 10); - root.setPadding(YogaEdge.BOTTOM, 10); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setBorder(YogaEdge.ALL, 10f); + root.setMargin(YogaEdge.ALL, 10f); + root.setPadding(YogaEdge.ALL, 10); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setPosition(YogaEdge.LEFT, 0f); - root_child0.setPosition(YogaEdge.TOP, 0f); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setPosition(YogaEdge.LEFT, 0f); + root_child0.setPosition(YogaEdge.TOP, 0f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setPositionType(YogaPositionType.ABSOLUTE); - root_child1.setPosition(YogaEdge.RIGHT, 0f); - root_child1.setPosition(YogaEdge.BOTTOM, 0f); root_child1.setWidth(50f); root_child1.setHeight(50f); + root_child1.setPosition(YogaEdge.RIGHT, 0f); + root_child1.setPosition(YogaEdge.BOTTOM, 0f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); root_child2.setPositionType(YogaPositionType.ABSOLUTE); - root_child2.setPosition(YogaEdge.LEFT, 0f); - root_child2.setPosition(YogaEdge.TOP, 0f); - root_child2.setMargin(YogaEdge.LEFT, 10f); - root_child2.setMargin(YogaEdge.TOP, 10f); - root_child2.setMargin(YogaEdge.RIGHT, 10f); - root_child2.setMargin(YogaEdge.BOTTOM, 10f); root_child2.setWidth(50f); root_child2.setHeight(50f); + root_child2.setPosition(YogaEdge.LEFT, 0f); + root_child2.setPosition(YogaEdge.TOP, 0f); + root_child2.setMargin(YogaEdge.ALL, 10f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); root_child3.setPositionType(YogaPositionType.ABSOLUTE); - root_child3.setPosition(YogaEdge.RIGHT, 0f); - root_child3.setPosition(YogaEdge.BOTTOM, 0f); - root_child3.setMargin(YogaEdge.LEFT, 10f); - root_child3.setMargin(YogaEdge.TOP, 10f); - root_child3.setMargin(YogaEdge.RIGHT, 10f); - root_child3.setMargin(YogaEdge.BOTTOM, 10f); root_child3.setWidth(50f); root_child3.setHeight(50f); + root_child3.setPosition(YogaEdge.RIGHT, 0f); + root_child3.setPosition(YogaEdge.BOTTOM, 0f); + root_child3.setMargin(YogaEdge.ALL, 10f); root.addChildAt(root_child3, 3); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -510,12 +495,12 @@ public void test_absolute_layout_align_items_and_justify_content_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); - root.setWidth(110f); root.setHeight(100f); + root.setWidth(110f); + root.setFlexGrow(1f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -554,12 +539,12 @@ public void test_absolute_layout_align_items_and_justify_content_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.FLEX_END); - root.setAlignItems(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); - root.setWidth(110f); root.setHeight(100f); + root.setWidth(110f); + root.setFlexGrow(1f); + root.setAlignItems(YogaAlign.FLEX_END); + root.setJustifyContent(YogaJustify.FLEX_END); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -598,11 +583,11 @@ public void test_absolute_layout_justify_content_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); - root.setWidth(110f); root.setHeight(100f); + root.setWidth(110f); + root.setFlexGrow(1f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -641,11 +626,11 @@ public void test_absolute_layout_align_items_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); - root.setWidth(110f); root.setHeight(100f); + root.setWidth(110f); + root.setFlexGrow(1f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -685,15 +670,15 @@ public void test_absolute_layout_align_items_center_on_child_only() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); - root.setWidth(110f); root.setHeight(100f); + root.setWidth(110f); + root.setFlexGrow(1f); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.CENTER); root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidth(60f); root_child0.setHeight(40f); + root_child0.setAlignSelf(YogaAlign.CENTER); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -727,18 +712,18 @@ public void test_absolute_layout_align_items_and_justify_content_center_and_top_ YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); - root.setWidth(110f); root.setHeight(100f); + root.setWidth(110f); + root.setFlexGrow(1f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setPosition(YogaEdge.TOP, 10f); root_child0.setWidth(60f); root_child0.setHeight(40f); + root_child0.setPosition(YogaEdge.TOP, 10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -772,18 +757,18 @@ public void test_absolute_layout_align_items_and_justify_content_center_and_bott YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); - root.setWidth(110f); root.setHeight(100f); + root.setWidth(110f); + root.setFlexGrow(1f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setPosition(YogaEdge.BOTTOM, 10f); root_child0.setWidth(60f); root_child0.setHeight(40f); + root_child0.setPosition(YogaEdge.BOTTOM, 10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -817,18 +802,18 @@ public void test_absolute_layout_align_items_and_justify_content_center_and_left YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); - root.setWidth(110f); root.setHeight(100f); + root.setWidth(110f); + root.setFlexGrow(1f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setPosition(YogaEdge.LEFT, 5f); root_child0.setWidth(60f); root_child0.setHeight(40f); + root_child0.setPosition(YogaEdge.LEFT, 5f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -862,18 +847,18 @@ public void test_absolute_layout_align_items_and_justify_content_center_and_righ YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); - root.setWidth(110f); root.setHeight(100f); + root.setWidth(110f); + root.setFlexGrow(1f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setPosition(YogaEdge.RIGHT, 5f); root_child0.setWidth(60f); root_child0.setHeight(40f); + root_child0.setPosition(YogaEdge.RIGHT, 5f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -908,9 +893,9 @@ public void test_position_root_with_rtl_should_position_withoutdirection() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPosition(YogaEdge.LEFT, 72f); - root.setWidth(52f); root.setHeight(52f); + root.setWidth(52f); + root.setPosition(YogaEdge.LEFT, 72f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -954,8 +939,8 @@ public void test_absolute_layout_percentage_bottom_based_on_parent_height() { final YogaNode root_child2 = createNode(config); root_child2.setPositionType(YogaPositionType.ABSOLUTE); root_child2.setPositionPercent(YogaEdge.TOP, 10f); - root_child2.setPositionPercent(YogaEdge.BOTTOM, 10f); root_child2.setWidth(10f); + root_child2.setPositionPercent(YogaEdge.BOTTOM, 10f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1010,14 +995,14 @@ public void test_absolute_layout_in_wrap_reverse_column_container() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP_REVERSE); final YogaNode root_child0 = createNode(config); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1051,16 +1036,16 @@ public void test_absolute_layout_in_wrap_reverse_row_container() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(100f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP_REVERSE); final YogaNode root_child0 = createNode(config); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1095,15 +1080,15 @@ public void test_absolute_layout_in_wrap_reverse_column_container_flex_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP_REVERSE); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.FLEX_END); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0.setAlignSelf(YogaAlign.FLEX_END); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1137,17 +1122,17 @@ public void test_absolute_layout_in_wrap_reverse_row_container_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(100f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP_REVERSE); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.FLEX_END); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0.setAlignSelf(YogaAlign.FLEX_END); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1189,11 +1174,11 @@ public void test_percent_absolute_position_infinite_height() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setPositionType(YogaPositionType.ABSOLUTE); - root_child1.setPositionPercent(YogaEdge.LEFT, 20f); - root_child1.setPositionPercent(YogaEdge.TOP, 20f); root_child1.setWidthPercent(20f); root_child1.setHeightPercent(20f); + root_child1.setPositionPercent(YogaEdge.LEFT, 20f); + root_child1.setPositionPercent(YogaEdge.TOP, 20f); + root_child1.setPositionType(YogaPositionType.ABSOLUTE); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1238,15 +1223,15 @@ public void test_absolute_layout_percentage_height_based_on_padded_parent() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.TOP, 10); - root.setBorder(YogaEdge.TOP, 10f); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.TOP, 10); + root.setBorder(YogaEdge.TOP, 10f); final YogaNode root_child0 = createNode(config); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidth(100f); root_child0.setHeightPercent(50f); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1280,12 +1265,12 @@ public void test_absolute_layout_percentage_height_based_on_padded_parent_and_al YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setAlignItems(YogaAlign.CENTER); - root.setPadding(YogaEdge.TOP, 20); - root.setPadding(YogaEdge.BOTTOM, 20); + root.setJustifyContent(YogaJustify.CENTER); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.TOP, 20); + root.setPadding(YogaEdge.BOTTOM, 20); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -1325,9 +1310,9 @@ public void test_absolute_layout_padding_left() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 100); root.setWidth(200f); root.setHeight(200f); + root.setPadding(YogaEdge.LEFT, 100); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -1367,9 +1352,9 @@ public void test_absolute_layout_padding_right() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.RIGHT, 100); root.setWidth(200f); root.setHeight(200f); + root.setPadding(YogaEdge.RIGHT, 100); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -1409,9 +1394,9 @@ public void test_absolute_layout_padding_top() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.TOP, 100); root.setWidth(200f); root.setHeight(200f); + root.setPadding(YogaEdge.TOP, 100); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -1451,9 +1436,9 @@ public void test_absolute_layout_padding_bottom() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.BOTTOM, 100); root.setWidth(200f); root.setHeight(200f); + root.setPadding(YogaEdge.BOTTOM, 100); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); @@ -1495,22 +1480,16 @@ public void test_absolute_layout_padding() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 10f); - root_child0.setMargin(YogaEdge.TOP, 10f); - root_child0.setMargin(YogaEdge.RIGHT, 10f); - root_child0.setMargin(YogaEdge.BOTTOM, 10f); root_child0.setWidth(200f); root_child0.setHeight(200f); + root_child0.setMargin(YogaEdge.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setPadding(YogaEdge.LEFT, 50); - root_child0_child0.setPadding(YogaEdge.TOP, 50); - root_child0_child0.setPadding(YogaEdge.RIGHT, 50); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 50); root_child0_child0.setWidth(200f); root_child0_child0.setHeight(200f); + root_child0_child0.setPadding(YogaEdge.ALL, 50); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); @@ -1573,22 +1552,16 @@ public void test_absolute_layout_border() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 10f); - root_child0.setMargin(YogaEdge.TOP, 10f); - root_child0.setMargin(YogaEdge.RIGHT, 10f); - root_child0.setMargin(YogaEdge.BOTTOM, 10f); root_child0.setWidth(200f); root_child0.setHeight(200f); + root_child0.setMargin(YogaEdge.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setBorder(YogaEdge.LEFT, 10f); - root_child0_child0.setBorder(YogaEdge.TOP, 10f); - root_child0_child0.setBorder(YogaEdge.RIGHT, 10f); - root_child0_child0.setBorder(YogaEdge.BOTTOM, 10f); root_child0_child0.setWidth(200f); root_child0_child0.setHeight(200f); + root_child0_child0.setBorder(YogaEdge.ALL, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); @@ -1648,21 +1621,21 @@ public void test_absolute_layout_column_reverse_margin_border() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0.setWidth(50f); + root_child0.setHeight(50f); root_child0.setPosition(YogaEdge.LEFT, 5f); root_child0.setPosition(YogaEdge.RIGHT, 3f); - root_child0.setMargin(YogaEdge.LEFT, 3f); root_child0.setMargin(YogaEdge.RIGHT, 4f); - root_child0.setBorder(YogaEdge.LEFT, 1f); + root_child0.setMargin(YogaEdge.LEFT, 3f); root_child0.setBorder(YogaEdge.RIGHT, 7f); - root_child0.setWidth(50f); - root_child0.setHeight(50f); + root_child0.setBorder(YogaEdge.LEFT, 1f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/java/tests/generated/com/facebook/yoga/YGAlignContentTest.java b/java/tests/generated/com/facebook/yoga/YGAlignContentTest.java index 5dda123744..6ebd705097 100644 --- a/java/tests/generated/com/facebook/yoga/YGAlignContentTest.java +++ b/java/tests/generated/com/facebook/yoga/YGAlignContentTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignContentTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAlignContentTest.html */ package com.facebook.yoga; @@ -32,10 +32,10 @@ public void test_align_content_flex_start_nowrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -88,11 +88,11 @@ public void test_align_content_flex_start_wrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -190,11 +190,11 @@ public void test_align_content_flex_start_wrap_singleline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -248,17 +248,14 @@ public void test_align_content_flex_start_wrapped_negative_space() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -339,20 +336,16 @@ public void test_align_content_flex_start_wrapped_negative_space_gap() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); - root_child0.setGap(YogaGutter.COLUMN, 10f); - root_child0.setGap(YogaGutter.ROW, 10f); + root_child0.setGap(YogaGutter.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -432,9 +425,9 @@ public void test_align_content_flex_start_without_height_on_children() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -530,20 +523,20 @@ public void test_align_content_flex_start_with_flex() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); + root_child0.setWidth(50f); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(0f); - root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setWidth(50f); root_child1.setFlexGrow(1f); root_child1.setFlexBasisPercent(0f); - root_child1.setWidth(50f); root_child1.setHeight(10f); root.addChildAt(root_child1, 1); @@ -552,10 +545,10 @@ public void test_align_content_flex_start_with_flex() { root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setWidth(50f); root_child3.setFlexGrow(1f); root_child3.setFlexShrink(1f); root_child3.setFlexBasisPercent(0f); - root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); @@ -633,11 +626,11 @@ public void test_align_content_flex_end_nowrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -690,12 +683,12 @@ public void test_align_content_flex_end_wrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -793,12 +786,12 @@ public void test_align_content_flex_end_wrap_singleline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -852,18 +845,15 @@ public void test_align_content_flex_end_wrapped_negative_space() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.FLEX_END); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.FLEX_END); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -944,21 +934,17 @@ public void test_align_content_flex_end_wrapped_negative_space_gap() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.FLEX_END); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.FLEX_END); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); - root_child0.setGap(YogaGutter.COLUMN, 10f); - root_child0.setGap(YogaGutter.ROW, 10f); + root_child0.setGap(YogaGutter.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1037,11 +1023,11 @@ public void test_align_content_center_nowrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1094,12 +1080,12 @@ public void test_align_content_center_wrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1197,12 +1183,12 @@ public void test_align_content_center_wrap_singleline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1256,18 +1242,15 @@ public void test_align_content_center_wrapped_negative_space() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.CENTER); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.CENTER); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -1348,21 +1331,17 @@ public void test_align_content_center_wrapped_negative_space_gap() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.CENTER); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.CENTER); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); - root_child0.setGap(YogaGutter.COLUMN, 10f); - root_child0.setGap(YogaGutter.ROW, 10f); + root_child0.setGap(YogaGutter.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1441,11 +1420,11 @@ public void test_align_content_space_between_nowrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_BETWEEN); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.SPACE_BETWEEN); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1498,12 +1477,12 @@ public void test_align_content_space_between_wrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_BETWEEN); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.SPACE_BETWEEN); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1601,12 +1580,12 @@ public void test_align_content_space_between_wrap_singleline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_BETWEEN); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.SPACE_BETWEEN); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1660,18 +1639,15 @@ public void test_align_content_space_between_wrapped_negative_space() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.SPACE_BETWEEN); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.SPACE_BETWEEN); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -1752,18 +1728,15 @@ public void test_align_content_space_between_wrapped_negative_space_row_reverse( final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.SPACE_BETWEEN); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.SPACE_BETWEEN); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -1844,21 +1817,17 @@ public void test_align_content_space_between_wrapped_negative_space_gap() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.SPACE_BETWEEN); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.SPACE_BETWEEN); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); - root_child0.setGap(YogaGutter.COLUMN, 10f); - root_child0.setGap(YogaGutter.ROW, 10f); + root_child0.setGap(YogaGutter.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1937,11 +1906,11 @@ public void test_align_content_space_around_nowrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_AROUND); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.SPACE_AROUND); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1994,12 +1963,12 @@ public void test_align_content_space_around_wrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_AROUND); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.SPACE_AROUND); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -2097,12 +2066,12 @@ public void test_align_content_space_around_wrap_singleline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_AROUND); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.SPACE_AROUND); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -2156,18 +2125,15 @@ public void test_align_content_space_around_wrapped_negative_space() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.SPACE_AROUND); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.SPACE_AROUND); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -2248,18 +2214,15 @@ public void test_align_content_space_around_wrapped_negative_space_row_reverse() final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.SPACE_AROUND); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.SPACE_AROUND); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -2340,21 +2303,17 @@ public void test_align_content_space_around_wrapped_negative_space_gap() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.SPACE_AROUND); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.SPACE_AROUND); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); - root_child0.setGap(YogaGutter.COLUMN, 10f); - root_child0.setGap(YogaGutter.ROW, 10f); + root_child0.setGap(YogaGutter.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2433,11 +2392,11 @@ public void test_align_content_space_evenly_nowrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(140f); root.setHeight(120f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -2490,12 +2449,12 @@ public void test_align_content_space_evenly_wrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -2593,12 +2552,12 @@ public void test_align_content_space_evenly_wrap_singleline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(140f); root.setHeight(120f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -2652,18 +2611,15 @@ public void test_align_content_space_evenly_wrapped_negative_space() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.SPACE_EVENLY); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.SPACE_EVENLY); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -2744,21 +2700,17 @@ public void test_align_content_space_evenly_wrapped_negative_space_gap() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 60f); - root.setBorder(YogaEdge.TOP, 60f); - root.setBorder(YogaEdge.RIGHT, 60f); - root.setBorder(YogaEdge.BOTTOM, 60f); root.setWidth(320f); root.setHeight(320f); + root.setBorder(YogaEdge.ALL, 60f); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.CENTER); - root_child0.setAlignContent(YogaAlign.SPACE_EVENLY); root_child0.setWrap(YogaWrap.WRAP); + root_child0.setAlignContent(YogaAlign.SPACE_EVENLY); + root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setHeight(10f); - root_child0.setGap(YogaGutter.COLUMN, 10f); - root_child0.setGap(YogaGutter.ROW, 10f); + root_child0.setGap(YogaGutter.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2837,11 +2789,11 @@ public void test_align_content_stretch() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -2934,12 +2886,12 @@ public void test_align_content_stretch_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -3032,12 +2984,12 @@ public void test_align_content_stretch_row_with_children() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -3146,22 +3098,22 @@ public void test_align_content_stretch_row_with_flex() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setWidth(50f); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); - root_child1.setWidth(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -3169,10 +3121,10 @@ public void test_align_content_stretch_row_with_flex() { root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setWidth(50f); root_child3.setFlexGrow(1f); root_child3.setFlexShrink(1f); root_child3.setFlexBasisPercent(0f); - root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); @@ -3250,22 +3202,22 @@ public void test_align_content_stretch_row_with_flex_no_shrink() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setWidth(50f); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); - root_child1.setWidth(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -3273,9 +3225,9 @@ public void test_align_content_stretch_row_with_flex_no_shrink() { root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); + root_child3.setWidth(50f); root_child3.setFlexGrow(1f); root_child3.setFlexBasisPercent(0f); - root_child3.setWidth(50f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); @@ -3353,23 +3305,20 @@ public void test_align_content_stretch_row_with_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setMargin(YogaEdge.LEFT, 10f); - root_child1.setMargin(YogaEdge.TOP, 10f); - root_child1.setMargin(YogaEdge.RIGHT, 10f); - root_child1.setMargin(YogaEdge.BOTTOM, 10f); root_child1.setWidth(50f); + root_child1.setMargin(YogaEdge.ALL, 10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -3377,11 +3326,8 @@ public void test_align_content_stretch_row_with_margin() { root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setMargin(YogaEdge.LEFT, 10f); - root_child3.setMargin(YogaEdge.TOP, 10f); - root_child3.setMargin(YogaEdge.RIGHT, 10f); - root_child3.setMargin(YogaEdge.BOTTOM, 10f); root_child3.setWidth(50f); + root_child3.setMargin(YogaEdge.ALL, 10f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); @@ -3459,23 +3405,20 @@ public void test_align_content_stretch_row_with_padding() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setPadding(YogaEdge.LEFT, 10); - root_child1.setPadding(YogaEdge.TOP, 10); - root_child1.setPadding(YogaEdge.RIGHT, 10); - root_child1.setPadding(YogaEdge.BOTTOM, 10); root_child1.setWidth(50f); + root_child1.setPadding(YogaEdge.ALL, 10); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -3483,11 +3426,8 @@ public void test_align_content_stretch_row_with_padding() { root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setPadding(YogaEdge.LEFT, 10); - root_child3.setPadding(YogaEdge.TOP, 10); - root_child3.setPadding(YogaEdge.RIGHT, 10); - root_child3.setPadding(YogaEdge.BOTTOM, 10); root_child3.setWidth(50f); + root_child3.setPadding(YogaEdge.ALL, 10); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); @@ -3565,12 +3505,12 @@ public void test_align_content_stretch_row_with_single_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -3621,12 +3561,12 @@ public void test_align_content_stretch_row_with_fixed_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -3720,12 +3660,12 @@ public void test_align_content_stretch_row_with_max_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -3819,12 +3759,12 @@ public void test_align_content_stretch_row_with_min_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -3918,11 +3858,11 @@ public void test_align_content_stretch_column() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(150f); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setHeight(50f); @@ -3935,10 +3875,10 @@ public void test_align_content_stretch_column() { root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setHeight(50f); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); - root_child1.setHeight(50f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -4034,21 +3974,21 @@ public void test_align_content_stretch_is_not_overriding_align_items() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setAlignContent(YogaAlign.STRETCH); - root_child0.setAlignItems(YogaAlign.CENTER); root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setAlignItems(YogaAlign.CENTER); + root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setAlignContent(YogaAlign.STRETCH); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setAlignContent(YogaAlign.STRETCH); - root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setWidth(10f); + root_child0_child0.setAlignContent(YogaAlign.STRETCH); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4092,12 +4032,12 @@ public void test_align_content_stretch_with_min_cross_axis() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(500f); root.setMinHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(400f); @@ -4150,12 +4090,12 @@ public void test_align_content_stretch_with_max_cross_axis() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(500f); root.setMaxHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(400f); @@ -4208,20 +4148,14 @@ public void test_align_content_stretch_with_max_cross_axis_and_border_padding() YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setPadding(YogaEdge.LEFT, 2); - root.setPadding(YogaEdge.TOP, 2); - root.setPadding(YogaEdge.RIGHT, 2); - root.setPadding(YogaEdge.BOTTOM, 2); - root.setBorder(YogaEdge.LEFT, 5f); - root.setBorder(YogaEdge.TOP, 5f); - root.setBorder(YogaEdge.RIGHT, 5f); - root.setBorder(YogaEdge.BOTTOM, 5f); root.setWidth(500f); root.setMaxHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.STRETCH); + root.setBorder(YogaEdge.ALL, 5f); + root.setPadding(YogaEdge.ALL, 2); final YogaNode root_child0 = createNode(config); root_child0.setWidth(400f); @@ -4274,12 +4208,12 @@ public void test_align_content_space_evenly_with_min_cross_axis() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(500f); root.setMinHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); root_child0.setWidth(400f); @@ -4332,12 +4266,12 @@ public void test_align_content_space_evenly_with_max_cross_axis() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(500f); root.setMaxHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); root_child0.setWidth(400f); @@ -4390,12 +4324,12 @@ public void test_align_content_space_evenly_with_max_cross_axis_violated() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(500f); root.setMaxHeight(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); root_child0.setWidth(400f); @@ -4448,20 +4382,14 @@ public void test_align_content_space_evenly_with_max_cross_axis_violated_padding YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setPadding(YogaEdge.LEFT, 2); - root.setPadding(YogaEdge.TOP, 2); - root.setPadding(YogaEdge.RIGHT, 2); - root.setPadding(YogaEdge.BOTTOM, 2); - root.setBorder(YogaEdge.LEFT, 5f); - root.setBorder(YogaEdge.TOP, 5f); - root.setBorder(YogaEdge.RIGHT, 5f); - root.setBorder(YogaEdge.BOTTOM, 5f); root.setWidth(500f); root.setMaxHeight(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.SPACE_EVENLY); + root.setBorder(YogaEdge.ALL, 5f); + root.setPadding(YogaEdge.ALL, 2); final YogaNode root_child0 = createNode(config); root_child0.setWidth(400f); @@ -4514,27 +4442,27 @@ public void test_align_content_space_around_and_align_items_flex_end_with_flex_w YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_AROUND); - root.setAlignItems(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(300f); root.setHeight(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.SPACE_AROUND); + root.setAlignItems(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(150f); root_child0.setHeight(50f); + root_child0.setWidth(150f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(120f); root_child1.setHeight(100f); + root_child1.setWidth(120f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(120f); root_child2.setHeight(50f); + root_child2.setWidth(120f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4588,27 +4516,27 @@ public void test_align_content_space_around_and_align_items_center_with_flex_wra YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_AROUND); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(300f); root.setHeight(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.SPACE_AROUND); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(150f); root_child0.setHeight(50f); + root_child0.setWidth(150f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(120f); root_child1.setHeight(100f); + root_child1.setWidth(120f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(120f); root_child2.setHeight(50f); + root_child2.setWidth(120f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4662,27 +4590,27 @@ public void test_align_content_space_around_and_align_items_flex_start_with_flex YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_AROUND); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(300f); root.setHeight(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.SPACE_AROUND); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(150f); root_child0.setHeight(50f); + root_child0.setWidth(150f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(120f); root_child1.setHeight(100f); + root_child1.setWidth(120f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(120f); root_child2.setHeight(50f); + root_child2.setWidth(120f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4736,61 +4664,61 @@ public void test_align_content_flex_start_stretch_doesnt_influence_line_box_dim( YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 20); + root.setWidth(400f); + root.setFlexDirection(YogaFlexDirection.ROW); root.setPadding(YogaEdge.TOP, 20); - root.setPadding(YogaEdge.RIGHT, 20); root.setPadding(YogaEdge.BOTTOM, 20); - root.setWidth(400f); + root.setPadding(YogaEdge.LEFT, 20); + root.setPadding(YogaEdge.RIGHT, 20); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.RIGHT, 20f); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setMargin(YogaEdge.RIGHT, 20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setFlexDirection(YogaFlexDirection.ROW); root_child1.setWrap(YogaWrap.WRAP); - root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); - root_child1_child0.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child0.setWidth(30f); root_child1_child0.setHeight(30f); + root_child1_child0.setWidth(30f); + root_child1_child0.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child1_child1 = createNode(config); - root_child1_child1.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child1.setWidth(30f); root_child1_child1.setHeight(30f); + root_child1_child1.setWidth(30f); + root_child1_child1.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child1, 1); final YogaNode root_child1_child2 = createNode(config); - root_child1_child2.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child2.setWidth(30f); root_child1_child2.setHeight(30f); + root_child1_child2.setWidth(30f); + root_child1_child2.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child1_child3 = createNode(config); - root_child1_child3.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child3.setWidth(30f); root_child1_child3.setHeight(30f); + root_child1_child3.setWidth(30f); + root_child1_child3.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child3, 3); final YogaNode root_child1_child4 = createNode(config); - root_child1_child4.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child4.setWidth(30f); root_child1_child4.setHeight(30f); + root_child1_child4.setWidth(30f); + root_child1_child4.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child4, 4); final YogaNode root_child2 = createNode(config); - root_child2.setMargin(YogaEdge.LEFT, 20f); - root_child2.setWidth(50f); root_child2.setHeight(50f); + root_child2.setWidth(50f); + root_child2.setMargin(YogaEdge.LEFT, 20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4894,62 +4822,62 @@ public void test_align_content_stretch_stretch_does_influence_line_box_dim() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 20); + root.setWidth(400f); + root.setFlexDirection(YogaFlexDirection.ROW); root.setPadding(YogaEdge.TOP, 20); - root.setPadding(YogaEdge.RIGHT, 20); root.setPadding(YogaEdge.BOTTOM, 20); - root.setWidth(400f); + root.setPadding(YogaEdge.LEFT, 20); + root.setPadding(YogaEdge.RIGHT, 20); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.RIGHT, 20f); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setMargin(YogaEdge.RIGHT, 20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setFlexDirection(YogaFlexDirection.ROW); - root_child1.setAlignContent(YogaAlign.STRETCH); root_child1.setWrap(YogaWrap.WRAP); - root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); + root_child1.setFlexGrow(1f); + root_child1.setAlignContent(YogaAlign.STRETCH); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); - root_child1_child0.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child0.setWidth(30f); root_child1_child0.setHeight(30f); + root_child1_child0.setWidth(30f); + root_child1_child0.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child1_child1 = createNode(config); - root_child1_child1.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child1.setWidth(30f); root_child1_child1.setHeight(30f); + root_child1_child1.setWidth(30f); + root_child1_child1.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child1, 1); final YogaNode root_child1_child2 = createNode(config); - root_child1_child2.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child2.setWidth(30f); root_child1_child2.setHeight(30f); + root_child1_child2.setWidth(30f); + root_child1_child2.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child1_child3 = createNode(config); - root_child1_child3.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child3.setWidth(30f); root_child1_child3.setHeight(30f); + root_child1_child3.setWidth(30f); + root_child1_child3.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child3, 3); final YogaNode root_child1_child4 = createNode(config); - root_child1_child4.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child4.setWidth(30f); root_child1_child4.setHeight(30f); + root_child1_child4.setWidth(30f); + root_child1_child4.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child4, 4); final YogaNode root_child2 = createNode(config); - root_child2.setMargin(YogaEdge.LEFT, 20f); - root_child2.setWidth(50f); root_child2.setHeight(50f); + root_child2.setWidth(50f); + root_child2.setMargin(YogaEdge.LEFT, 20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5053,62 +4981,62 @@ public void test_align_content_space_evenly_stretch_does_influence_line_box_dim( YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 20); + root.setWidth(400f); + root.setFlexDirection(YogaFlexDirection.ROW); root.setPadding(YogaEdge.TOP, 20); - root.setPadding(YogaEdge.RIGHT, 20); root.setPadding(YogaEdge.BOTTOM, 20); - root.setWidth(400f); + root.setPadding(YogaEdge.LEFT, 20); + root.setPadding(YogaEdge.RIGHT, 20); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.RIGHT, 20f); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setMargin(YogaEdge.RIGHT, 20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setFlexDirection(YogaFlexDirection.ROW); - root_child1.setAlignContent(YogaAlign.STRETCH); root_child1.setWrap(YogaWrap.WRAP); - root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); + root_child1.setFlexGrow(1f); + root_child1.setAlignContent(YogaAlign.STRETCH); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); - root_child1_child0.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child0.setWidth(30f); root_child1_child0.setHeight(30f); + root_child1_child0.setWidth(30f); + root_child1_child0.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child1_child1 = createNode(config); - root_child1_child1.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child1.setWidth(30f); root_child1_child1.setHeight(30f); + root_child1_child1.setWidth(30f); + root_child1_child1.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child1, 1); final YogaNode root_child1_child2 = createNode(config); - root_child1_child2.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child2.setWidth(30f); root_child1_child2.setHeight(30f); + root_child1_child2.setWidth(30f); + root_child1_child2.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child1_child3 = createNode(config); - root_child1_child3.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child3.setWidth(30f); root_child1_child3.setHeight(30f); + root_child1_child3.setWidth(30f); + root_child1_child3.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child3, 3); final YogaNode root_child1_child4 = createNode(config); - root_child1_child4.setMargin(YogaEdge.RIGHT, 20f); - root_child1_child4.setWidth(30f); root_child1_child4.setHeight(30f); + root_child1_child4.setWidth(30f); + root_child1_child4.setMargin(YogaEdge.RIGHT, 20f); root_child1.addChildAt(root_child1_child4, 4); final YogaNode root_child2 = createNode(config); - root_child2.setMargin(YogaEdge.LEFT, 20f); - root_child2.setWidth(50f); root_child2.setHeight(50f); + root_child2.setWidth(50f); + root_child2.setMargin(YogaEdge.LEFT, 20f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5212,28 +5140,28 @@ public void test_align_content_stretch_and_align_items_flex_end_with_flex_wrap() YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); - root.setAlignItems(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(300f); root.setHeight(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.STRETCH); + root.setAlignItems(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.FLEX_START); - root_child0.setWidth(150f); root_child0.setHeight(50f); + root_child0.setWidth(150f); + root_child0.setAlignSelf(YogaAlign.FLEX_START); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(120f); root_child1.setHeight(100f); + root_child1.setWidth(120f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(120f); root_child2.setHeight(50f); + root_child2.setWidth(120f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5287,28 +5215,28 @@ public void test_align_content_stretch_and_align_items_flex_start_with_flex_wrap YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(300f); root.setHeight(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.STRETCH); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.FLEX_END); - root_child0.setWidth(150f); root_child0.setHeight(50f); + root_child0.setWidth(150f); + root_child0.setAlignSelf(YogaAlign.FLEX_END); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(120f); root_child1.setHeight(100f); + root_child1.setWidth(120f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(120f); root_child2.setHeight(50f); + root_child2.setWidth(120f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5362,28 +5290,28 @@ public void test_align_content_stretch_and_align_items_center_with_flex_wrap() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(300f); root.setHeight(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.STRETCH); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.FLEX_END); - root_child0.setWidth(150f); root_child0.setHeight(50f); + root_child0.setWidth(150f); + root_child0.setAlignSelf(YogaAlign.FLEX_END); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(120f); root_child1.setHeight(100f); + root_child1.setWidth(120f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(120f); root_child2.setHeight(50f); + root_child2.setWidth(120f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5437,27 +5365,27 @@ public void test_align_content_stretch_and_align_items_stretch_with_flex_wrap() YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(300f); root.setHeight(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.FLEX_END); - root_child0.setWidth(150f); root_child0.setHeight(50f); + root_child0.setWidth(150f); + root_child0.setAlignSelf(YogaAlign.FLEX_END); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(120f); root_child1.setHeight(100f); + root_child1.setWidth(120f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(120f); root_child2.setHeight(50f); + root_child2.setWidth(120f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/java/tests/generated/com/facebook/yoga/YGAlignItemsTest.java b/java/tests/generated/com/facebook/yoga/YGAlignItemsTest.java index 8a32201d10..0c5449cdde 100644 --- a/java/tests/generated/com/facebook/yoga/YGAlignItemsTest.java +++ b/java/tests/generated/com/facebook/yoga/YGAlignItemsTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<84597dd8b2c4f3aac1f21abe68f25308>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignItemsTest.html + * @generated SignedSource<<309d24a29d92477022ee155afc4ade82>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAlignItemsTest.html */ package com.facebook.yoga; @@ -71,14 +71,14 @@ public void test_align_items_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(10f); root_child0.setHeight(10f); + root_child0.setWidth(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -112,14 +112,14 @@ public void test_align_items_flex_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(10f); root_child0.setHeight(10f); + root_child0.setWidth(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -153,14 +153,14 @@ public void test_align_items_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(10f); root_child0.setHeight(10f); + root_child0.setWidth(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -194,11 +194,11 @@ public void test_align_baseline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -251,11 +251,11 @@ public void test_align_baseline_child() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -323,11 +323,11 @@ public void test_align_baseline_child_multiline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -335,10 +335,10 @@ public void test_align_baseline_child_multiline() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexDirection(YogaFlexDirection.ROW); - root_child1.setWrap(YogaWrap.WRAP); root_child1.setWidth(50f); root_child1.setHeight(25f); + root_child1.setWrap(YogaWrap.WRAP); + root_child1.setFlexDirection(YogaFlexDirection.ROW); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); @@ -442,11 +442,11 @@ public void test_align_baseline_child_multiline_override() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -454,10 +454,10 @@ public void test_align_baseline_child_multiline_override() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexDirection(YogaFlexDirection.ROW); - root_child1.setWrap(YogaWrap.WRAP); root_child1.setWidth(50f); root_child1.setHeight(25f); + root_child1.setWrap(YogaWrap.WRAP); + root_child1.setFlexDirection(YogaFlexDirection.ROW); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); @@ -466,9 +466,9 @@ public void test_align_baseline_child_multiline_override() { root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child1_child1 = createNode(config); - root_child1_child1.setAlignSelf(YogaAlign.BASELINE); root_child1_child1.setWidth(25f); root_child1_child1.setHeight(10f); + root_child1_child1.setAlignSelf(YogaAlign.BASELINE); root_child1.addChildAt(root_child1_child1, 1); final YogaNode root_child1_child2 = createNode(config); @@ -477,9 +477,9 @@ public void test_align_baseline_child_multiline_override() { root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child1_child3 = createNode(config); - root_child1_child3.setAlignSelf(YogaAlign.BASELINE); root_child1_child3.setWidth(25f); root_child1_child3.setHeight(10f); + root_child1_child3.setAlignSelf(YogaAlign.BASELINE); root_child1.addChildAt(root_child1_child3, 3); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -563,11 +563,11 @@ public void test_align_baseline_child_multiline_no_override_on_secondline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -575,10 +575,10 @@ public void test_align_baseline_child_multiline_no_override_on_secondline() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexDirection(YogaFlexDirection.ROW); - root_child1.setWrap(YogaWrap.WRAP); root_child1.setWidth(50f); root_child1.setHeight(25f); + root_child1.setWrap(YogaWrap.WRAP); + root_child1.setFlexDirection(YogaFlexDirection.ROW); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); @@ -597,9 +597,9 @@ public void test_align_baseline_child_multiline_no_override_on_secondline() { root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child1_child3 = createNode(config); - root_child1_child3.setAlignSelf(YogaAlign.BASELINE); root_child1_child3.setWidth(25f); root_child1_child3.setHeight(10f); + root_child1_child3.setAlignSelf(YogaAlign.BASELINE); root_child1.addChildAt(root_child1_child3, 3); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -683,16 +683,16 @@ public void test_align_baseline_child_top() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); - root_child0.setPosition(YogaEdge.TOP, 10f); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setPosition(YogaEdge.TOP, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -756,11 +756,11 @@ public void test_align_baseline_child_top2() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -768,9 +768,9 @@ public void test_align_baseline_child_top2() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setPosition(YogaEdge.TOP, 5f); root_child1.setWidth(50f); root_child1.setHeight(20f); + root_child1.setPosition(YogaEdge.TOP, 5f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); @@ -829,11 +829,11 @@ public void test_align_baseline_double_nested_child() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -916,10 +916,10 @@ public void test_align_baseline_column() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -972,19 +972,16 @@ public void test_align_baseline_child_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 5f); - root_child0.setMargin(YogaEdge.TOP, 5f); - root_child0.setMargin(YogaEdge.RIGHT, 5f); - root_child0.setMargin(YogaEdge.BOTTOM, 5f); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMargin(YogaEdge.ALL, 5f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -993,12 +990,9 @@ public void test_align_baseline_child_margin() { root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); - root_child1_child0.setMargin(YogaEdge.LEFT, 1f); - root_child1_child0.setMargin(YogaEdge.TOP, 1f); - root_child1_child0.setMargin(YogaEdge.RIGHT, 1f); - root_child1_child0.setMargin(YogaEdge.BOTTOM, 1f); root_child1_child0.setWidth(50f); root_child1_child0.setHeight(10f); + root_child1_child0.setMargin(YogaEdge.ALL, 1f); root_child1.addChildAt(root_child1_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1052,15 +1046,12 @@ public void test_align_baseline_child_padding() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 5); - root.setPadding(YogaEdge.TOP, 5); - root.setPadding(YogaEdge.RIGHT, 5); - root.setPadding(YogaEdge.BOTTOM, 5); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 5); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1068,12 +1059,9 @@ public void test_align_baseline_child_padding() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setPadding(YogaEdge.LEFT, 5); - root_child1.setPadding(YogaEdge.TOP, 5); - root_child1.setPadding(YogaEdge.RIGHT, 5); - root_child1.setPadding(YogaEdge.BOTTOM, 5); root_child1.setWidth(50f); root_child1.setHeight(20f); + root_child1.setPadding(YogaEdge.ALL, 5); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); @@ -1132,12 +1120,12 @@ public void test_align_baseline_multiline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1251,11 +1239,11 @@ public void test_align_baseline_multiline_column() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.BASELINE); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1369,11 +1357,11 @@ public void test_align_baseline_multiline_column2() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.BASELINE); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1486,12 +1474,12 @@ public void test_align_baseline_multiline_row_and_column() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.BASELINE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.BASELINE); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1604,21 +1592,21 @@ public void test_align_items_center_child_with_margin_bigger_than_parent() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(52f); root.setHeight(52f); + root.setWidth(52f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.CENTER); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setMargin(YogaEdge.LEFT, 10f); - root_child0_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0_child0.setWidth(52f); root_child0_child0.setHeight(52f); + root_child0_child0.setMargin(YogaEdge.LEFT, 10f); + root_child0_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1662,21 +1650,21 @@ public void test_align_items_flex_end_child_with_margin_bigger_than_parent() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(52f); root.setHeight(52f); + root.setWidth(52f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.FLEX_END); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setMargin(YogaEdge.LEFT, 10f); - root_child0_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0_child0.setWidth(52f); root_child0_child0.setHeight(52f); + root_child0_child0.setMargin(YogaEdge.LEFT, 10f); + root_child0_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1720,11 +1708,11 @@ public void test_align_items_center_child_without_margin_bigger_than_parent() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(52f); root.setHeight(52f); + root.setWidth(52f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.CENTER); @@ -1776,11 +1764,11 @@ public void test_align_items_flex_end_child_without_margin_bigger_than_parent() YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(52f); root.setHeight(52f); + root.setWidth(52f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.FLEX_END); @@ -1832,15 +1820,15 @@ public void test_align_center_should_size_based_on_content() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.TOP, 20f); root.setWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.CENTER); + root.setMargin(YogaEdge.TOP, 20f); final YogaNode root_child0 = createNode(config); - root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setFlexShrink(1f); + root_child0.setJustifyContent(YogaJustify.CENTER); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1905,13 +1893,13 @@ public void test_align_stretch_should_size_based_on_parent() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.TOP, 20f); root.setWidth(100f); root.setHeight(100f); + root.setMargin(YogaEdge.TOP, 20f); final YogaNode root_child0 = createNode(config); - root_child0.setJustifyContent(YogaJustify.CENTER); root_child0.setFlexShrink(1f); + root_child0.setJustifyContent(YogaJustify.CENTER); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1976,8 +1964,8 @@ public void test_align_flex_start_with_shrinking_children() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(500f); root.setHeight(500f); + root.setWidth(500f); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.FLEX_START); @@ -2045,8 +2033,8 @@ public void test_align_flex_start_with_stretching_children() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(500f); root.setHeight(500f); + root.setWidth(500f); final YogaNode root_child0 = createNode(config); root.addChildAt(root_child0, 0); @@ -2113,8 +2101,8 @@ public void test_align_flex_start_with_shrinking_children_with_stretch() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(500f); root.setHeight(500f); + root.setWidth(500f); final YogaNode root_child0 = createNode(config); root_child0.setAlignItems(YogaAlign.FLEX_START); @@ -2181,17 +2169,17 @@ public void test_align_flex_end_with_row_reverse() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(75f); + root.setAlignItems(YogaAlign.FLEX_END); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 3f); - root_child0.setMargin(YogaEdge.RIGHT, 5f); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMargin(YogaEdge.RIGHT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 3f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -2241,15 +2229,15 @@ public void test_align_stretch_with_row_reverse() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(75f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 3f); - root_child0.setMargin(YogaEdge.RIGHT, 5f); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMargin(YogaEdge.RIGHT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 3f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -2314,6 +2302,7 @@ public void test_align_items_non_stretch_s526008() { root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); + root_child0_child0_child0_child0.setWidth(0f); root_child0_child0_child0_child0.setHeight(10f); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); diff --git a/java/tests/generated/com/facebook/yoga/YGAlignSelfTest.java b/java/tests/generated/com/facebook/yoga/YGAlignSelfTest.java index 923d7f36f2..b6716c49bf 100644 --- a/java/tests/generated/com/facebook/yoga/YGAlignSelfTest.java +++ b/java/tests/generated/com/facebook/yoga/YGAlignSelfTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<90c29809153285d8773124e93961ba55>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignSelfTest.html + * @generated SignedSource<<13d0f5f70b716118796f3e4aff80c608>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAlignSelfTest.html */ package com.facebook.yoga; @@ -37,9 +37,9 @@ public void test_align_self_center() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.CENTER); - root_child0.setWidth(10f); root_child0.setHeight(10f); + root_child0.setWidth(10f); + root_child0.setAlignSelf(YogaAlign.CENTER); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -78,9 +78,9 @@ public void test_align_self_flex_end() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.FLEX_END); - root_child0.setWidth(10f); root_child0.setHeight(10f); + root_child0.setWidth(10f); + root_child0.setAlignSelf(YogaAlign.FLEX_END); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -119,9 +119,9 @@ public void test_align_self_flex_start() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.FLEX_START); - root_child0.setWidth(10f); root_child0.setHeight(10f); + root_child0.setWidth(10f); + root_child0.setAlignSelf(YogaAlign.FLEX_START); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -155,15 +155,15 @@ public void test_align_self_flex_end_override_flex_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.FLEX_END); - root_child0.setWidth(10f); root_child0.setHeight(10f); + root_child0.setWidth(10f); + root_child0.setAlignSelf(YogaAlign.FLEX_END); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -197,21 +197,21 @@ public void test_align_self_baseline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setAlignSelf(YogaAlign.BASELINE); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setAlignSelf(YogaAlign.BASELINE); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setAlignSelf(YogaAlign.BASELINE); root_child1.setWidth(50f); root_child1.setHeight(20f); + root_child1.setAlignSelf(YogaAlign.BASELINE); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); diff --git a/java/tests/generated/com/facebook/yoga/YGAndroidNewsFeed.java b/java/tests/generated/com/facebook/yoga/YGAndroidNewsFeed.java index 5ce2cd3614..a3e1c05987 100644 --- a/java/tests/generated/com/facebook/yoga/YGAndroidNewsFeed.java +++ b/java/tests/generated/com/facebook/yoga/YGAndroidNewsFeed.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<245b1ad71f126cebcb48b66239bbc759>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAndroidNewsFeed.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAndroidNewsFeed.html */ package com.facebook.yoga; @@ -32,8 +32,8 @@ public void test_android_news_feed() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setAlignContent(YogaAlign.STRETCH); root.setWidth(1080f); final YogaNode root_child0 = createNode(config); @@ -49,10 +49,10 @@ public void test_android_news_feed() { final YogaNode root_child0_child0_child0_child0 = createNode(config); root_child0_child0_child0_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); root_child0_child0_child0_child0.setAlignItems(YogaAlign.FLEX_START); - root_child0_child0_child0_child0.setMargin(YogaEdge.START, 36f); + root_child0_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 24f); + root_child0_child0_child0_child0.setMargin(YogaEdge.START, 36f); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0_child0 = createNode(config); @@ -93,10 +93,10 @@ public void test_android_news_feed() { final YogaNode root_child0_child0_child1_child0 = createNode(config); root_child0_child0_child1_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0_child0_child1_child0.setAlignContent(YogaAlign.STRETCH); root_child0_child0_child1_child0.setAlignItems(YogaAlign.FLEX_START); - root_child0_child0_child1_child0.setMargin(YogaEdge.START, 174f); + root_child0_child0_child1_child0.setAlignContent(YogaAlign.STRETCH); root_child0_child0_child1_child0.setMargin(YogaEdge.TOP, 24f); + root_child0_child0_child1_child0.setMargin(YogaEdge.START, 174f); root_child0_child0_child1.addChildAt(root_child0_child0_child1_child0, 0); final YogaNode root_child0_child0_child1_child0_child0 = createNode(config); diff --git a/java/tests/generated/com/facebook/yoga/YGAspectRatioTest.java b/java/tests/generated/com/facebook/yoga/YGAspectRatioTest.java index 770e5d0e5c..a667992431 100644 --- a/java/tests/generated/com/facebook/yoga/YGAspectRatioTest.java +++ b/java/tests/generated/com/facebook/yoga/YGAspectRatioTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<37a01c67158df025b1b43b8378071746>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAspectRatioTest.html + * @generated SignedSource<<8b4a31ae00448d1d53e9449c804b2a79>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAspectRatioTest.html */ package com.facebook.yoga; @@ -38,10 +38,10 @@ public void test_aspect_ratio_does_not_stretch_cross_axis_dim() { root.setHeight(300f); final YogaNode root_child0 = createNode(config); - root_child0.setOverflow(YogaOverflow.SCROLL); root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); + root_child0.setOverflow(YogaOverflow.SCROLL); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -52,7 +52,7 @@ public void test_aspect_ratio_does_not_stretch_cross_axis_dim() { root_child0_child0_child0.setFlexGrow(2f); root_child0_child0_child0.setFlexShrink(1f); root_child0_child0_child0.setFlexBasisPercent(0f); - root_child0_child0_child0.setAspectRatio(1 / 1f); + root_child0_child0_child0.setAspectRatio(1f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); @@ -69,7 +69,7 @@ public void test_aspect_ratio_does_not_stretch_cross_axis_dim() { root_child0_child0_child2_child0.setFlexGrow(1f); root_child0_child0_child2_child0.setFlexShrink(1f); root_child0_child0_child2_child0.setFlexBasisPercent(0f); - root_child0_child0_child2_child0.setAspectRatio(1 / 1f); + root_child0_child0_child2_child0.setAspectRatio(1f); root_child0_child0_child2.addChildAt(root_child0_child0_child2_child0, 0); final YogaNode root_child0_child0_child2_child0_child0 = createNode(config); @@ -80,7 +80,7 @@ public void test_aspect_ratio_does_not_stretch_cross_axis_dim() { root_child0_child0_child2_child0_child1.setFlexGrow(1f); root_child0_child0_child2_child0_child1.setFlexShrink(1f); root_child0_child0_child2_child0_child1.setFlexBasisPercent(0f); - root_child0_child0_child2_child0_child1.setAspectRatio(1 / 1f); + root_child0_child0_child2_child0_child1.setAspectRatio(1f); root_child0_child0_child2_child0.addChildAt(root_child0_child0_child2_child0_child1, 1); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -189,8 +189,8 @@ public void test_zero_aspect_ratio_behaves_like_auto() { root.setHeight(300f); final YogaNode root_child0 = createNode(config); + root_child0.setAspectRatio(0f); root_child0.setWidth(50f); - root_child0.setAspectRatio(0 / 1f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/java/tests/generated/com/facebook/yoga/YGAutoTest.java b/java/tests/generated/com/facebook/yoga/YGAutoTest.java index 3b5aab1486..f736d8cd07 100644 --- a/java/tests/generated/com/facebook/yoga/YGAutoTest.java +++ b/java/tests/generated/com/facebook/yoga/YGAutoTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<30103b31d09984d8443cf1ba544adeb7>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAutoTest.html + * @generated SignedSource<<649daae1073830c91842097b7bac9cda>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAutoTest.html */ package com.facebook.yoga; @@ -32,10 +32,10 @@ public void test_auto_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidthAuto(); root.setHeight(50f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -175,6 +175,7 @@ public void test_auto_flex_basis() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(50f); + root.setFlexBasisAuto(); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -247,9 +248,9 @@ public void test_auto_position() { root.setHeight(50f); final YogaNode root_child0 = createNode(config); - root_child0.setPositionAuto(YogaEdge.RIGHT); root_child0.setWidth(25f); root_child0.setHeight(25f); + root_child0.setPositionAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -288,9 +289,9 @@ public void test_auto_margin() { root.setHeight(50f); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setWidth(25f); root_child0.setHeight(25f); + root_child0.setMarginAuto(YogaEdge.LEFT); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/java/tests/generated/com/facebook/yoga/YGBorderTest.java b/java/tests/generated/com/facebook/yoga/YGBorderTest.java index dc8ba2c274..cf29f7ed81 100644 --- a/java/tests/generated/com/facebook/yoga/YGBorderTest.java +++ b/java/tests/generated/com/facebook/yoga/YGBorderTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGBorderTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGBorderTest.html */ package com.facebook.yoga; @@ -33,10 +33,7 @@ public void test_border_no_size() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); + root.setBorder(YogaEdge.ALL, 10f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -60,10 +57,7 @@ public void test_border_container_match_child() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); + root.setBorder(YogaEdge.ALL, 10f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -102,16 +96,13 @@ public void test_border_flex_child() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); root.setWidth(100f); root.setHeight(100f); + root.setBorder(YogaEdge.ALL, 10f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setWidth(10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -146,12 +137,9 @@ public void test_border_stretch_child() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); root.setWidth(100f); root.setHeight(100f); + root.setBorder(YogaEdge.ALL, 10f); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -188,18 +176,18 @@ public void test_border_center_child() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setWidth(100f); + root.setHeight(100f); root.setBorder(YogaEdge.START, 10f); root.setBorder(YogaEdge.END, 20f); root.setBorder(YogaEdge.BOTTOM, 20f); - root.setWidth(100f); - root.setHeight(100f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(10f); root_child0.setHeight(10f); + root_child0.setWidth(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/java/tests/generated/com/facebook/yoga/YGBoxSizingTest.java b/java/tests/generated/com/facebook/yoga/YGBoxSizingTest.java index d6725118fd..3a78c4b92c 100644 --- a/java/tests/generated/com/facebook/yoga/YGBoxSizingTest.java +++ b/java/tests/generated/com/facebook/yoga/YGBoxSizingTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<7f42121bbd9772cdbc079aac71040dcc>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGBoxSizingTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGBoxSizingTest.html */ package com.facebook.yoga; @@ -33,16 +33,10 @@ public void test_box_sizing_content_box_simple() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 5); - root.setPadding(YogaEdge.TOP, 5); - root.setPadding(YogaEdge.RIGHT, 5); - root.setPadding(YogaEdge.BOTTOM, 5); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 5); + root.setBorder(YogaEdge.ALL, 10f); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -67,16 +61,10 @@ public void test_box_sizing_border_box_simple() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 5); - root.setPadding(YogaEdge.TOP, 5); - root.setPadding(YogaEdge.RIGHT, 5); - root.setPadding(YogaEdge.BOTTOM, 5); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 5); + root.setBorder(YogaEdge.ALL, 10f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -104,16 +92,10 @@ public void test_box_sizing_content_box_percent() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 4); - root_child0.setPadding(YogaEdge.TOP, 4); - root_child0.setPadding(YogaEdge.RIGHT, 4); - root_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0.setBorder(YogaEdge.LEFT, 16f); - root_child0.setBorder(YogaEdge.TOP, 16f); - root_child0.setBorder(YogaEdge.RIGHT, 16f); - root_child0.setBorder(YogaEdge.BOTTOM, 16f); root_child0.setWidthPercent(50f); root_child0.setHeightPercent(25f); + root_child0.setPadding(YogaEdge.ALL, 4); + root_child0.setBorder(YogaEdge.ALL, 16f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); @@ -153,16 +135,10 @@ public void test_box_sizing_border_box_percent() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 4); - root_child0.setPadding(YogaEdge.TOP, 4); - root_child0.setPadding(YogaEdge.RIGHT, 4); - root_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0.setBorder(YogaEdge.LEFT, 16f); - root_child0.setBorder(YogaEdge.TOP, 16f); - root_child0.setBorder(YogaEdge.RIGHT, 16f); - root_child0.setBorder(YogaEdge.BOTTOM, 16f); root_child0.setWidthPercent(50f); root_child0.setHeightPercent(25f); + root_child0.setPadding(YogaEdge.ALL, 4); + root_child0.setBorder(YogaEdge.ALL, 16f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -201,17 +177,11 @@ public void test_box_sizing_content_box_absolute() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setPadding(YogaEdge.LEFT, 12); - root_child0.setPadding(YogaEdge.TOP, 12); - root_child0.setPadding(YogaEdge.RIGHT, 12); - root_child0.setPadding(YogaEdge.BOTTOM, 12); - root_child0.setBorder(YogaEdge.LEFT, 8f); - root_child0.setBorder(YogaEdge.TOP, 8f); - root_child0.setBorder(YogaEdge.RIGHT, 8f); - root_child0.setBorder(YogaEdge.BOTTOM, 8f); root_child0.setHeightPercent(25f); + root_child0.setPadding(YogaEdge.ALL, 12); + root_child0.setBorder(YogaEdge.ALL, 8f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -250,16 +220,10 @@ public void test_box_sizing_border_box_absolute() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setPadding(YogaEdge.LEFT, 12); - root_child0.setPadding(YogaEdge.TOP, 12); - root_child0.setPadding(YogaEdge.RIGHT, 12); - root_child0.setPadding(YogaEdge.BOTTOM, 12); - root_child0.setBorder(YogaEdge.LEFT, 8f); - root_child0.setBorder(YogaEdge.TOP, 8f); - root_child0.setBorder(YogaEdge.RIGHT, 8f); - root_child0.setBorder(YogaEdge.BOTTOM, 8f); root_child0.setHeightPercent(25f); + root_child0.setPadding(YogaEdge.ALL, 12); + root_child0.setBorder(YogaEdge.ALL, 8f); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -294,16 +258,10 @@ public void test_box_sizing_content_box_comtaining_block() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 12); - root.setPadding(YogaEdge.TOP, 12); - root.setPadding(YogaEdge.RIGHT, 12); - root.setPadding(YogaEdge.BOTTOM, 12); - root.setBorder(YogaEdge.LEFT, 8f); - root.setBorder(YogaEdge.TOP, 8f); - root.setBorder(YogaEdge.RIGHT, 8f); - root.setBorder(YogaEdge.BOTTOM, 8f); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 12); + root.setBorder(YogaEdge.ALL, 8f); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); final YogaNode root_child0 = createNode(config); @@ -311,9 +269,9 @@ public void test_box_sizing_content_box_comtaining_block() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.setWidth(50f); root_child0_child0.setHeightPercent(25f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -358,25 +316,19 @@ public void test_box_sizing_border_box_comtaining_block() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 12); - root.setPadding(YogaEdge.TOP, 12); - root.setPadding(YogaEdge.RIGHT, 12); - root.setPadding(YogaEdge.BOTTOM, 12); - root.setBorder(YogaEdge.LEFT, 8f); - root.setBorder(YogaEdge.TOP, 8f); - root.setBorder(YogaEdge.RIGHT, 8f); - root.setBorder(YogaEdge.BOTTOM, 8f); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 12); + root.setBorder(YogaEdge.ALL, 8f); final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.STATIC); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.setWidth(50f); root_child0_child0.setHeightPercent(25f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -421,12 +373,9 @@ public void test_box_sizing_content_box_padding_only() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 5); - root.setPadding(YogaEdge.TOP, 5); - root.setPadding(YogaEdge.RIGHT, 5); - root.setPadding(YogaEdge.BOTTOM, 5); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 5); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -455,12 +404,9 @@ public void test_box_sizing_content_box_padding_only_percent() { root.setHeight(150f); final YogaNode root_child0 = createNode(config); - root_child0.setPaddingPercent(YogaEdge.LEFT, 10); - root_child0.setPaddingPercent(YogaEdge.TOP, 10); - root_child0.setPaddingPercent(YogaEdge.RIGHT, 10); - root_child0.setPaddingPercent(YogaEdge.BOTTOM, 10); root_child0.setWidth(50f); root_child0.setHeight(75f); + root_child0.setPaddingPercent(YogaEdge.ALL, 10); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); @@ -496,12 +442,9 @@ public void test_box_sizing_border_box_padding_only() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 5); - root.setPadding(YogaEdge.TOP, 5); - root.setPadding(YogaEdge.RIGHT, 5); - root.setPadding(YogaEdge.BOTTOM, 5); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 5); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -529,12 +472,9 @@ public void test_box_sizing_border_box_padding_only_percent() { root.setHeight(150f); final YogaNode root_child0 = createNode(config); - root_child0.setPaddingPercent(YogaEdge.LEFT, 10); - root_child0.setPaddingPercent(YogaEdge.TOP, 10); - root_child0.setPaddingPercent(YogaEdge.RIGHT, 10); - root_child0.setPaddingPercent(YogaEdge.BOTTOM, 10); root_child0.setWidth(50f); root_child0.setHeight(75f); + root_child0.setPaddingPercent(YogaEdge.ALL, 10); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -569,12 +509,9 @@ public void test_box_sizing_content_box_border_only() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); root.setWidth(100f); root.setHeight(100f); + root.setBorder(YogaEdge.ALL, 10f); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -639,12 +576,9 @@ public void test_box_sizing_border_box_border_only() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); root.setWidth(100f); root.setHeight(100f); + root.setBorder(YogaEdge.ALL, 10f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -758,16 +692,10 @@ public void test_box_sizing_content_box_children() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 5); - root.setPadding(YogaEdge.TOP, 5); - root.setPadding(YogaEdge.RIGHT, 5); - root.setPadding(YogaEdge.BOTTOM, 5); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 5); + root.setBorder(YogaEdge.ALL, 10f); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); final YogaNode root_child0 = createNode(config); @@ -852,16 +780,10 @@ public void test_box_sizing_border_box_children() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 5); - root.setPadding(YogaEdge.TOP, 5); - root.setPadding(YogaEdge.RIGHT, 5); - root.setPadding(YogaEdge.BOTTOM, 5); - root.setBorder(YogaEdge.LEFT, 10f); - root.setBorder(YogaEdge.TOP, 10f); - root.setBorder(YogaEdge.RIGHT, 10f); - root.setBorder(YogaEdge.BOTTOM, 10f); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 5); + root.setBorder(YogaEdge.ALL, 10f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(25f); @@ -954,17 +876,11 @@ public void test_box_sizing_content_box_siblings() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setPadding(YogaEdge.LEFT, 10); - root_child1.setPadding(YogaEdge.TOP, 10); - root_child1.setPadding(YogaEdge.RIGHT, 10); - root_child1.setPadding(YogaEdge.BOTTOM, 10); - root_child1.setBorder(YogaEdge.LEFT, 10f); - root_child1.setBorder(YogaEdge.TOP, 10f); - root_child1.setBorder(YogaEdge.RIGHT, 10f); - root_child1.setBorder(YogaEdge.BOTTOM, 10f); root_child1.setWidth(25f); root_child1.setHeight(25f); root_child1.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child1.setPadding(YogaEdge.ALL, 10); + root_child1.setBorder(YogaEdge.ALL, 10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -1048,16 +964,10 @@ public void test_box_sizing_border_box_siblings() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setPadding(YogaEdge.LEFT, 10); - root_child1.setPadding(YogaEdge.TOP, 10); - root_child1.setPadding(YogaEdge.RIGHT, 10); - root_child1.setPadding(YogaEdge.BOTTOM, 10); - root_child1.setBorder(YogaEdge.LEFT, 10f); - root_child1.setBorder(YogaEdge.TOP, 10f); - root_child1.setBorder(YogaEdge.RIGHT, 10f); - root_child1.setBorder(YogaEdge.BOTTOM, 10f); root_child1.setWidth(25f); root_child1.setHeight(25f); + root_child1.setPadding(YogaEdge.ALL, 10); + root_child1.setBorder(YogaEdge.ALL, 10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -1136,17 +1046,11 @@ public void test_box_sizing_content_box_max_width() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 15f); - root_child0.setBorder(YogaEdge.TOP, 15f); - root_child0.setBorder(YogaEdge.RIGHT, 15f); - root_child0.setBorder(YogaEdge.BOTTOM, 15f); root_child0.setMaxWidth(50f); root_child0.setHeight(25f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 15f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1200,16 +1104,10 @@ public void test_box_sizing_border_box_max_width() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 15f); - root_child0.setBorder(YogaEdge.TOP, 15f); - root_child0.setBorder(YogaEdge.RIGHT, 15f); - root_child0.setBorder(YogaEdge.BOTTOM, 15f); root_child0.setMaxWidth(50f); root_child0.setHeight(25f); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 15f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1263,17 +1161,11 @@ public void test_box_sizing_content_box_max_height() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 15f); - root_child0.setBorder(YogaEdge.TOP, 15f); - root_child0.setBorder(YogaEdge.RIGHT, 15f); - root_child0.setBorder(YogaEdge.BOTTOM, 15f); root_child0.setWidth(50f); root_child0.setMaxHeight(50f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 15f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1327,16 +1219,10 @@ public void test_box_sizing_border_box_max_height() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 15f); - root_child0.setBorder(YogaEdge.TOP, 15f); - root_child0.setBorder(YogaEdge.RIGHT, 15f); - root_child0.setBorder(YogaEdge.BOTTOM, 15f); root_child0.setWidth(50f); root_child0.setMaxHeight(50f); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 15f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1390,17 +1276,11 @@ public void test_box_sizing_content_box_min_width() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 15f); - root_child0.setBorder(YogaEdge.TOP, 15f); - root_child0.setBorder(YogaEdge.RIGHT, 15f); - root_child0.setBorder(YogaEdge.BOTTOM, 15f); root_child0.setMinWidth(50f); root_child0.setHeight(25f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 15f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1454,16 +1334,10 @@ public void test_box_sizing_border_box_min_width() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 15f); - root_child0.setBorder(YogaEdge.TOP, 15f); - root_child0.setBorder(YogaEdge.RIGHT, 15f); - root_child0.setBorder(YogaEdge.BOTTOM, 15f); root_child0.setMinWidth(50f); root_child0.setHeight(25f); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 15f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1517,17 +1391,11 @@ public void test_box_sizing_content_box_min_height() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 15f); - root_child0.setBorder(YogaEdge.TOP, 15f); - root_child0.setBorder(YogaEdge.RIGHT, 15f); - root_child0.setBorder(YogaEdge.BOTTOM, 15f); root_child0.setWidth(50f); root_child0.setMinHeight(50f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 15f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1581,16 +1449,10 @@ public void test_box_sizing_border_box_min_height() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 15f); - root_child0.setBorder(YogaEdge.TOP, 15f); - root_child0.setBorder(YogaEdge.RIGHT, 15f); - root_child0.setBorder(YogaEdge.BOTTOM, 15f); root_child0.setWidth(50f); root_child0.setMinHeight(50f); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 15f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1644,15 +1506,9 @@ public void test_box_sizing_content_box_no_height_no_width() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 2); - root_child0.setPadding(YogaEdge.RIGHT, 2); - root_child0.setPadding(YogaEdge.BOTTOM, 2); - root_child0.setBorder(YogaEdge.LEFT, 7f); - root_child0.setBorder(YogaEdge.TOP, 7f); - root_child0.setBorder(YogaEdge.RIGHT, 7f); - root_child0.setBorder(YogaEdge.BOTTOM, 7f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0.setPadding(YogaEdge.ALL, 2); + root_child0.setBorder(YogaEdge.ALL, 7f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1691,14 +1547,8 @@ public void test_box_sizing_border_box_no_height_no_width() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 2); - root_child0.setPadding(YogaEdge.RIGHT, 2); - root_child0.setPadding(YogaEdge.BOTTOM, 2); - root_child0.setBorder(YogaEdge.LEFT, 7f); - root_child0.setBorder(YogaEdge.TOP, 7f); - root_child0.setBorder(YogaEdge.RIGHT, 7f); - root_child0.setBorder(YogaEdge.BOTTOM, 7f); + root_child0.setPadding(YogaEdge.ALL, 2); + root_child0.setBorder(YogaEdge.ALL, 7f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1733,44 +1583,26 @@ public void test_box_sizing_content_box_nested() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 15); - root.setPadding(YogaEdge.TOP, 15); - root.setPadding(YogaEdge.RIGHT, 15); - root.setPadding(YogaEdge.BOTTOM, 15); - root.setBorder(YogaEdge.LEFT, 3f); - root.setBorder(YogaEdge.TOP, 3f); - root.setBorder(YogaEdge.RIGHT, 3f); - root.setBorder(YogaEdge.BOTTOM, 3f); root.setWidth(100f); root.setHeight(100f); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root.setPadding(YogaEdge.ALL, 15); + root.setBorder(YogaEdge.ALL, 3f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 2); - root_child0.setPadding(YogaEdge.RIGHT, 2); - root_child0.setPadding(YogaEdge.BOTTOM, 2); - root_child0.setBorder(YogaEdge.LEFT, 7f); - root_child0.setBorder(YogaEdge.TOP, 7f); - root_child0.setBorder(YogaEdge.RIGHT, 7f); - root_child0.setBorder(YogaEdge.BOTTOM, 7f); root_child0.setWidth(20f); root_child0.setHeight(20f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0.setPadding(YogaEdge.ALL, 2); + root_child0.setBorder(YogaEdge.ALL, 7f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 1); - root_child0_child0.setPadding(YogaEdge.RIGHT, 1); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 1); - root_child0_child0.setBorder(YogaEdge.LEFT, 2f); - root_child0_child0.setBorder(YogaEdge.TOP, 2f); - root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); - root_child0_child0.setBorder(YogaEdge.BOTTOM, 2f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(5f); root_child0_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0_child0.setPadding(YogaEdge.ALL, 1); + root_child0_child0.setBorder(YogaEdge.ALL, 2f); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1815,41 +1647,23 @@ public void test_box_sizing_border_box_nested() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 15); - root.setPadding(YogaEdge.TOP, 15); - root.setPadding(YogaEdge.RIGHT, 15); - root.setPadding(YogaEdge.BOTTOM, 15); - root.setBorder(YogaEdge.LEFT, 3f); - root.setBorder(YogaEdge.TOP, 3f); - root.setBorder(YogaEdge.RIGHT, 3f); - root.setBorder(YogaEdge.BOTTOM, 3f); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 15); + root.setBorder(YogaEdge.ALL, 3f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 2); - root_child0.setPadding(YogaEdge.RIGHT, 2); - root_child0.setPadding(YogaEdge.BOTTOM, 2); - root_child0.setBorder(YogaEdge.LEFT, 7f); - root_child0.setBorder(YogaEdge.TOP, 7f); - root_child0.setBorder(YogaEdge.RIGHT, 7f); - root_child0.setBorder(YogaEdge.BOTTOM, 7f); root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setPadding(YogaEdge.ALL, 2); + root_child0.setBorder(YogaEdge.ALL, 7f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 1); - root_child0_child0.setPadding(YogaEdge.RIGHT, 1); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 1); - root_child0_child0.setBorder(YogaEdge.LEFT, 2f); - root_child0_child0.setBorder(YogaEdge.TOP, 2f); - root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); - root_child0_child0.setBorder(YogaEdge.BOTTOM, 2f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(5f); + root_child0_child0.setPadding(YogaEdge.ALL, 1); + root_child0_child0.setBorder(YogaEdge.ALL, 2f); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1894,56 +1708,32 @@ public void test_box_sizing_content_box_nested_alternating() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 3); - root.setPadding(YogaEdge.TOP, 3); - root.setPadding(YogaEdge.RIGHT, 3); - root.setPadding(YogaEdge.BOTTOM, 3); - root.setBorder(YogaEdge.LEFT, 2f); - root.setBorder(YogaEdge.TOP, 2f); - root.setBorder(YogaEdge.RIGHT, 2f); - root.setBorder(YogaEdge.BOTTOM, 2f); root.setWidth(100f); root.setHeight(100f); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root.setPadding(YogaEdge.ALL, 3); + root.setBorder(YogaEdge.ALL, 2f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 8); - root_child0.setPadding(YogaEdge.TOP, 8); - root_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0.setPadding(YogaEdge.BOTTOM, 8); - root_child0.setBorder(YogaEdge.LEFT, 2f); - root_child0.setBorder(YogaEdge.TOP, 2f); - root_child0.setBorder(YogaEdge.RIGHT, 2f); - root_child0.setBorder(YogaEdge.BOTTOM, 2f); root_child0.setWidth(40f); root_child0.setHeight(40f); + root_child0.setPadding(YogaEdge.ALL, 8); + root_child0.setBorder(YogaEdge.ALL, 2f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPadding(YogaEdge.LEFT, 3); - root_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0.setPadding(YogaEdge.RIGHT, 3); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 3); - root_child0_child0.setBorder(YogaEdge.LEFT, 6f); - root_child0_child0.setBorder(YogaEdge.TOP, 6f); - root_child0_child0.setBorder(YogaEdge.RIGHT, 6f); - root_child0_child0.setBorder(YogaEdge.BOTTOM, 6f); root_child0_child0.setWidth(20f); root_child0_child0.setHeight(25f); root_child0_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0_child0.setPadding(YogaEdge.ALL, 3); + root_child0_child0.setBorder(YogaEdge.ALL, 6f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 1); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 1); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 1); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 1f); - root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); - root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 1f); - root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); root_child0_child0_child0.setWidth(10f); root_child0_child0_child0.setHeight(5f); + root_child0_child0_child0.setPadding(YogaEdge.ALL, 1); + root_child0_child0_child0.setBorder(YogaEdge.ALL, 1f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1998,56 +1788,32 @@ public void test_box_sizing_border_box_nested_alternating() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 3); - root.setPadding(YogaEdge.TOP, 3); - root.setPadding(YogaEdge.RIGHT, 3); - root.setPadding(YogaEdge.BOTTOM, 3); - root.setBorder(YogaEdge.LEFT, 2f); - root.setBorder(YogaEdge.TOP, 2f); - root.setBorder(YogaEdge.RIGHT, 2f); - root.setBorder(YogaEdge.BOTTOM, 2f); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 3); + root.setBorder(YogaEdge.ALL, 2f); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 8); - root_child0.setPadding(YogaEdge.TOP, 8); - root_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0.setPadding(YogaEdge.BOTTOM, 8); - root_child0.setBorder(YogaEdge.LEFT, 2f); - root_child0.setBorder(YogaEdge.TOP, 2f); - root_child0.setBorder(YogaEdge.RIGHT, 2f); - root_child0.setBorder(YogaEdge.BOTTOM, 2f); root_child0.setWidth(40f); root_child0.setHeight(40f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0.setPadding(YogaEdge.ALL, 8); + root_child0.setBorder(YogaEdge.ALL, 2f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPadding(YogaEdge.LEFT, 3); - root_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0.setPadding(YogaEdge.RIGHT, 3); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 3); - root_child0_child0.setBorder(YogaEdge.LEFT, 6f); - root_child0_child0.setBorder(YogaEdge.TOP, 6f); - root_child0_child0.setBorder(YogaEdge.RIGHT, 6f); - root_child0_child0.setBorder(YogaEdge.BOTTOM, 6f); root_child0_child0.setWidth(20f); root_child0_child0.setHeight(25f); + root_child0_child0.setPadding(YogaEdge.ALL, 3); + root_child0_child0.setBorder(YogaEdge.ALL, 6f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 1); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 1); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 1); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 1f); - root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); - root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 1f); - root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); root_child0_child0_child0.setWidth(10f); root_child0_child0_child0.setHeight(5f); root_child0_child0_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); + root_child0_child0_child0.setPadding(YogaEdge.ALL, 1); + root_child0_child0_child0.setBorder(YogaEdge.ALL, 1f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2102,22 +1868,16 @@ public void test_box_sizing_content_box_flex_basis_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexBasis(50f); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 10f); - root_child0.setBorder(YogaEdge.TOP, 10f); - root_child0.setBorder(YogaEdge.RIGHT, 10f); - root_child0.setBorder(YogaEdge.BOTTOM, 10f); root_child0.setHeight(25f); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 10f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); @@ -2152,22 +1912,16 @@ public void test_box_sizing_border_box_flex_basis_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexBasis(50f); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 10f); - root_child0.setBorder(YogaEdge.TOP, 10f); - root_child0.setBorder(YogaEdge.RIGHT, 10f); - root_child0.setBorder(YogaEdge.BOTTOM, 10f); root_child0.setHeight(25f); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2208,15 +1962,9 @@ public void test_box_sizing_content_box_flex_basis_column() { final YogaNode root_child0 = createNode(config); root_child0.setFlexBasis(50f); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 10f); - root_child0.setBorder(YogaEdge.TOP, 10f); - root_child0.setBorder(YogaEdge.RIGHT, 10f); - root_child0.setBorder(YogaEdge.BOTTOM, 10f); root_child0.setHeight(25f); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 10f); root_child0.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); @@ -2257,15 +2005,9 @@ public void test_box_sizing_border_box_flex_basis_column() { final YogaNode root_child0 = createNode(config); root_child0.setFlexBasis(50f); - root_child0.setPadding(YogaEdge.LEFT, 5); - root_child0.setPadding(YogaEdge.TOP, 5); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 5); - root_child0.setBorder(YogaEdge.LEFT, 10f); - root_child0.setBorder(YogaEdge.TOP, 10f); - root_child0.setBorder(YogaEdge.RIGHT, 10f); - root_child0.setBorder(YogaEdge.BOTTOM, 10f); root_child0.setHeight(25f); + root_child0.setPadding(YogaEdge.ALL, 5); + root_child0.setBorder(YogaEdge.ALL, 10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2300,9 +2042,9 @@ public void test_box_sizing_content_box_padding_start() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.START, 5); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.START, 5); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2327,9 +2069,9 @@ public void test_box_sizing_border_box_padding_start() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.START, 5); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.START, 5); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2353,9 +2095,9 @@ public void test_box_sizing_content_box_padding_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.END, 5); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.END, 5); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2380,9 +2122,9 @@ public void test_box_sizing_border_box_padding_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.END, 5); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.END, 5); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2406,9 +2148,9 @@ public void test_box_sizing_content_box_border_start() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.START, 5f); root.setWidth(100f); root.setHeight(100f); + root.setBorder(YogaEdge.START, 5f); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2433,9 +2175,9 @@ public void test_box_sizing_border_box_border_start() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.START, 5f); root.setWidth(100f); root.setHeight(100f); + root.setBorder(YogaEdge.START, 5f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2459,9 +2201,9 @@ public void test_box_sizing_content_box_border_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.END, 5f); root.setWidth(100f); root.setHeight(100f); + root.setBorder(YogaEdge.END, 5f); root.setBoxSizing(YogaBoxSizing.CONTENT_BOX); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2486,9 +2228,9 @@ public void test_box_sizing_border_box_border_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.END, 5f); root.setWidth(100f); root.setHeight(100f); + root.setBorder(YogaEdge.END, 5f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/java/tests/generated/com/facebook/yoga/YGDimensionTest.java b/java/tests/generated/com/facebook/yoga/YGDimensionTest.java index 407096b4cb..c47046ca90 100644 --- a/java/tests/generated/com/facebook/yoga/YGDimensionTest.java +++ b/java/tests/generated/com/facebook/yoga/YGDimensionTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<6a430747c0b764e9fb683f023b45391a>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGDimensionTest.html + * @generated SignedSource<<28226b97f32ae39c8bbf96678867c310>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGDimensionTest.html */ package com.facebook.yoga; diff --git a/java/tests/generated/com/facebook/yoga/YGDisplayTest.java b/java/tests/generated/com/facebook/yoga/YGDisplayTest.java index 7f4ac0b816..930f44b541 100644 --- a/java/tests/generated/com/facebook/yoga/YGDisplayTest.java +++ b/java/tests/generated/com/facebook/yoga/YGDisplayTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<4c1ad4613638039be1599a39a766a2bc>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGDisplayTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGDisplayTest.html */ package com.facebook.yoga; @@ -32,10 +32,10 @@ public void test_display_none() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -87,10 +87,10 @@ public void test_display_none_fixed_size() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -143,19 +143,16 @@ public void test_display_none_with_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 10f); - root_child0.setMargin(YogaEdge.TOP, 10f); - root_child0.setMargin(YogaEdge.RIGHT, 10f); - root_child0.setMargin(YogaEdge.BOTTOM, 10f); root_child0.setWidth(20f); root_child0.setHeight(20f); root_child0.setDisplay(YogaDisplay.NONE); + root_child0.setMargin(YogaEdge.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -203,10 +200,10 @@ public void test_display_none_with_child() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -295,10 +292,10 @@ public void test_display_none_with_position() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -306,8 +303,8 @@ public void test_display_none_with_position() { final YogaNode root_child1 = createNode(config); root_child1.setFlexGrow(1f); - root_child1.setPosition(YogaEdge.TOP, 10f); root_child1.setDisplay(YogaDisplay.NONE); + root_child1.setPosition(YogaEdge.TOP, 10f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -356,10 +353,10 @@ public void test_display_none_with_position_absolute() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); + root_child0.setDisplay(YogaDisplay.NONE); root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidth(100f); root_child0.setHeight(100f); - root_child0.setDisplay(YogaDisplay.NONE); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -393,10 +390,10 @@ public void test_display_contents() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setDisplay(YogaDisplay.CONTENTS); @@ -467,15 +464,15 @@ public void test_display_contents_fixed_size() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); + root_child0.setDisplay(YogaDisplay.CONTENTS); root_child0.setWidth(50f); root_child0.setHeight(50f); - root_child0.setDisplay(YogaDisplay.CONTENTS); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -543,19 +540,16 @@ public void test_display_contents_with_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 10f); - root_child0.setMargin(YogaEdge.TOP, 10f); - root_child0.setMargin(YogaEdge.RIGHT, 10f); - root_child0.setMargin(YogaEdge.BOTTOM, 10f); root_child0.setWidth(20f); root_child0.setHeight(20f); root_child0.setDisplay(YogaDisplay.CONTENTS); + root_child0.setMargin(YogaEdge.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -603,17 +597,14 @@ public void test_display_contents_with_padding() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 10); - root_child0.setPadding(YogaEdge.TOP, 10); - root_child0.setPadding(YogaEdge.RIGHT, 10); - root_child0.setPadding(YogaEdge.BOTTOM, 10); root_child0.setDisplay(YogaDisplay.CONTENTS); + root_child0.setPadding(YogaEdge.ALL, 10); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -681,14 +672,14 @@ public void test_display_contents_with_position() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setPosition(YogaEdge.TOP, 10f); root_child0.setDisplay(YogaDisplay.CONTENTS); + root_child0.setPosition(YogaEdge.TOP, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -756,16 +747,16 @@ public void test_display_contents_with_position_absolute() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); + root_child0.setDisplay(YogaDisplay.CONTENTS); root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidth(50f); root_child0.setHeight(50f); - root_child0.setDisplay(YogaDisplay.CONTENTS); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -833,10 +824,10 @@ public void test_display_contents_nested() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setDisplay(YogaDisplay.CONTENTS); @@ -921,10 +912,10 @@ public void test_display_contents_with_siblings() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); diff --git a/java/tests/generated/com/facebook/yoga/YGFlexDirectionTest.java b/java/tests/generated/com/facebook/yoga/YGFlexDirectionTest.java index aeabc4ee72..5a9ca1ae40 100644 --- a/java/tests/generated/com/facebook/yoga/YGFlexDirectionTest.java +++ b/java/tests/generated/com/facebook/yoga/YGFlexDirectionTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<5e698842feb033db77ff508df3f33b4a>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexDirectionTest.html + * @generated SignedSource<<6cca3f234b902a23ceaa2a5f200d1c13>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGFlexDirectionTest.html */ package com.facebook.yoga; @@ -98,9 +98,9 @@ public void test_flex_direction_row_no_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -166,8 +166,8 @@ public void test_flex_direction_column() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -232,10 +232,10 @@ public void test_flex_direction_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -300,10 +300,10 @@ public void test_flex_direction_column_reverse() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -368,10 +368,10 @@ public void test_flex_direction_row_reverse() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -436,11 +436,11 @@ public void test_flex_direction_row_reverse_margin_left() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.LEFT, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setMargin(YogaEdge.LEFT, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -505,11 +505,11 @@ public void test_flex_direction_row_reverse_margin_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.START, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setMargin(YogaEdge.START, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -574,11 +574,11 @@ public void test_flex_direction_row_reverse_margin_right() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.RIGHT, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setMargin(YogaEdge.RIGHT, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -643,11 +643,11 @@ public void test_flex_direction_row_reverse_margin_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.END, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setMargin(YogaEdge.END, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -712,11 +712,11 @@ public void test_flex_direction_column_reverse_margin_top() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.TOP, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setMargin(YogaEdge.TOP, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -781,11 +781,11 @@ public void test_flex_direction_column_reverse_margin_bottom() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.BOTTOM, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setMargin(YogaEdge.BOTTOM, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -850,11 +850,11 @@ public void test_flex_direction_row_reverse_padding_left() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 100); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPadding(YogaEdge.LEFT, 100); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -919,11 +919,11 @@ public void test_flex_direction_row_reverse_padding_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.START, 100); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPadding(YogaEdge.START, 100); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -988,11 +988,11 @@ public void test_flex_direction_row_reverse_padding_right() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.RIGHT, 100); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPadding(YogaEdge.RIGHT, 100); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1057,11 +1057,11 @@ public void test_flex_direction_row_reverse_padding_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.END, 100); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setPadding(YogaEdge.END, 100); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1126,11 +1126,11 @@ public void test_flex_direction_column_reverse_padding_top() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.TOP, 100); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setPadding(YogaEdge.TOP, 100); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1195,11 +1195,11 @@ public void test_flex_direction_column_reverse_padding_bottom() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.BOTTOM, 100); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setPadding(YogaEdge.BOTTOM, 100); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1264,11 +1264,11 @@ public void test_flex_direction_row_reverse_border_left() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.LEFT, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setBorder(YogaEdge.LEFT, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1333,11 +1333,11 @@ public void test_flex_direction_row_reverse_border_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.START, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setBorder(YogaEdge.START, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1402,11 +1402,11 @@ public void test_flex_direction_row_reverse_border_right() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.RIGHT, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setBorder(YogaEdge.RIGHT, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1471,11 +1471,11 @@ public void test_flex_direction_row_reverse_border_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.END, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setBorder(YogaEdge.END, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1540,11 +1540,11 @@ public void test_flex_direction_column_reverse_border_top() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.TOP, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setBorder(YogaEdge.TOP, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1609,11 +1609,11 @@ public void test_flex_direction_column_reverse_border_bottom() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setBorder(YogaEdge.BOTTOM, 100f); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); + root.setBorder(YogaEdge.BOTTOM, 100f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -1679,14 +1679,14 @@ public void test_flex_direction_row_reverse_pos_left() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(100f); + root_child0.setWidth(100f); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root_child0.setPosition(YogaEdge.LEFT, 100f); - root_child0.setWidth(100f); - root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1763,14 +1763,14 @@ public void test_flex_direction_row_reverse_pos_start() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(100f); + root_child0.setWidth(100f); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root_child0.setPosition(YogaEdge.START, 100f); - root_child0.setWidth(100f); - root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1847,14 +1847,14 @@ public void test_flex_direction_row_reverse_pos_right() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(100f); + root_child0.setWidth(100f); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root_child0.setPosition(YogaEdge.RIGHT, 100f); - root_child0.setWidth(100f); - root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1931,14 +1931,14 @@ public void test_flex_direction_row_reverse_pos_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(100f); + root_child0.setWidth(100f); root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root_child0.setPosition(YogaEdge.END, 100f); - root_child0.setWidth(100f); - root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2015,14 +2015,14 @@ public void test_flex_direction_column_reverse_pos_top() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(100f); + root_child0.setWidth(100f); root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root_child0.setPosition(YogaEdge.TOP, 100f); - root_child0.setWidth(100f); - root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2099,14 +2099,14 @@ public void test_flex_direction_column_reverse_pos_bottom() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(100f); + root_child0.setWidth(100f); root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root_child0.setPosition(YogaEdge.BOTTOM, 100f); - root_child0.setWidth(100f); - root_child0.setHeight(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2183,20 +2183,20 @@ public void test_flex_direction_row_reverse_inner_pos_left() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPosition(YogaEdge.LEFT, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPosition(YogaEdge.LEFT, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -2269,20 +2269,20 @@ public void test_flex_direction_row_reverse_inner_pos_right() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPosition(YogaEdge.RIGHT, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPosition(YogaEdge.RIGHT, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -2355,20 +2355,20 @@ public void test_flex_direction_col_reverse_inner_pos_top() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPosition(YogaEdge.TOP, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPosition(YogaEdge.TOP, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -2441,20 +2441,20 @@ public void test_flex_direction_col_reverse_inner_pos_bottom() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPosition(YogaEdge.BOTTOM, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPosition(YogaEdge.BOTTOM, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -2528,20 +2528,20 @@ public void test_flex_direction_row_reverse_inner_pos_start() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPosition(YogaEdge.START, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPosition(YogaEdge.START, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -2615,20 +2615,20 @@ public void test_flex_direction_row_reverse_inner_pos_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPosition(YogaEdge.END, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPosition(YogaEdge.END, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -2701,20 +2701,20 @@ public void test_flex_direction_row_reverse_inner_margin_left() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setMargin(YogaEdge.LEFT, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setMargin(YogaEdge.LEFT, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -2787,20 +2787,20 @@ public void test_flex_direction_row_reverse_inner_margin_right() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -2873,20 +2873,20 @@ public void test_flex_direction_col_reverse_inner_margin_top() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setMargin(YogaEdge.TOP, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setMargin(YogaEdge.TOP, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -2959,20 +2959,20 @@ public void test_flex_direction_col_reverse_inner_margin_bottom() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setMargin(YogaEdge.BOTTOM, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setMargin(YogaEdge.BOTTOM, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3045,20 +3045,20 @@ public void test_flex_direction_row_reverse_inner_marign_start() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setMargin(YogaEdge.START, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setMargin(YogaEdge.START, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3131,20 +3131,20 @@ public void test_flex_direction_row_reverse_inner_margin_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setMargin(YogaEdge.END, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setMargin(YogaEdge.END, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3217,20 +3217,20 @@ public void test_flex_direction_row_reverse_inner_border_left() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setBorder(YogaEdge.LEFT, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setBorder(YogaEdge.LEFT, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3303,20 +3303,20 @@ public void test_flex_direction_row_reverse_inner_border_right() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setBorder(YogaEdge.RIGHT, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setBorder(YogaEdge.RIGHT, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3389,20 +3389,20 @@ public void test_flex_direction_col_reverse_inner_border_top() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3475,20 +3475,20 @@ public void test_flex_direction_col_reverse_inner_border_bottom() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setBorder(YogaEdge.BOTTOM, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setBorder(YogaEdge.BOTTOM, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3561,20 +3561,20 @@ public void test_flex_direction_row_reverse_inner_border_start() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setBorder(YogaEdge.LEFT, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setBorder(YogaEdge.START, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3647,20 +3647,20 @@ public void test_flex_direction_row_reverse_inner_border_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setBorder(YogaEdge.RIGHT, 10f); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setBorder(YogaEdge.END, 10f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3733,20 +3733,20 @@ public void test_flex_direction_row_reverse_inner_padding_left() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPadding(YogaEdge.LEFT, 10); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPadding(YogaEdge.LEFT, 10); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3819,20 +3819,20 @@ public void test_flex_direction_row_reverse_inner_padding_right() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPadding(YogaEdge.RIGHT, 10); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPadding(YogaEdge.RIGHT, 10); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3905,20 +3905,20 @@ public void test_flex_direction_col_reverse_inner_padding_top() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPadding(YogaEdge.TOP, 10); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPadding(YogaEdge.TOP, 10); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -3991,20 +3991,20 @@ public void test_flex_direction_col_reverse_inner_padding_bottom() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 10); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 10); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -4077,20 +4077,20 @@ public void test_flex_direction_row_reverse_inner_padding_start() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPadding(YogaEdge.START, 10); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPadding(YogaEdge.START, 10); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -4163,20 +4163,20 @@ public void test_flex_direction_row_reverse_inner_padding_end() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setPadding(YogaEdge.END, 10); root_child0_child0.setWidth(10f); root_child0_child0.setHeight(10f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0.setPadding(YogaEdge.END, 10); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -4249,15 +4249,15 @@ public void test_flex_direction_alternating_with_percent() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(200f); root.setHeight(300f); + root.setWidth(200f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setHeightPercent(50f); + root_child0.setWidthPercent(50f); root_child0.setPositionPercent(YogaEdge.LEFT, 10f); root_child0.setPositionPercent(YogaEdge.TOP, 10f); - root_child0.setWidthPercent(50f); - root_child0.setHeightPercent(50f); + root_child0.setFlexDirection(YogaFlexDirection.ROW); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/java/tests/generated/com/facebook/yoga/YGFlexTest.java b/java/tests/generated/com/facebook/yoga/YGFlexTest.java index 8865140cfe..cf36fbd12e 100644 --- a/java/tests/generated/com/facebook/yoga/YGFlexTest.java +++ b/java/tests/generated/com/facebook/yoga/YGFlexTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexTest.html + * @generated SignedSource<<9d423a7b3fce868ebace7ffc938a4aea>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGFlexTest.html */ package com.facebook.yoga; @@ -37,8 +37,8 @@ public void test_flex_basis_flex_grow_column() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -86,21 +86,21 @@ public void test_flex_shrink_flex_grow_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexShrink(1f); root_child0.setWidth(500f); root_child0.setHeight(100f); + root_child0.setFlexShrink(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexShrink(1f); root_child1.setWidth(500f); root_child1.setHeight(100f); + root_child1.setFlexShrink(1f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -144,22 +144,22 @@ public void test_flex_shrink_flex_grow_child_flex_shrink_other_child() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexShrink(1f); root_child0.setWidth(500f); root_child0.setHeight(100f); + root_child0.setFlexShrink(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); - root_child1.setFlexShrink(1f); root_child1.setWidth(500f); root_child1.setHeight(100f); + root_child1.setFlexGrow(1f); + root_child1.setFlexShrink(1f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -203,14 +203,14 @@ public void test_flex_basis_flex_grow_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -263,8 +263,8 @@ public void test_flex_basis_flex_shrink_column() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexShrink(1f); root_child0.setFlexBasis(100f); + root_child0.setFlexShrink(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -312,14 +312,14 @@ public void test_flex_basis_flex_shrink_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexShrink(1f); root_child0.setFlexBasis(100f); + root_child0.setFlexShrink(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -376,9 +376,9 @@ public void test_flex_shrink_to_zero() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexShrink(1f); root_child1.setWidth(50f); root_child1.setHeight(50f); + root_child1.setFlexShrink(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -438,23 +438,23 @@ public void test_flex_basis_overrides_main_size() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(20f); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); - root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setHeight(10f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setHeight(10f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -509,8 +509,8 @@ public void test_flex_grow_shrink_at_most() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); root.addChildAt(root_child0, 0); @@ -562,8 +562,8 @@ public void test_flex_grow_less_than_factor_one() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(200f); root.setHeight(500f); + root.setWidth(200f); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(0.2f); diff --git a/java/tests/generated/com/facebook/yoga/YGFlexWrapTest.java b/java/tests/generated/com/facebook/yoga/YGFlexWrapTest.java index 31f73fc176..a0b08c0d08 100644 --- a/java/tests/generated/com/facebook/yoga/YGFlexWrapTest.java +++ b/java/tests/generated/com/facebook/yoga/YGFlexWrapTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexWrapTest.html + * @generated SignedSource<<42f3bb9cf24632362e8ad90c1e7041ef>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGFlexWrapTest.html */ package com.facebook.yoga; @@ -28,39 +28,40 @@ public static Iterable nodeFactories() { @Parameterized.Parameter public TestParametrization.NodeFactory mNodeFactory; @Test + @Ignore public void test_wrap_column() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(30f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(30f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(30f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); assertEquals(0f, root.getLayoutX(), 0.0f); assertEquals(0f, root.getLayoutY(), 0.0f); - assertEquals(60f, root.getLayoutWidth(), 0.0f); + assertEquals(30f, root.getLayoutWidth(), 0.0f); assertEquals(100f, root.getLayoutHeight(), 0.0f); assertEquals(0f, root_child0.getLayoutX(), 0.0f); @@ -88,25 +89,25 @@ public void test_wrap_column() { assertEquals(0f, root.getLayoutX(), 0.0f); assertEquals(0f, root.getLayoutY(), 0.0f); - assertEquals(60f, root.getLayoutWidth(), 0.0f); + assertEquals(30f, root.getLayoutWidth(), 0.0f); assertEquals(100f, root.getLayoutHeight(), 0.0f); - assertEquals(30f, root_child0.getLayoutX(), 0.0f); + assertEquals(0f, root_child0.getLayoutX(), 0.0f); assertEquals(0f, root_child0.getLayoutY(), 0.0f); assertEquals(30f, root_child0.getLayoutWidth(), 0.0f); assertEquals(30f, root_child0.getLayoutHeight(), 0.0f); - assertEquals(30f, root_child1.getLayoutX(), 0.0f); + assertEquals(0f, root_child1.getLayoutX(), 0.0f); assertEquals(30f, root_child1.getLayoutY(), 0.0f); assertEquals(30f, root_child1.getLayoutWidth(), 0.0f); assertEquals(30f, root_child1.getLayoutHeight(), 0.0f); - assertEquals(30f, root_child2.getLayoutX(), 0.0f); + assertEquals(0f, root_child2.getLayoutX(), 0.0f); assertEquals(60f, root_child2.getLayoutY(), 0.0f); assertEquals(30f, root_child2.getLayoutWidth(), 0.0f); assertEquals(30f, root_child2.getLayoutHeight(), 0.0f); - assertEquals(0f, root_child3.getLayoutX(), 0.0f); + assertEquals(-30f, root_child3.getLayoutX(), 0.0f); assertEquals(0f, root_child3.getLayoutY(), 0.0f); assertEquals(30f, root_child3.getLayoutWidth(), 0.0f); assertEquals(30f, root_child3.getLayoutHeight(), 0.0f); @@ -117,29 +118,29 @@ public void test_wrap_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(30f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(30f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(30f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -203,30 +204,30 @@ public void test_wrap_row_align_items_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignItems(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(10f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(20f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(30f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -290,30 +291,30 @@ public void test_wrap_row_align_items_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(10f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(20f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(30f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -377,21 +378,21 @@ public void test_flex_wrap_children_with_min_main_overriding_flex_basis() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexBasis(50f); - root_child0.setMinWidth(55f); root_child0.setHeight(50f); + root_child0.setMinWidth(55f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setFlexBasis(50f); - root_child1.setMinWidth(55f); root_child1.setHeight(50f); + root_child1.setMinWidth(55f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -448,8 +449,8 @@ public void test_flex_wrap_wrap_to_child_height() { root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setWidth(100f); root_child0_child0_child0.setHeight(100f); + root_child0_child0_child0.setWidth(100f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child1 = createNode(config); @@ -518,11 +519,11 @@ public void test_flex_wrap_align_stretch_fits_one_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(150f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -573,34 +574,34 @@ public void test_wrap_reverse_row_align_content_flex_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP_REVERSE); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(10f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(20f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(40f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); - root_child4.setWidth(30f); root_child4.setHeight(50f); + root_child4.setWidth(30f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -674,35 +675,35 @@ public void test_wrap_reverse_row_align_content_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP_REVERSE); + root.setAlignContent(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(10f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(20f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(40f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); - root_child4.setWidth(30f); root_child4.setHeight(50f); + root_child4.setWidth(30f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -776,34 +777,34 @@ public void test_wrap_reverse_row_single_line_different_size() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(300f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP_REVERSE); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(10f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(20f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(40f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); - root_child4.setWidth(30f); root_child4.setHeight(50f); + root_child4.setWidth(30f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -877,35 +878,35 @@ public void test_wrap_reverse_row_align_content_stretch() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP_REVERSE); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(10f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(20f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(40f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); - root_child4.setWidth(30f); root_child4.setHeight(50f); + root_child4.setWidth(30f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -979,35 +980,35 @@ public void test_wrap_reverse_row_align_content_space_around() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_AROUND); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP_REVERSE); + root.setAlignContent(YogaAlign.SPACE_AROUND); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(10f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(20f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(40f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); - root_child4.setWidth(30f); root_child4.setHeight(50f); + root_child4.setWidth(30f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1081,35 +1082,35 @@ public void test_wrap_reverse_column_fixed_size() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP_REVERSE); root.setWidth(200f); root.setHeight(100f); + root.setWrap(YogaWrap.WRAP_REVERSE); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(30f); root_child0.setHeight(10f); + root_child0.setWidth(30f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setWidth(30f); root_child1.setHeight(20f); + root_child1.setWidth(30f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setWidth(30f); root_child2.setHeight(30f); + root_child2.setWidth(30f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setWidth(30f); root_child3.setHeight(40f); + root_child3.setWidth(30f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); - root_child4.setWidth(30f); root_child4.setHeight(50f); + root_child4.setWidth(30f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1183,10 +1184,10 @@ public void test_wrapped_row_within_align_items_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -1254,10 +1255,10 @@ public void test_wrapped_row_within_align_items_flex_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -1325,10 +1326,10 @@ public void test_wrapped_row_within_align_items_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -1396,13 +1397,13 @@ public void test_wrapped_column_max_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + root.setHeight(500f); + root.setWidth(700f); + root.setAlignItems(YogaAlign.CENTER); root.setJustifyContent(YogaJustify.CENTER); root.setAlignContent(YogaAlign.CENTER); - root.setAlignItems(YogaAlign.CENTER); - root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); - root.setWidth(700f); - root.setHeight(500f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(100f); @@ -1411,12 +1412,9 @@ public void test_wrapped_column_max_height() { root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setMargin(YogaEdge.LEFT, 20f); - root_child1.setMargin(YogaEdge.TOP, 20f); - root_child1.setMargin(YogaEdge.RIGHT, 20f); - root_child1.setMargin(YogaEdge.BOTTOM, 20f); root_child1.setWidth(200f); root_child1.setHeight(200f); + root_child1.setMargin(YogaEdge.ALL, 20f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -1475,33 +1473,30 @@ public void test_wrapped_column_max_height_flex() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); + root.setHeight(500f); + root.setWidth(700f); + root.setAlignItems(YogaAlign.CENTER); root.setJustifyContent(YogaJustify.CENTER); root.setAlignContent(YogaAlign.CENTER); - root.setAlignItems(YogaAlign.CENTER); - root.setPositionType(YogaPositionType.ABSOLUTE); root.setWrap(YogaWrap.WRAP); - root.setWidth(700f); - root.setHeight(500f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); - root_child0.setFlexShrink(1f); - root_child0.setFlexBasisPercent(0f); root_child0.setWidth(100f); root_child0.setHeight(500f); root_child0.setMaxHeight(200f); + root_child0.setFlexGrow(1f); + root_child0.setFlexShrink(1f); + root_child0.setFlexBasisPercent(0f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setWidth(200f); + root_child1.setHeight(200f); + root_child1.setMargin(YogaEdge.ALL, 20f); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); - root_child1.setMargin(YogaEdge.LEFT, 20f); - root_child1.setMargin(YogaEdge.TOP, 20f); - root_child1.setMargin(YogaEdge.RIGHT, 20f); - root_child1.setMargin(YogaEdge.BOTTOM, 20f); - root_child1.setWidth(200f); - root_child1.setHeight(200f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -1574,8 +1569,8 @@ public void test_wrap_nodes_with_content_sizing_overflowing_margin() { root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setWidth(40f); root_child0_child0_child0.setHeight(40f); + root_child0_child0_child0.setWidth(40f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -1583,8 +1578,8 @@ public void test_wrap_nodes_with_content_sizing_overflowing_margin() { root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child1_child0 = createNode(config); - root_child0_child1_child0.setWidth(40f); root_child0_child1_child0.setHeight(40f); + root_child0_child1_child0.setWidth(40f); root_child0_child1.addChildAt(root_child0_child1_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1672,8 +1667,8 @@ public void test_wrap_nodes_with_content_sizing_margin_cross() { root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setWidth(40f); root_child0_child0_child0.setHeight(40f); + root_child0_child0_child0.setWidth(40f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -1681,8 +1676,8 @@ public void test_wrap_nodes_with_content_sizing_margin_cross() { root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child1_child0 = createNode(config); - root_child0_child1_child0.setWidth(40f); root_child0_child1_child0.setHeight(40f); + root_child0_child1_child0.setWidth(40f); root_child0_child1.addChildAt(root_child0_child1_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1756,11 +1751,11 @@ public void test_wrap_with_min_cross_axis() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(500f); root.setMinHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(400f); @@ -1813,11 +1808,11 @@ public void test_wrap_with_max_cross_axis() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setWidth(500f); root.setMaxHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(400f); @@ -1870,9 +1865,9 @@ public void test_nowrap_expands_flexline_box_to_min_cross() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinHeight(400f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -1911,10 +1906,10 @@ public void test_wrap_does_not_impose_min_cross_onto_single_flexline() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setMinHeight(400f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); diff --git a/java/tests/generated/com/facebook/yoga/YGGapTest.java b/java/tests/generated/com/facebook/yoga/YGGapTest.java index 2a899b6450..0387dc5ad9 100644 --- a/java/tests/generated/com/facebook/yoga/YGGapTest.java +++ b/java/tests/generated/com/facebook/yoga/YGGapTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGGapTest.html + * @generated SignedSource<<1bf35956f67606a5ecbce54bba0b41df>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGGapTest.html */ package com.facebook.yoga; @@ -32,8 +32,8 @@ public void test_column_gap_flexible() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(80f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -108,8 +108,8 @@ public void test_column_gap_inflexible() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(80f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -177,8 +177,8 @@ public void test_column_gap_mixed_flexible() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(80f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -248,8 +248,8 @@ public void test_column_gap_child_margins() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(80f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -258,24 +258,21 @@ public void test_column_gap_child_margins() { root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); - root_child0.setMargin(YogaEdge.LEFT, 2f); - root_child0.setMargin(YogaEdge.RIGHT, 2f); + root_child0.setMargin(YogaEdge.HORIZONTAL, 2f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); - root_child1.setMargin(YogaEdge.LEFT, 10f); - root_child1.setMargin(YogaEdge.RIGHT, 10f); + root_child1.setMargin(YogaEdge.HORIZONTAL, 10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); root_child2.setFlexGrow(1f); root_child2.setFlexShrink(1f); root_child2.setFlexBasisPercent(0f); - root_child2.setMargin(YogaEdge.LEFT, 15f); - root_child2.setMargin(YogaEdge.RIGHT, 15f); + root_child2.setMargin(YogaEdge.HORIZONTAL, 15f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -329,8 +326,8 @@ public void test_column_row_gap_wrapping() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); root.setWidth(80f); root.setGap(YogaGutter.COLUMN, 10f); @@ -492,17 +489,17 @@ public void test_column_gap_start_index() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); root.setWidth(80f); root.setGap(YogaGutter.COLUMN, 10f); root.setGap(YogaGutter.ROW, 20f); final YogaNode root_child0 = createNode(config); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -581,8 +578,8 @@ public void test_column_gap_justify_flex_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -650,9 +647,9 @@ public void test_column_gap_justify_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.CENTER); - root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -720,9 +717,9 @@ public void test_column_gap_justify_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.FLEX_END); - root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -790,9 +787,9 @@ public void test_column_gap_justify_space_between() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.SPACE_BETWEEN); - root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -860,9 +857,9 @@ public void test_column_gap_justify_space_around() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.SPACE_AROUND); - root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -930,9 +927,9 @@ public void test_column_gap_justify_space_evenly() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); + root.setPositionType(YogaPositionType.ABSOLUTE); root.setFlexDirection(YogaFlexDirection.ROW); root.setJustifyContent(YogaJustify.SPACE_EVENLY); - root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -1000,8 +997,8 @@ public void test_column_gap_wrap_align_flex_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(100f); @@ -1119,10 +1116,10 @@ public void test_column_gap_wrap_align_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.CENTER); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -1239,10 +1236,10 @@ public void test_column_gap_wrap_align_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.FLEX_END); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -1359,10 +1356,10 @@ public void test_column_gap_wrap_align_space_between() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_BETWEEN); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.SPACE_BETWEEN); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -1479,10 +1476,10 @@ public void test_column_gap_wrap_align_space_around() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.SPACE_AROUND); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); + root.setAlignContent(YogaAlign.SPACE_AROUND); root.setWidth(100f); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -1599,37 +1596,37 @@ public void test_column_gap_wrap_align_stretch() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); root.setWidth(300f); root.setHeight(300f); root.setGap(YogaGutter.COLUMN, 5f); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setMinWidth(60f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setMinWidth(60f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setMinWidth(60f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setFlexGrow(1f); root_child3.setMinWidth(60f); + root_child3.setFlexGrow(1f); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); - root_child4.setFlexGrow(1f); root_child4.setMinWidth(60f); + root_child4.setFlexGrow(1f); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1703,8 +1700,8 @@ public void test_column_gap_determines_parent_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setHeight(100f); root.setGap(YogaGutter.COLUMN, 10f); @@ -1771,14 +1768,14 @@ public void test_row_gap_align_items_stretch() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(200f); root.setGap(YogaGutter.COLUMN, 10f); root.setGap(YogaGutter.ROW, 20f); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setWidth(20f); @@ -1885,14 +1882,14 @@ public void test_row_gap_align_items_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(200f); root.setGap(YogaGutter.COLUMN, 10f); root.setGap(YogaGutter.ROW, 20f); + root.setAlignItems(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); root_child0.setWidth(20f); @@ -2008,24 +2005,21 @@ public void test_row_gap_column_child_margins() { root_child0.setFlexGrow(1f); root_child0.setFlexShrink(1f); root_child0.setFlexBasisPercent(0f); - root_child0.setMargin(YogaEdge.TOP, 2f); - root_child0.setMargin(YogaEdge.BOTTOM, 2f); + root_child0.setMargin(YogaEdge.VERTICAL, 2f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); root_child1.setFlexGrow(1f); root_child1.setFlexShrink(1f); root_child1.setFlexBasisPercent(0f); - root_child1.setMargin(YogaEdge.TOP, 10f); - root_child1.setMargin(YogaEdge.BOTTOM, 10f); + root_child1.setMargin(YogaEdge.VERTICAL, 10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); root_child2.setFlexGrow(1f); root_child2.setFlexShrink(1f); root_child2.setFlexBasisPercent(0f); - root_child2.setMargin(YogaEdge.TOP, 15f); - root_child2.setMargin(YogaEdge.BOTTOM, 15f); + root_child2.setMargin(YogaEdge.VERTICAL, 15f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2079,29 +2073,26 @@ public void test_row_gap_row_wrap_child_margins() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWrap(YogaWrap.WRAP); root.setWidth(100f); root.setHeight(200f); root.setGap(YogaGutter.ROW, 10f); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.TOP, 2f); - root_child0.setMargin(YogaEdge.BOTTOM, 2f); root_child0.setWidth(60f); + root_child0.setMargin(YogaEdge.VERTICAL, 2f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setMargin(YogaEdge.TOP, 10f); - root_child1.setMargin(YogaEdge.BOTTOM, 10f); root_child1.setWidth(60f); + root_child1.setMargin(YogaEdge.VERTICAL, 10f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setMargin(YogaEdge.TOP, 15f); - root_child2.setMargin(YogaEdge.BOTTOM, 15f); root_child2.setWidth(60f); + root_child2.setMargin(YogaEdge.VERTICAL, 15f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2222,17 +2213,13 @@ public void test_row_gap_percent_wrapping() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setPadding(YogaEdge.LEFT, 10); - root.setPadding(YogaEdge.TOP, 10); - root.setPadding(YogaEdge.RIGHT, 10); - root.setPadding(YogaEdge.BOTTOM, 10); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(300f); root.setHeight(700f); - root.setGapPercent(YogaGutter.COLUMN, 10f); - root.setGapPercent(YogaGutter.ROW, 10f); + root.setPadding(YogaEdge.ALL, 10); + root.setGapPercent(YogaGutter.ALL, 10f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(100f); @@ -2330,12 +2317,11 @@ public void test_row_gap_percent_determines_parent_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(300f); - root.setGapPercent(YogaGutter.COLUMN, 10f); - root.setGapPercent(YogaGutter.ROW, 10f); + root.setGapPercent(YogaGutter.ALL, 10f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(100f); @@ -2433,61 +2419,42 @@ public void test_row_gap_percent_wrapping_with_both_content_padding_and_item_pad YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setPadding(YogaEdge.LEFT, 10); - root.setPadding(YogaEdge.TOP, 10); - root.setPadding(YogaEdge.RIGHT, 10); - root.setPadding(YogaEdge.BOTTOM, 10); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(300f); root.setHeight(700f); - root.setGapPercent(YogaGutter.COLUMN, 10f); - root.setGapPercent(YogaGutter.ROW, 10f); + root.setPadding(YogaEdge.ALL, 10); + root.setGapPercent(YogaGutter.ALL, 10f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 10); - root_child0.setPadding(YogaEdge.TOP, 10); - root_child0.setPadding(YogaEdge.RIGHT, 10); - root_child0.setPadding(YogaEdge.BOTTOM, 10); root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setPadding(YogaEdge.ALL, 10); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setPadding(YogaEdge.LEFT, 10); - root_child1.setPadding(YogaEdge.TOP, 10); - root_child1.setPadding(YogaEdge.RIGHT, 10); - root_child1.setPadding(YogaEdge.BOTTOM, 10); root_child1.setWidth(100f); root_child1.setHeight(100f); + root_child1.setPadding(YogaEdge.ALL, 10); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setPadding(YogaEdge.LEFT, 10); - root_child2.setPadding(YogaEdge.TOP, 10); - root_child2.setPadding(YogaEdge.RIGHT, 10); - root_child2.setPadding(YogaEdge.BOTTOM, 10); root_child2.setWidth(100f); root_child2.setHeight(100f); + root_child2.setPadding(YogaEdge.ALL, 10); root.addChildAt(root_child2, 2); final YogaNode root_child3 = createNode(config); - root_child3.setPadding(YogaEdge.LEFT, 10); - root_child3.setPadding(YogaEdge.TOP, 10); - root_child3.setPadding(YogaEdge.RIGHT, 10); - root_child3.setPadding(YogaEdge.BOTTOM, 10); root_child3.setWidth(100f); root_child3.setHeight(100f); + root_child3.setPadding(YogaEdge.ALL, 10); root.addChildAt(root_child3, 3); final YogaNode root_child4 = createNode(config); - root_child4.setPadding(YogaEdge.LEFT, 10); - root_child4.setPadding(YogaEdge.TOP, 10); - root_child4.setPadding(YogaEdge.RIGHT, 10); - root_child4.setPadding(YogaEdge.BOTTOM, 10); root_child4.setWidth(100f); root_child4.setHeight(100f); + root_child4.setPadding(YogaEdge.ALL, 10); root.addChildAt(root_child4, 4); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2561,17 +2528,13 @@ public void test_row_gap_percent_wrapping_with_both_content_padding() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setPadding(YogaEdge.LEFT, 10); - root.setPadding(YogaEdge.TOP, 10); - root.setPadding(YogaEdge.RIGHT, 10); - root.setPadding(YogaEdge.BOTTOM, 10); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(300f); root.setHeight(700f); - root.setGapPercent(YogaGutter.COLUMN, 10f); - root.setGapPercent(YogaGutter.ROW, 10f); + root.setPadding(YogaEdge.ALL, 10); + root.setGapPercent(YogaGutter.ALL, 10f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(100f); @@ -2669,17 +2632,13 @@ public void test_row_gap_percent_wrapping_with_content_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setMargin(YogaEdge.LEFT, 10f); - root.setMargin(YogaEdge.TOP, 10f); - root.setMargin(YogaEdge.RIGHT, 10f); - root.setMargin(YogaEdge.BOTTOM, 10f); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(300f); root.setHeight(700f); - root.setGapPercent(YogaGutter.COLUMN, 10f); - root.setGapPercent(YogaGutter.ROW, 10f); + root.setMargin(YogaEdge.ALL, 10f); + root.setGapPercent(YogaGutter.ALL, 10f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(100f); @@ -2777,21 +2736,14 @@ public void test_row_gap_percent_wrapping_with_content_margin_and_padding() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setMargin(YogaEdge.LEFT, 10f); - root.setMargin(YogaEdge.TOP, 10f); - root.setMargin(YogaEdge.RIGHT, 10f); - root.setMargin(YogaEdge.BOTTOM, 10f); - root.setPadding(YogaEdge.LEFT, 10); - root.setPadding(YogaEdge.TOP, 10); - root.setPadding(YogaEdge.RIGHT, 10); - root.setPadding(YogaEdge.BOTTOM, 10); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(300f); root.setHeight(700f); - root.setGapPercent(YogaGutter.COLUMN, 10f); - root.setGapPercent(YogaGutter.ROW, 10f); + root.setMargin(YogaEdge.ALL, 10f); + root.setPadding(YogaEdge.ALL, 10); + root.setGapPercent(YogaGutter.ALL, 10f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(100f); @@ -2889,12 +2841,11 @@ public void test_row_gap_percent_wrapping_with_flexible_content() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(300f); root.setHeight(300f); - root.setGapPercent(YogaGutter.COLUMN, 10f); - root.setGapPercent(YogaGutter.ROW, 10f); + root.setGapPercent(YogaGutter.ALL, 10f); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -2965,12 +2916,11 @@ public void test_row_gap_percent_wrapping_with_mixed_flexible_content() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(300f); root.setHeight(300f); - root.setGapPercent(YogaGutter.COLUMN, 10f); - root.setGapPercent(YogaGutter.ROW, 10f); + root.setGapPercent(YogaGutter.ALL, 10f); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -3038,12 +2988,11 @@ public void test_row_gap_percent_wrapping_with_min_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); root.setMinWidth(300f); - root.setGapPercent(YogaGutter.COLUMN, 10f); - root.setGapPercent(YogaGutter.ROW, 10f); + root.setGapPercent(YogaGutter.ALL, 10f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(100f); diff --git a/java/tests/generated/com/facebook/yoga/YGIntrinsicSizeTest.java b/java/tests/generated/com/facebook/yoga/YGIntrinsicSizeTest.java index 95c98570f7..25863e2273 100644 --- a/java/tests/generated/com/facebook/yoga/YGIntrinsicSizeTest.java +++ b/java/tests/generated/com/facebook/yoga/YGIntrinsicSizeTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<750c3eb87df8af0b92ba799ed2d61227>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGIntrinsicSizeTest.html + * @generated SignedSource<<4f4bde7775299127acc8a118ff1a9c74>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGIntrinsicSizeTest.html */ package com.facebook.yoga; @@ -32,10 +32,10 @@ public void test_contains_inner_text_long_word() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -74,10 +74,10 @@ public void test_contains_inner_text_no_width_no_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -116,10 +116,10 @@ public void test_contains_inner_text_no_width_no_height_long_word_in_paragraph() YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -158,10 +158,10 @@ public void test_contains_inner_text_fixed_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -201,10 +201,10 @@ public void test_contains_inner_text_no_width_fixed_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -244,10 +244,10 @@ public void test_contains_inner_text_fixed_width_fixed_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -288,10 +288,10 @@ public void test_contains_inner_text_max_width_max_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -332,9 +332,9 @@ public void test_contains_inner_text_max_width_max_height_column() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setMaxWidth(50f); @@ -373,10 +373,10 @@ public void test_contains_inner_text_max_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -416,10 +416,10 @@ public void test_contains_inner_text_fixed_width_shorter_text() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -459,10 +459,10 @@ public void test_contains_inner_text_fixed_height_shorter_text() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -502,10 +502,10 @@ public void test_contains_inner_text_max_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(2000f); root.setHeight(2000f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -545,10 +545,10 @@ public void test_max_content_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidthMaxContent(); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -622,8 +622,8 @@ public void test_fit_content_width() { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setWrap(YogaWrap.WRAP); root_child0.setWidthFitContent(); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -707,8 +707,8 @@ public void test_stretch_width() { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setWrap(YogaWrap.WRAP); root_child0.setWidthStretch(); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -788,8 +788,8 @@ public void test_max_content_height() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setHeightMaxContent(); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -862,8 +862,8 @@ public void test_fit_content_height() { root.setHeight(90f); final YogaNode root_child0 = createNode(config); - root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeightFitContent(); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -947,8 +947,8 @@ public void test_stretch_height() { root.setHeight(500f); final YogaNode root_child0 = createNode(config); - root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeightStretch(); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1028,8 +1028,8 @@ public void test_max_content_flex_basis_column() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); root.setFlexBasisMaxContent(); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1102,8 +1102,8 @@ public void test_fit_content_flex_basis_column() { root.setHeight(90f); final YogaNode root_child0 = createNode(config); - root_child0.setWrap(YogaWrap.WRAP); root_child0.setFlexBasisFitContent(); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1186,6 +1186,7 @@ public void test_stretch_flex_basis_column() { root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setFlexBasisStretch(); root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); @@ -1266,10 +1267,10 @@ public void test_max_content_flex_basis_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); + root.setFlexDirection(YogaFlexDirection.ROW); root.setFlexBasisMaxContent(); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1343,8 +1344,8 @@ public void test_fit_content_flex_basis_row() { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setWrap(YogaWrap.WRAP); root_child0.setFlexBasisFitContent(); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1429,6 +1430,7 @@ public void test_stretch_flex_basis_row() { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); + root_child0.setFlexBasisStretch(); root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); @@ -1509,11 +1511,11 @@ public void test_max_content_max_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setWidth(200f); + root.setFlexDirection(YogaFlexDirection.ROW); root.setMaxWidthMaxContent(); + root.setWidth(200f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1587,9 +1589,9 @@ public void test_fit_content_max_width() { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setWrap(YogaWrap.WRAP); - root_child0.setWidth(110f); root_child0.setMaxWidthFitContent(); + root_child0.setWidth(110f); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1674,9 +1676,9 @@ public void test_stretch_max_width() { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setWrap(YogaWrap.WRAP); - root_child0.setWidth(600f); root_child0.setMaxWidthStretch(); + root_child0.setWidth(600f); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1756,11 +1758,11 @@ public void test_max_content_min_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setWidth(100f); + root.setFlexDirection(YogaFlexDirection.ROW); root.setMinWidthMaxContent(); + root.setWidth(100f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -1834,9 +1836,9 @@ public void test_fit_content_min_width() { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setWrap(YogaWrap.WRAP); - root_child0.setWidth(90f); root_child0.setMinWidthFitContent(); + root_child0.setWidth(90f); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1921,9 +1923,9 @@ public void test_stretch_min_width() { final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setWrap(YogaWrap.WRAP); - root_child0.setWidth(400f); root_child0.setMinWidthStretch(); + root_child0.setWidth(400f); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2004,9 +2006,9 @@ public void test_max_content_max_height() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setHeight(200f); root.setMaxHeightMaxContent(); + root.setHeight(200f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -2079,9 +2081,9 @@ public void test_fit_content_max_height() { root.setHeight(90f); final YogaNode root_child0 = createNode(config); - root_child0.setWrap(YogaWrap.WRAP); - root_child0.setHeight(110f); root_child0.setMaxHeightFitContent(); + root_child0.setHeight(110f); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2165,9 +2167,9 @@ public void test_stretch_max_height() { root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setMaxHeightStretch(); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(600f); - root_child0.setMaxHeightStretch(); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2248,9 +2250,9 @@ public void test_max_content_min_height() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWrap(YogaWrap.WRAP); - root.setHeight(100f); root.setMinHeightMaxContent(); + root.setHeight(100f); + root.setWrap(YogaWrap.WRAP); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -2323,9 +2325,9 @@ public void test_fit_content_min_height() { root.setHeight(90f); final YogaNode root_child0 = createNode(config); - root_child0.setWrap(YogaWrap.WRAP); - root_child0.setHeight(90f); root_child0.setMinHeightFitContent(); + root_child0.setHeight(90f); + root_child0.setWrap(YogaWrap.WRAP); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2409,9 +2411,9 @@ public void test_stretch_min_height() { root.setHeight(500f); final YogaNode root_child0 = createNode(config); + root_child0.setMinHeightStretch(); root_child0.setWrap(YogaWrap.WRAP); root_child0.setHeight(400f); - root_child0.setMinHeightStretch(); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2660,8 +2662,8 @@ public void test_text_max_content_min_width() { root.setWidth(200f); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(200f); root_child0.setMinWidthMaxContent(); + root_child0.setWidth(200f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2716,8 +2718,8 @@ public void test_text_stretch_min_width() { root.setWidth(200f); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(100f); root_child0.setMinWidthStretch(); + root_child0.setWidth(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2772,8 +2774,8 @@ public void test_text_fit_content_min_width() { root.setWidth(200f); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(300f); root_child0.setMinWidthFitContent(); + root_child0.setWidth(300f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2828,8 +2830,8 @@ public void test_text_max_content_max_width() { root.setWidth(200f); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(2000f); root_child0.setMaxWidthMaxContent(); + root_child0.setWidth(2000f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2884,8 +2886,8 @@ public void test_text_stretch_max_width() { root.setWidth(200f); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(300f); root_child0.setMaxWidthStretch(); + root_child0.setWidth(300f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -2940,8 +2942,8 @@ public void test_text_fit_content_max_width() { root.setWidth(200f); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(1000f); root_child0.setMaxWidthFitContent(); + root_child0.setWidth(1000f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); diff --git a/java/tests/generated/com/facebook/yoga/YGJustifyContentTest.java b/java/tests/generated/com/facebook/yoga/YGJustifyContentTest.java index fa47b0c3b5..288030b27e 100644 --- a/java/tests/generated/com/facebook/yoga/YGJustifyContentTest.java +++ b/java/tests/generated/com/facebook/yoga/YGJustifyContentTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGJustifyContentTest.html + * @generated SignedSource<<8153ff1a843e9f95e5cc8c0243e582bc>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGJustifyContentTest.html */ package com.facebook.yoga; @@ -32,10 +32,10 @@ public void test_justify_content_row_flex_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -100,11 +100,11 @@ public void test_justify_content_row_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.FLEX_END); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -169,11 +169,11 @@ public void test_justify_content_row_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -238,11 +238,11 @@ public void test_justify_content_row_space_between() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.SPACE_BETWEEN); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.SPACE_BETWEEN); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -307,11 +307,11 @@ public void test_justify_content_row_space_around() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.SPACE_AROUND); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.SPACE_AROUND); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -443,10 +443,10 @@ public void test_justify_content_column_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setJustifyContent(YogaJustify.FLEX_END); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -511,10 +511,10 @@ public void test_justify_content_column_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -579,10 +579,10 @@ public void test_justify_content_column_space_between() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.SPACE_BETWEEN); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setJustifyContent(YogaJustify.SPACE_BETWEEN); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -647,10 +647,10 @@ public void test_justify_content_column_space_around() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.SPACE_AROUND); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setJustifyContent(YogaJustify.SPACE_AROUND); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -715,15 +715,15 @@ public void test_justify_content_row_min_width_and_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.LEFT, 100f); root.setMinWidth(50f); + root.setMargin(YogaEdge.LEFT, 100f); + root.setJustifyContent(YogaJustify.CENTER); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setWidth(20f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -757,16 +757,16 @@ public void test_justify_content_row_max_width_and_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.LEFT, 100f); root.setWidth(100f); root.setMaxWidth(80f); + root.setMargin(YogaEdge.LEFT, 100f); + root.setJustifyContent(YogaJustify.CENTER); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setWidth(20f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -800,14 +800,14 @@ public void test_justify_content_column_min_height_and_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.TOP, 100f); root.setMinHeight(50f); + root.setMargin(YogaEdge.TOP, 100f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setWidth(20f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -841,15 +841,15 @@ public void test_justify_content_column_max_height_and_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMargin(YogaEdge.TOP, 100f); root.setHeight(100f); root.setMaxHeight(80f); + root.setMargin(YogaEdge.TOP, 100f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(20f); root_child0.setHeight(20f); + root_child0.setWidth(20f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -883,10 +883,10 @@ public void test_justify_content_column_space_evenly() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setJustifyContent(YogaJustify.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -951,11 +951,11 @@ public void test_justify_content_row_space_evenly() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setJustifyContent(YogaJustify.SPACE_EVENLY); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -1020,10 +1020,10 @@ public void test_justify_content_min_width_with_padding_child_width_greater_than YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(1000f); root.setHeight(1584f); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -1034,16 +1034,16 @@ public void test_justify_content_min_width_with_padding_child_width_greater_than root_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0.setJustifyContent(YogaJustify.CENTER); root_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0.setMinWidth(400f); root_child0_child0.setPadding(YogaEdge.LEFT, 100); root_child0_child0.setPadding(YogaEdge.RIGHT, 100); - root_child0_child0.setMinWidth(400f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); - root_child0_child0_child0.setWidth(300f); root_child0_child0_child0.setHeight(100f); + root_child0_child0_child0.setWidth(300f); + root_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1097,10 +1097,10 @@ public void test_justify_content_min_width_with_padding_child_width_lower_than_p YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignContent(YogaAlign.STRETCH); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(1080f); root.setHeight(1584f); + root.setAlignContent(YogaAlign.STRETCH); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -1111,16 +1111,16 @@ public void test_justify_content_min_width_with_padding_child_width_lower_than_p root_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0.setJustifyContent(YogaJustify.CENTER); root_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0.setMinWidth(400f); root_child0_child0.setPadding(YogaEdge.LEFT, 100); root_child0_child0.setPadding(YogaEdge.RIGHT, 100); - root_child0_child0.setMinWidth(400f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); - root_child0_child0_child0.setWidth(199f); root_child0_child0_child0.setHeight(100f); + root_child0_child0_child0.setWidth(199f); + root_child0_child0_child0.setAlignContent(YogaAlign.STRETCH); + root_child0_child0_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1174,14 +1174,14 @@ public void test_justify_content_space_between_indefinite_container_dim_with_fre YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(300f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setJustifyContent(YogaJustify.SPACE_BETWEEN); root_child0.setMinWidth(200f); + root_child0.setJustifyContent(YogaJustify.SPACE_BETWEEN); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1245,10 +1245,10 @@ public void test_justify_content_flex_start_row_reverse() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(20f); @@ -1313,10 +1313,10 @@ public void test_justify_content_flex_end_row_reverse() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); final YogaNode root_child0 = createNode(config); root_child0.setWidth(20f); @@ -1381,10 +1381,10 @@ public void test_justify_content_overflow_row_flex_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(40f); @@ -1449,11 +1449,11 @@ public void test_justify_content_overflow_row_flex_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.FLEX_END); final YogaNode root_child0 = createNode(config); root_child0.setWidth(40f); @@ -1518,11 +1518,11 @@ public void test_justify_content_overflow_row_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setWidth(40f); @@ -1587,11 +1587,11 @@ public void test_justify_content_overflow_row_space_between() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.SPACE_BETWEEN); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.SPACE_BETWEEN); final YogaNode root_child0 = createNode(config); root_child0.setWidth(40f); @@ -1656,11 +1656,11 @@ public void test_justify_content_overflow_row_space_around() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.SPACE_AROUND); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.SPACE_AROUND); final YogaNode root_child0 = createNode(config); root_child0.setWidth(40f); @@ -1725,11 +1725,11 @@ public void test_justify_content_overflow_row_space_evenly() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); root_child0.setWidth(40f); @@ -1795,11 +1795,11 @@ public void test_justify_content_overflow_row_reverse_space_around() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root.setJustifyContent(YogaJustify.SPACE_AROUND); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setJustifyContent(YogaJustify.SPACE_AROUND); final YogaNode root_child0 = createNode(config); root_child0.setWidth(40f); @@ -1865,11 +1865,11 @@ public void test_justify_content_overflow_row_reverse_space_evenly() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); - root.setJustifyContent(YogaJustify.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW_REVERSE); + root.setJustifyContent(YogaJustify.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); root_child0.setWidth(40f); @@ -1934,15 +1934,15 @@ public void test_justify_content_overflow_row_space_evenly_auto_margin() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.SPACE_EVENLY); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(102f); root.setHeight(102f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.SPACE_EVENLY); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(40f); + root_child0.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); diff --git a/java/tests/generated/com/facebook/yoga/YGMarginTest.java b/java/tests/generated/com/facebook/yoga/YGMarginTest.java index 97816cae95..8c51729582 100644 --- a/java/tests/generated/com/facebook/yoga/YGMarginTest.java +++ b/java/tests/generated/com/facebook/yoga/YGMarginTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGMarginTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGMarginTest.html */ package com.facebook.yoga; @@ -32,14 +32,14 @@ public void test_margin_start() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.START, 10f); root_child0.setWidth(10f); + root_child0.setMargin(YogaEdge.START, 10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -78,8 +78,8 @@ public void test_margin_top() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.TOP, 10f); root_child0.setHeight(10f); + root_child0.setMargin(YogaEdge.TOP, 10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -113,15 +113,15 @@ public void test_margin_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setJustifyContent(YogaJustify.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setJustifyContent(YogaJustify.FLEX_END); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.END, 10f); root_child0.setWidth(10f); + root_child0.setMargin(YogaEdge.END, 10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -155,14 +155,14 @@ public void test_margin_bottom() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setJustifyContent(YogaJustify.FLEX_END); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.BOTTOM, 10f); root_child0.setHeight(10f); + root_child0.setMargin(YogaEdge.BOTTOM, 10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -196,15 +196,15 @@ public void test_margin_and_flex_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.START, 10f); root_child0.setMargin(YogaEdge.END, 10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -243,9 +243,9 @@ public void test_margin_and_flex_column() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.TOP, 10f); root_child0.setMargin(YogaEdge.BOTTOM, 10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -279,15 +279,15 @@ public void test_margin_and_stretch_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.TOP, 10f); root_child0.setMargin(YogaEdge.BOTTOM, 10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -326,9 +326,9 @@ public void test_margin_and_stretch_column() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.START, 10f); root_child0.setMargin(YogaEdge.END, 10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -362,14 +362,14 @@ public void test_margin_with_sibling_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.END, 10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -422,8 +422,8 @@ public void test_margin_with_sibling_column() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setMargin(YogaEdge.BOTTOM, 10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -471,15 +471,15 @@ public void test_margin_auto_bottom() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.BOTTOM); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.BOTTOM); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -528,15 +528,15 @@ public void test_margin_auto_top() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.TOP); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.TOP); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -585,16 +585,16 @@ public void test_margin_auto_bottom_and_top() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.TOP); - root_child0.setMarginAuto(YogaEdge.BOTTOM); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.TOP); + root_child0.setMarginAuto(YogaEdge.BOTTOM); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -643,16 +643,16 @@ public void test_margin_auto_bottom_and_top_justify_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.TOP); - root_child0.setMarginAuto(YogaEdge.BOTTOM); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.TOP); + root_child0.setMarginAuto(YogaEdge.BOTTOM); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -701,21 +701,21 @@ public void test_margin_auto_multiple_children_column() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.TOP); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.TOP); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setMarginAuto(YogaEdge.TOP); root_child1.setWidth(50f); root_child1.setHeight(50f); + root_child1.setMarginAuto(YogaEdge.TOP); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -774,22 +774,22 @@ public void test_margin_auto_multiple_children_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setMarginAuto(YogaEdge.RIGHT); root_child1.setWidth(50f); root_child1.setHeight(50f); + root_child1.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); @@ -848,17 +848,17 @@ public void test_margin_auto_left_and_right_column() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.LEFT); - root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.LEFT); + root_child0.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -912,10 +912,10 @@ public void test_margin_auto_left_and_right() { root.setHeight(200f); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.LEFT); - root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.LEFT); + root_child0.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -964,17 +964,17 @@ public void test_margin_auto_start_and_end_column() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.START); - root_child0.setMarginAuto(YogaEdge.END); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.START); + root_child0.setMarginAuto(YogaEdge.END); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1028,10 +1028,10 @@ public void test_margin_auto_start_and_end() { root.setHeight(200f); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.START); - root_child0.setMarginAuto(YogaEdge.END); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.START); + root_child0.setMarginAuto(YogaEdge.END); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1080,16 +1080,16 @@ public void test_margin_auto_left_and_right_column_and_center() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.LEFT); - root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.LEFT); + root_child0.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1138,15 +1138,15 @@ public void test_margin_auto_left() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.LEFT); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1195,15 +1195,15 @@ public void test_margin_auto_right() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1252,16 +1252,16 @@ public void test_margin_auto_left_and_right_stretch() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.LEFT); - root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.LEFT); + root_child0.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1315,10 +1315,10 @@ public void test_margin_auto_top_and_bottom_stretch() { root.setHeight(200f); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.TOP); - root_child0.setMarginAuto(YogaEdge.BOTTOM); root_child0.setWidth(50f); root_child0.setHeight(50f); + root_child0.setMarginAuto(YogaEdge.TOP); + root_child0.setMarginAuto(YogaEdge.BOTTOM); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -1372,10 +1372,10 @@ public void test_margin_should_not_be_part_of_max_height() { root.setHeight(250f); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.TOP, 20f); root_child0.setWidth(100f); root_child0.setHeight(100f); root_child0.setMaxHeight(100f); + root_child0.setMargin(YogaEdge.TOP, 20f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1414,10 +1414,10 @@ public void test_margin_should_not_be_part_of_max_width() { root.setHeight(250f); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 20f); root_child0.setWidth(100f); - root_child0.setMaxWidth(100f); root_child0.setHeight(100f); + root_child0.setMaxWidth(100f); + root_child0.setMargin(YogaEdge.LEFT, 20f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1451,16 +1451,16 @@ public void test_margin_auto_left_right_child_bigger_than_parent() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(52f); root.setHeight(52f); + root.setWidth(52f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.LEFT); - root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(72f); root_child0.setHeight(72f); + root_child0.setMarginAuto(YogaEdge.LEFT); + root_child0.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1494,15 +1494,15 @@ public void test_margin_auto_left_child_bigger_than_parent() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(52f); root.setHeight(52f); + root.setWidth(52f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.LEFT); root_child0.setWidth(72f); root_child0.setHeight(72f); + root_child0.setMarginAuto(YogaEdge.LEFT); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1536,16 +1536,16 @@ public void test_margin_fix_left_auto_right_child_bigger_than_parent() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(52f); root.setHeight(52f); + root.setWidth(52f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 10f); - root_child0.setMarginAuto(YogaEdge.RIGHT); root_child0.setWidth(72f); root_child0.setHeight(72f); + root_child0.setMargin(YogaEdge.LEFT, 10f); + root_child0.setMarginAuto(YogaEdge.RIGHT); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1579,16 +1579,16 @@ public void test_margin_auto_left_fix_right_child_bigger_than_parent() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(52f); root.setHeight(52f); + root.setWidth(52f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.LEFT); - root_child0.setMargin(YogaEdge.RIGHT, 10f); root_child0.setWidth(72f); root_child0.setHeight(72f); + root_child0.setMarginAuto(YogaEdge.LEFT); + root_child0.setMargin(YogaEdge.RIGHT, 10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1622,10 +1622,10 @@ public void test_margin_auto_top_stretching_child() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -1680,10 +1680,10 @@ public void test_margin_auto_left_stretching_child() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -1738,15 +1738,15 @@ public void test_margin_auto_overflowing_container() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setMarginAuto(YogaEdge.BOTTOM); root_child0.setWidth(50f); root_child0.setHeight(150f); + root_child0.setMarginAuto(YogaEdge.BOTTOM); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); diff --git a/java/tests/generated/com/facebook/yoga/YGMinMaxDimensionTest.java b/java/tests/generated/com/facebook/yoga/YGMinMaxDimensionTest.java index 0f86664b37..25fcbc7842 100644 --- a/java/tests/generated/com/facebook/yoga/YGMinMaxDimensionTest.java +++ b/java/tests/generated/com/facebook/yoga/YGMinMaxDimensionTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<19cdc4fc9425af726b656ef628bab8af>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGMinMaxDimensionTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGMinMaxDimensionTest.html */ package com.facebook.yoga; @@ -37,8 +37,8 @@ public void test_max_width() { root.setHeight(100f); final YogaNode root_child0 = createNode(config); - root_child0.setMaxWidth(50f); root_child0.setHeight(10f); + root_child0.setMaxWidth(50f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -72,10 +72,10 @@ public void test_max_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -169,10 +169,10 @@ public void test_min_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -224,11 +224,11 @@ public void test_justify_content_min_max() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); - root.setMinHeight(100f); root.setMaxHeight(200f); + root.setMinHeight(100f); + root.setWidth(100f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setWidth(60f); @@ -266,11 +266,11 @@ public void test_align_items_min_max() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setMinWidth(100f); root.setMaxWidth(200f); + root.setMinWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setWidth(60f); @@ -308,10 +308,10 @@ public void test_justify_content_overflow_min_max() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinHeight(100f); root.setMaxHeight(110f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root_child0.setWidth(50f); @@ -380,9 +380,9 @@ public void test_flex_grow_to_min() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setMinHeight(100f); root.setMaxHeight(500f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -434,11 +434,11 @@ public void test_flex_grow_in_at_most_container() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setFlexDirection(YogaFlexDirection.ROW); @@ -490,13 +490,13 @@ public void test_flex_grow_child() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(100f); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(0f); - root_child0.setHeight(100f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -593,8 +593,8 @@ public void test_flex_grow_within_max_width() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexGrow(1f); root_child0_child0.setHeight(20f); + root_child0_child0.setFlexGrow(1f); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -648,8 +648,8 @@ public void test_flex_grow_within_constrained_max_width() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexGrow(1f); root_child0_child0.setHeight(20f); + root_child0_child0.setFlexGrow(1f); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -694,14 +694,14 @@ public void test_flex_root_ignored() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setFlexGrow(1f); root.setWidth(100f); root.setMinHeight(100f); root.setMaxHeight(500f); + root.setFlexGrow(1f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setFlexBasis(200f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -755,14 +755,14 @@ public void test_flex_grow_root_minimized() { root.setMaxHeight(500f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setMinHeight(100f); root_child0.setMaxHeight(500f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexBasis(200f); + root_child0_child0.setFlexGrow(1f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -825,14 +825,14 @@ public void test_flex_grow_height_maximized() { root.setHeight(500f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setMinHeight(100f); root_child0.setMaxHeight(500f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexGrow(1f); root_child0_child0.setFlexBasis(200f); + root_child0_child0.setFlexGrow(1f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); @@ -890,10 +890,10 @@ public void test_flex_grow_within_constrained_min_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -1000,9 +1000,9 @@ public void test_flex_grow_within_constrained_max_row() { root.setWidth(200f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setMaxWidth(100f); root_child0.setHeight(100f); + root_child0.setMaxWidth(100f); + root_child0.setFlexDirection(YogaFlexDirection.ROW); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1066,8 +1066,8 @@ public void test_flex_grow_within_constrained_max_column() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setMaxHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); root_child0.setFlexShrink(1f); @@ -1119,21 +1119,21 @@ public void test_child_min_max_width_flexing() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(120f); root.setHeight(50f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); + root_child0.setMinWidth(60f); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(0f); - root_child0.setMinWidth(60f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); + root_child1.setMaxWidth(20f); root_child1.setFlexGrow(1f); root_child1.setFlexBasisPercent(50f); - root_child1.setMaxWidth(20f); root.addChildAt(root_child1, 1); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1178,8 +1178,8 @@ public void test_min_width_overrides_width() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(50f); root.setMinWidth(100f); + root.setWidth(50f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1203,8 +1203,8 @@ public void test_max_width_overrides_width() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(200f); root.setMaxWidth(100f); + root.setWidth(200f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1228,8 +1228,8 @@ public void test_min_height_overrides_height() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setHeight(50f); root.setMinHeight(100f); + root.setHeight(50f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1253,8 +1253,8 @@ public void test_max_height_overrides_height() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setHeight(200f); root.setMaxHeight(100f); + root.setHeight(200f); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1277,10 +1277,10 @@ public void test_min_max_percent_no_width_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setMinWidthPercent(10f); diff --git a/java/tests/generated/com/facebook/yoga/YGPaddingTest.java b/java/tests/generated/com/facebook/yoga/YGPaddingTest.java index eece9efd00..dd8c2f50f9 100644 --- a/java/tests/generated/com/facebook/yoga/YGPaddingTest.java +++ b/java/tests/generated/com/facebook/yoga/YGPaddingTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<6116c0f130b77b635a6551b3204c3cf8>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGPaddingTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGPaddingTest.html */ package com.facebook.yoga; @@ -33,10 +33,7 @@ public void test_padding_no_size() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 10); - root.setPadding(YogaEdge.TOP, 10); - root.setPadding(YogaEdge.RIGHT, 10); - root.setPadding(YogaEdge.BOTTOM, 10); + root.setPadding(YogaEdge.ALL, 10); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -60,10 +57,7 @@ public void test_padding_container_match_child() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 10); - root.setPadding(YogaEdge.TOP, 10); - root.setPadding(YogaEdge.RIGHT, 10); - root.setPadding(YogaEdge.BOTTOM, 10); + root.setPadding(YogaEdge.ALL, 10); final YogaNode root_child0 = createNode(config); root_child0.setWidth(10f); @@ -102,16 +96,13 @@ public void test_padding_flex_child() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 10); - root.setPadding(YogaEdge.TOP, 10); - root.setPadding(YogaEdge.RIGHT, 10); - root.setPadding(YogaEdge.BOTTOM, 10); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 10); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setWidth(10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -146,12 +137,9 @@ public void test_padding_stretch_child() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 10); - root.setPadding(YogaEdge.TOP, 10); - root.setPadding(YogaEdge.RIGHT, 10); - root.setPadding(YogaEdge.BOTTOM, 10); root.setWidth(100f); root.setHeight(100f); + root.setPadding(YogaEdge.ALL, 10); final YogaNode root_child0 = createNode(config); root_child0.setHeight(10f); @@ -188,18 +176,18 @@ public void test_padding_center_child() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setWidth(100f); + root.setHeight(100f); root.setPadding(YogaEdge.START, 10); root.setPadding(YogaEdge.END, 20); root.setPadding(YogaEdge.BOTTOM, 20); - root.setWidth(100f); - root.setHeight(100f); + root.setAlignItems(YogaAlign.CENTER); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(10f); root_child0.setHeight(10f); + root_child0.setWidth(10f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -233,19 +221,16 @@ public void test_child_with_padding_align_end() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.FLEX_END); - root.setAlignItems(YogaAlign.FLEX_END); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setJustifyContent(YogaJustify.FLEX_END); + root.setAlignItems(YogaAlign.FLEX_END); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 20); - root_child0.setPadding(YogaEdge.TOP, 20); - root_child0.setPadding(YogaEdge.RIGHT, 20); - root_child0.setPadding(YogaEdge.BOTTOM, 20); root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setPadding(YogaEdge.ALL, 20); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -280,10 +265,10 @@ public void test_physical_and_relative_edge_defined() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setPadding(YogaEdge.LEFT, 20); - root.setPadding(YogaEdge.END, 50); root.setWidth(200f); root.setHeight(200f); + root.setPadding(YogaEdge.LEFT, 20); + root.setPadding(YogaEdge.END, 50); final YogaNode root_child0 = createNode(config); root_child0.setWidthPercent(100f); diff --git a/java/tests/generated/com/facebook/yoga/YGPercentageTest.java b/java/tests/generated/com/facebook/yoga/YGPercentageTest.java index e4e92c715e..a0e808902b 100644 --- a/java/tests/generated/com/facebook/yoga/YGPercentageTest.java +++ b/java/tests/generated/com/facebook/yoga/YGPercentageTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<27e18496d4ee880d9ba95ad0b2648071>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGPercentageTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGPercentageTest.html */ package com.facebook.yoga; @@ -32,10 +32,10 @@ public void test_percentage_width_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setWidthPercent(30f); @@ -73,16 +73,16 @@ public void test_percentage_position_left_top() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(400f); root.setHeight(400f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setPositionPercent(YogaEdge.LEFT, 10f); - root_child0.setPositionPercent(YogaEdge.TOP, 20f); root_child0.setWidthPercent(45f); root_child0.setHeightPercent(55f); + root_child0.setPositionPercent(YogaEdge.LEFT, 10f); + root_child0.setPositionPercent(YogaEdge.TOP, 20f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -116,16 +116,16 @@ public void test_percentage_position_bottom_right() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(500f); root.setHeight(500f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setPositionPercent(YogaEdge.RIGHT, 20f); - root_child0.setPositionPercent(YogaEdge.BOTTOM, 10f); root_child0.setWidthPercent(55f); root_child0.setHeightPercent(15f); + root_child0.setPositionPercent(YogaEdge.BOTTOM, 10f); + root_child0.setPositionPercent(YogaEdge.RIGHT, 20f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -159,10 +159,10 @@ public void test_percentage_flex_basis() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -326,10 +326,10 @@ public void test_percentage_flex_basis_main_max_height() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -441,10 +441,10 @@ public void test_percentage_flex_basis_main_max_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -556,10 +556,10 @@ public void test_percentage_flex_basis_main_min_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(200f); root.setHeight(200f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -678,39 +678,21 @@ public void test_percentage_multiple_nested_with_padding_margin_and_percentage_v final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); root_child0.setFlexBasisPercent(10f); - root_child0.setMargin(YogaEdge.LEFT, 5f); - root_child0.setMargin(YogaEdge.TOP, 5f); - root_child0.setMargin(YogaEdge.RIGHT, 5f); - root_child0.setMargin(YogaEdge.BOTTOM, 5f); - root_child0.setPadding(YogaEdge.LEFT, 3); - root_child0.setPadding(YogaEdge.TOP, 3); - root_child0.setPadding(YogaEdge.RIGHT, 3); - root_child0.setPadding(YogaEdge.BOTTOM, 3); root_child0.setMinWidthPercent(60f); + root_child0.setMargin(YogaEdge.ALL, 5f); + root_child0.setPadding(YogaEdge.ALL, 3); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setMargin(YogaEdge.LEFT, 5f); - root_child0_child0.setMargin(YogaEdge.TOP, 5f); - root_child0_child0.setMargin(YogaEdge.RIGHT, 5f); - root_child0_child0.setMargin(YogaEdge.BOTTOM, 5f); - root_child0_child0.setPaddingPercent(YogaEdge.LEFT, 3); - root_child0_child0.setPaddingPercent(YogaEdge.TOP, 3); - root_child0_child0.setPaddingPercent(YogaEdge.RIGHT, 3); - root_child0_child0.setPaddingPercent(YogaEdge.BOTTOM, 3); root_child0_child0.setWidthPercent(50f); + root_child0_child0.setMargin(YogaEdge.ALL, 5f); + root_child0_child0.setPaddingPercent(YogaEdge.ALL, 3); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setMarginPercent(YogaEdge.LEFT, 5f); - root_child0_child0_child0.setMarginPercent(YogaEdge.TOP, 5f); - root_child0_child0_child0.setMarginPercent(YogaEdge.RIGHT, 5f); - root_child0_child0_child0.setMarginPercent(YogaEdge.BOTTOM, 5f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 3); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 3); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 3); root_child0_child0_child0.setWidthPercent(45f); + root_child0_child0_child0.setMarginPercent(YogaEdge.ALL, 5f); + root_child0_child0_child0.setPadding(YogaEdge.ALL, 3); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child1 = createNode(config); @@ -786,10 +768,7 @@ public void test_percentage_margin_should_calculate_based_only_on_width() { final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); - root_child0.setMarginPercent(YogaEdge.LEFT, 10f); - root_child0.setMarginPercent(YogaEdge.TOP, 10f); - root_child0.setMarginPercent(YogaEdge.RIGHT, 10f); - root_child0.setMarginPercent(YogaEdge.BOTTOM, 10f); + root_child0.setMarginPercent(YogaEdge.ALL, 10f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -844,10 +823,7 @@ public void test_percentage_padding_should_calculate_based_only_on_width() { final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); - root_child0.setPaddingPercent(YogaEdge.LEFT, 10); - root_child0.setPaddingPercent(YogaEdge.TOP, 10); - root_child0.setPaddingPercent(YogaEdge.RIGHT, 10); - root_child0.setPaddingPercent(YogaEdge.BOTTOM, 10); + root_child0.setPaddingPercent(YogaEdge.ALL, 10); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -902,8 +878,8 @@ public void test_percentage_absolute_position() { final YogaNode root_child0 = createNode(config); root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setPositionPercent(YogaEdge.LEFT, 30f); root_child0.setPositionPercent(YogaEdge.TOP, 10f); + root_child0.setPositionPercent(YogaEdge.LEFT, 30f); root_child0.setWidth(10f); root_child0.setHeight(10f); root.addChildAt(root_child0, 0); @@ -977,8 +953,8 @@ public void test_percent_within_flex_grow() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setWidth(350f); root.setHeight(100f); @@ -1059,11 +1035,11 @@ public void test_percentage_container_in_wrapping_container() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setJustifyContent(YogaJustify.CENTER); - root.setAlignItems(YogaAlign.CENTER); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setAlignItems(YogaAlign.CENTER); root.setWidth(200f); root.setHeight(200f); + root.setJustifyContent(YogaJustify.CENTER); final YogaNode root_child0 = createNode(config); root.addChildAt(root_child0, 0); @@ -1150,11 +1126,11 @@ public void test_percent_absolute_position() { root.setHeight(50f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setPositionPercent(YogaEdge.LEFT, 50f); - root_child0.setWidthPercent(100f); root_child0.setHeight(50f); + root_child0.setWidthPercent(100f); + root_child0.setPositionPercent(YogaEdge.LEFT, 50f); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0.setFlexDirection(YogaFlexDirection.ROW); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); @@ -1216,8 +1192,8 @@ public void test_percent_of_minmax_main() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setMinWidth(60f); root.setMaxWidth(60f); root.setHeight(50f); @@ -1259,8 +1235,8 @@ public void test_percent_of_min_main() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setMinWidth(60f); root.setHeight(50f); @@ -1301,8 +1277,8 @@ public void test_percent_of_min_main_multiple() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setMinWidth(60f); root.setHeight(50f); @@ -1373,8 +1349,8 @@ public void test_percent_of_max_main() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); + root.setFlexDirection(YogaFlexDirection.ROW); root.setMaxWidth(60f); root.setHeight(50f); @@ -1461,9 +1437,9 @@ public void test_percent_absolute_of_minmax_cross_stretched() { root.setHeight(50f); final YogaNode root_child0 = createNode(config); - root_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.setWidthPercent(50f); root_child0.setHeight(20f); + root_child0.setPositionType(YogaPositionType.ABSOLUTE); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1497,11 +1473,11 @@ public void test_percent_of_minmax_cross_unstretched() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinWidth(60f); root.setMaxWidth(60f); root.setHeight(50f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setWidthPercent(50f); @@ -1540,10 +1516,10 @@ public void test_percent_of_min_cross_unstretched() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setMinWidth(60f); root.setHeight(50f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setWidthPercent(50f); @@ -1581,10 +1557,10 @@ public void test_percent_of_max_cross_unstretched() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setAlignItems(YogaAlign.FLEX_START); root.setPositionType(YogaPositionType.ABSOLUTE); root.setMaxWidth(60f); root.setHeight(50f); + root.setAlignItems(YogaAlign.FLEX_START); final YogaNode root_child0 = createNode(config); root_child0.setWidthPercent(50f); diff --git a/java/tests/generated/com/facebook/yoga/YGRoundingTest.java b/java/tests/generated/com/facebook/yoga/YGRoundingTest.java index f2cd12c115..5548456953 100644 --- a/java/tests/generated/com/facebook/yoga/YGRoundingTest.java +++ b/java/tests/generated/com/facebook/yoga/YGRoundingTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<06c18c6b3b9735644daf5b5bd0777eb8>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGRoundingTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGRoundingTest.html */ package com.facebook.yoga; @@ -32,10 +32,10 @@ public void test_rounding_flex_basis_flex_grow_row_width_of_100() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(100f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -100,10 +100,10 @@ public void test_rounding_flex_basis_flex_grow_row_prime_number_width() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(113f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); root_child0.setFlexGrow(1f); @@ -196,14 +196,14 @@ public void test_rounding_flex_basis_flex_shrink_row() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(101f); root.setHeight(100f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexShrink(1f); root_child0.setFlexBasis(100f); + root_child0.setFlexShrink(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); @@ -266,23 +266,23 @@ public void test_rounding_flex_basis_overrides_main_size() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(113f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(20f); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); - root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setHeight(10f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setHeight(10f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -337,23 +337,23 @@ public void test_rounding_total_fractial() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(87.4f); root.setHeight(113.4f); + root.setWidth(87.4f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(20.3f); root_child0.setFlexGrow(0.7f); root_child0.setFlexBasis(50.3f); - root_child0.setHeight(20.3f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1.6f); root_child1.setHeight(10f); + root_child1.setFlexGrow(1.6f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1.1f); root_child2.setHeight(10.7f); + root_child2.setFlexGrow(1.1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -408,37 +408,37 @@ public void test_rounding_total_fractial_nested() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(87.4f); root.setHeight(113.4f); + root.setWidth(87.4f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(20.3f); root_child0.setFlexGrow(0.7f); root_child0.setFlexBasis(50.3f); - root_child0.setHeight(20.3f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexGrow(1f); - root_child0_child0.setFlexBasis(0.3f); root_child0_child0.setPosition(YogaEdge.BOTTOM, 13.3f); root_child0_child0.setHeight(9.9f); + root_child0_child0.setFlexGrow(1f); + root_child0_child0.setFlexBasis(0.3f); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); - root_child0_child1.setFlexGrow(4f); - root_child0_child1.setFlexBasis(0.3f); root_child0_child1.setPosition(YogaEdge.TOP, 13.3f); root_child0_child1.setHeight(1.1f); + root_child0_child1.setFlexGrow(4f); + root_child0_child1.setFlexBasis(0.3f); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1.6f); root_child1.setHeight(10f); + root_child1.setFlexGrow(1.6f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1.1f); root_child2.setHeight(10.7f); + root_child2.setFlexGrow(1.1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -513,23 +513,23 @@ public void test_rounding_fractial_input_1() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(113.4f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(20f); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); - root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setHeight(10f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setHeight(10f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -584,23 +584,23 @@ public void test_rounding_fractial_input_2() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(113.6f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(20f); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); - root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setHeight(10f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setHeight(10f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -656,23 +656,23 @@ public void test_rounding_fractial_input_3() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); root.setPosition(YogaEdge.TOP, 0.3f); - root.setWidth(100f); root.setHeight(113.4f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(20f); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); - root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setHeight(10f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setHeight(10f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -728,23 +728,23 @@ public void test_rounding_fractial_input_4() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); root.setPosition(YogaEdge.TOP, 0.7f); - root.setWidth(100f); root.setHeight(113.4f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); + root_child0.setHeight(20f); root_child0.setFlexGrow(1f); root_child0.setFlexBasis(50f); - root_child0.setHeight(20f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setHeight(10f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setHeight(10f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -798,28 +798,28 @@ public void test_rounding_inner_node_controversy_horizontal() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(320f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setHeight(10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setHeight(10f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); - root_child1_child0.setFlexGrow(1f); root_child1_child0.setHeight(10f); + root_child1_child0.setFlexGrow(1f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setHeight(10f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -887,23 +887,23 @@ public void test_rounding_inner_node_controversy_vertical() { root.setHeight(320f); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setWidth(10f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setWidth(10f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); - root_child1_child0.setFlexGrow(1f); root_child1_child0.setWidth(10f); + root_child1_child0.setFlexGrow(1f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setWidth(10f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -967,29 +967,29 @@ public void test_rounding_inner_node_controversy_combined() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); - root.setFlexDirection(YogaFlexDirection.ROW); root.setPositionType(YogaPositionType.ABSOLUTE); root.setWidth(640f); root.setHeight(320f); + root.setFlexDirection(YogaFlexDirection.ROW); final YogaNode root_child0 = createNode(config); - root_child0.setFlexGrow(1f); root_child0.setHeightPercent(100f); + root_child0.setFlexGrow(1f); root.addChildAt(root_child0, 0); final YogaNode root_child1 = createNode(config); - root_child1.setFlexGrow(1f); root_child1.setHeightPercent(100f); + root_child1.setFlexGrow(1f); root.addChildAt(root_child1, 1); final YogaNode root_child1_child0 = createNode(config); - root_child1_child0.setFlexGrow(1f); root_child1_child0.setWidthPercent(100f); + root_child1_child0.setFlexGrow(1f); root_child1.addChildAt(root_child1_child0, 0); final YogaNode root_child1_child1 = createNode(config); - root_child1_child1.setFlexGrow(1f); root_child1_child1.setWidthPercent(100f); + root_child1_child1.setFlexGrow(1f); root_child1.addChildAt(root_child1_child1, 1); final YogaNode root_child1_child1_child0 = createNode(config); @@ -998,13 +998,13 @@ public void test_rounding_inner_node_controversy_combined() { root_child1_child1.addChildAt(root_child1_child1_child0, 0); final YogaNode root_child1_child2 = createNode(config); - root_child1_child2.setFlexGrow(1f); root_child1_child2.setWidthPercent(100f); + root_child1_child2.setFlexGrow(1f); root_child1.addChildAt(root_child1_child2, 2); final YogaNode root_child2 = createNode(config); - root_child2.setFlexGrow(1f); root_child2.setHeightPercent(100f); + root_child2.setFlexGrow(1f); root.addChildAt(root_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/java/tests/generated/com/facebook/yoga/YGSizeOverflowTest.java b/java/tests/generated/com/facebook/yoga/YGSizeOverflowTest.java index f7188177af..c0f63b1131 100644 --- a/java/tests/generated/com/facebook/yoga/YGSizeOverflowTest.java +++ b/java/tests/generated/com/facebook/yoga/YGSizeOverflowTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<26e773ec772f84370bc0f3f53d8221ed>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGSizeOverflowTest.html + * @generated SignedSource<<1e5af7129e23b9dd1228bdaef498c19c>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGSizeOverflowTest.html */ package com.facebook.yoga; @@ -33,15 +33,15 @@ public void test_nested_overflowing_child() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setWidth(200f); root_child0_child0.setHeight(200f); + root_child0_child0.setWidth(200f); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -86,17 +86,17 @@ public void test_nested_overflowing_child_in_constraint_parent() { final YogaNode root = createNode(config); root.setPositionType(YogaPositionType.ABSOLUTE); - root.setWidth(100f); root.setHeight(100f); + root.setWidth(100f); final YogaNode root_child0 = createNode(config); - root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setWidth(100f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setWidth(200f); root_child0_child0.setHeight(200f); + root_child0_child0.setWidth(200f); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/java/tests/generated/com/facebook/yoga/YGStaticPositionTest.java b/java/tests/generated/com/facebook/yoga/YGStaticPositionTest.java index fecb5c0130..60d66b2513 100644 --- a/java/tests/generated/com/facebook/yoga/YGStaticPositionTest.java +++ b/java/tests/generated/com/facebook/yoga/YGStaticPositionTest.java @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<997d12880828a3c2881898b769618b43>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGStaticPositionTest.html + * @generated SignedSource<<2d3b1fc3c172c1d6fe052278ae6daff7>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGStaticPositionTest.html */ package com.facebook.yoga; @@ -35,11 +35,11 @@ public void test_static_position_insets_have_no_effect_left_top() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPositionType(YogaPositionType.STATIC); - root_child0.setPosition(YogaEdge.LEFT, 50f); - root_child0.setPosition(YogaEdge.TOP, 50f); root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setPositionType(YogaPositionType.STATIC); + root_child0.setPosition(YogaEdge.TOP, 50f); + root_child0.setPosition(YogaEdge.LEFT, 50f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -76,11 +76,11 @@ public void test_static_position_insets_have_no_effect_right_bottom() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPositionType(YogaPositionType.STATIC); - root_child0.setPosition(YogaEdge.RIGHT, 50f); - root_child0.setPosition(YogaEdge.BOTTOM, 50f); root_child0.setWidth(100f); root_child0.setHeight(100f); + root_child0.setPositionType(YogaPositionType.STATIC); + root_child0.setPosition(YogaEdge.BOTTOM, 50f); + root_child0.setPosition(YogaEdge.RIGHT, 50f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -122,18 +122,18 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 100f); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); root_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); - root_child0_child0_child0.setWidth(50f); - root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -190,23 +190,23 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root_child0.setWidth(200f); root_child0.setHeight(200f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); root_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); - root_child0_child0_child0.setWidth(50f); - root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -263,24 +263,24 @@ public void test_column_reverse_static_position_absolute_child_insets_relative_t root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root_child0.setWidth(200f); root_child0.setHeight(200f); + root_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); + root_child0_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); root_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); - root_child0_child0_child0.setWidth(50f); - root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -337,23 +337,23 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setWidth(200f); root_child0.setHeight(200f); + root_child0.setFlexDirection(YogaFlexDirection.ROW); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); root_child0_child0_child0.setPosition(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setWidth(50f); - root_child0_child0_child0.setHeight(50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -410,24 +410,24 @@ public void test_column_reverse_static_position_absolute_child_insets_relative_t root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.ROW); root_child0.setWidth(200f); root_child0.setHeight(200f); + root_child0.setFlexDirection(YogaFlexDirection.ROW); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); + root_child0_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); root_child0_child0_child0.setPosition(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setWidth(50f); - root_child0_child0_child0.setHeight(50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -484,23 +484,23 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root_child0.setWidth(200f); root_child0.setHeight(200f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); root_child0_child0_child0.setPosition(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setWidth(50f); - root_child0_child0_child0.setHeight(50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -557,24 +557,24 @@ public void test_column_reverse_static_position_absolute_child_insets_relative_t root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root_child0.setWidth(200f); root_child0.setHeight(200f); + root_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); + root_child0_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); root_child0_child0_child0.setPosition(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setWidth(50f); - root_child0_child0_child0.setHeight(50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -636,39 +636,39 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 100f); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 100f); - root_child0_child0_child0.setWidth(100f); root_child0_child0_child0.setHeight(100f); + root_child0_child0_child0.setWidth(100f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 100f); - root_child0_child0_child0_child0.setWidth(100f); root_child0_child0_child0_child0.setHeight(100f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 100f); - root_child0_child0_child0_child0_child0.setWidth(100f); root_child0_child0_child0_child0_child0.setHeight(100f); + root_child0_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 100f); + root_child0_child0_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0_child0_child0.addChildAt(root_child0_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0_child0_child0 = createNode(config); + root_child0_child0_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0_child0_child0.setWidth(50f); root_child0_child0_child0_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); root_child0_child0_child0_child0_child0_child0.setPosition(YogaEdge.TOP, 50f); - root_child0_child0_child0_child0_child0_child0.setWidth(50f); - root_child0_child0_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0_child0_child0.setPosition(YogaEdge.LEFT, 50f); root_child0_child0_child0_child0_child0.addChildAt(root_child0_child0_child0_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -760,15 +760,15 @@ public void test_static_position_absolute_child_width_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setWidthPercent(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -830,14 +830,14 @@ public void test_static_position_relative_child_width_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setWidthPercent(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidthPercent(50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -899,15 +899,15 @@ public void test_static_position_static_child_width_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setWidthPercent(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -969,15 +969,15 @@ public void test_static_position_absolute_child_height_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeightPercent(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1039,14 +1039,14 @@ public void test_static_position_relative_child_height_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeightPercent(50f); + root_child0_child0_child0.setWidth(50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1108,15 +1108,15 @@ public void test_static_position_static_child_height_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeightPercent(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1178,16 +1178,16 @@ public void test_static_position_absolute_child_left_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1249,15 +1249,15 @@ public void test_static_position_relative_child_left_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1319,16 +1319,16 @@ public void test_static_position_static_child_left_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1390,16 +1390,16 @@ public void test_static_position_absolute_child_right_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setPositionPercent(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.RIGHT, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1461,15 +1461,15 @@ public void test_static_position_relative_child_right_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionPercent(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.RIGHT, 50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1531,16 +1531,16 @@ public void test_static_position_static_child_right_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setPositionPercent(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.RIGHT, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1602,16 +1602,16 @@ public void test_static_position_absolute_child_top_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setPositionPercent(YogaEdge.TOP, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.TOP, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1673,15 +1673,15 @@ public void test_static_position_relative_child_top_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionPercent(YogaEdge.TOP, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.TOP, 50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1743,16 +1743,16 @@ public void test_static_position_static_child_top_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setPositionPercent(YogaEdge.TOP, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.TOP, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1814,16 +1814,16 @@ public void test_static_position_absolute_child_bottom_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setPositionPercent(YogaEdge.BOTTOM, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.BOTTOM, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1885,15 +1885,15 @@ public void test_static_position_relative_child_bottom_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionPercent(YogaEdge.BOTTOM, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.BOTTOM, 50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -1955,16 +1955,16 @@ public void test_static_position_static_child_bottom_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setPositionPercent(YogaEdge.BOTTOM, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionPercent(YogaEdge.BOTTOM, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2026,19 +2026,16 @@ public void test_static_position_absolute_child_margin_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMarginPercent(YogaEdge.LEFT, 50f); - root_child0_child0_child0.setMarginPercent(YogaEdge.TOP, 50f); - root_child0_child0_child0.setMarginPercent(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setMarginPercent(YogaEdge.BOTTOM, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.ALL, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2100,18 +2097,15 @@ public void test_static_position_relative_child_margin_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setMarginPercent(YogaEdge.LEFT, 50f); - root_child0_child0_child0.setMarginPercent(YogaEdge.TOP, 50f); - root_child0_child0_child0.setMarginPercent(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setMarginPercent(YogaEdge.BOTTOM, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.ALL, 50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2173,19 +2167,16 @@ public void test_static_position_static_child_margin_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setMarginPercent(YogaEdge.LEFT, 50f); - root_child0_child0_child0.setMarginPercent(YogaEdge.TOP, 50f); - root_child0_child0_child0.setMarginPercent(YogaEdge.RIGHT, 50f); - root_child0_child0_child0.setMarginPercent(YogaEdge.BOTTOM, 50f); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setMarginPercent(YogaEdge.ALL, 50f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2247,19 +2238,16 @@ public void test_static_position_absolute_child_padding_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setPaddingPercent(YogaEdge.LEFT, 50); - root_child0_child0_child0.setPaddingPercent(YogaEdge.TOP, 50); - root_child0_child0_child0.setPaddingPercent(YogaEdge.RIGHT, 50); - root_child0_child0_child0.setPaddingPercent(YogaEdge.BOTTOM, 50); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPaddingPercent(YogaEdge.ALL, 50); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2321,18 +2309,15 @@ public void test_static_position_relative_child_padding_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPaddingPercent(YogaEdge.LEFT, 50); - root_child0_child0_child0.setPaddingPercent(YogaEdge.TOP, 50); - root_child0_child0_child0.setPaddingPercent(YogaEdge.RIGHT, 50); - root_child0_child0_child0.setPaddingPercent(YogaEdge.BOTTOM, 50); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPaddingPercent(YogaEdge.ALL, 50); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2394,19 +2379,16 @@ public void test_static_position_static_child_padding_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setPaddingPercent(YogaEdge.LEFT, 50); - root_child0_child0_child0.setPaddingPercent(YogaEdge.TOP, 50); - root_child0_child0_child0.setPaddingPercent(YogaEdge.RIGHT, 50); - root_child0_child0_child0.setPaddingPercent(YogaEdge.BOTTOM, 50); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPaddingPercent(YogaEdge.ALL, 50); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2468,15 +2450,15 @@ public void test_static_position_absolute_child_border_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2538,14 +2520,14 @@ public void test_static_position_relative_child_border_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2607,15 +2589,15 @@ public void test_static_position_static_child_border_percentage() { root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setWidth(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidth(50f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2672,24 +2654,21 @@ public void test_static_position_absolute_child_containing_block_padding_box() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 100); - root_child0.setPadding(YogaEdge.TOP, 100); - root_child0.setPadding(YogaEdge.RIGHT, 100); - root_child0.setPadding(YogaEdge.BOTTOM, 100); root_child0.setWidth(400f); root_child0.setHeight(400f); + root_child0.setPadding(YogaEdge.ALL, 100); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setWidthPercent(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2746,23 +2725,20 @@ public void test_static_position_relative_child_containing_block_padding_box() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 100); - root_child0.setPadding(YogaEdge.TOP, 100); - root_child0.setPadding(YogaEdge.RIGHT, 100); - root_child0.setPadding(YogaEdge.BOTTOM, 100); root_child0.setWidth(400f); root_child0.setHeight(400f); + root_child0.setPadding(YogaEdge.ALL, 100); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setWidthPercent(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidthPercent(50f); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2819,24 +2795,21 @@ public void test_static_position_static_child_containing_block_padding_box() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 100); - root_child0.setPadding(YogaEdge.TOP, 100); - root_child0.setPadding(YogaEdge.RIGHT, 100); - root_child0.setPadding(YogaEdge.BOTTOM, 100); root_child0.setWidth(400f); root_child0.setHeight(400f); + root_child0.setPadding(YogaEdge.ALL, 100); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0_child0.setWidthPercent(50f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidthPercent(50f); + root_child0_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2893,18 +2866,15 @@ public void test_static_position_absolute_child_containing_block_content_box() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 100); - root_child0.setPadding(YogaEdge.TOP, 100); - root_child0.setPadding(YogaEdge.RIGHT, 100); - root_child0.setPadding(YogaEdge.BOTTOM, 100); root_child0.setWidth(400f); root_child0.setHeight(400f); + root_child0.setPadding(YogaEdge.ALL, 100); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0.setWidthPercent(50f); root_child0_child0.setHeight(50f); + root_child0_child0.setWidthPercent(50f); + root_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -2951,17 +2921,14 @@ public void test_static_position_relative_child_containing_block_content_box() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 100); - root_child0.setPadding(YogaEdge.TOP, 100); - root_child0.setPadding(YogaEdge.RIGHT, 100); - root_child0.setPadding(YogaEdge.BOTTOM, 100); root_child0.setWidth(400f); root_child0.setHeight(400f); + root_child0.setPadding(YogaEdge.ALL, 100); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setWidthPercent(50f); root_child0_child0.setHeight(50f); + root_child0_child0.setWidthPercent(50f); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3008,18 +2975,15 @@ public void test_static_position_static_child_containing_block_content_box() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 100); - root_child0.setPadding(YogaEdge.TOP, 100); - root_child0.setPadding(YogaEdge.RIGHT, 100); - root_child0.setPadding(YogaEdge.BOTTOM, 100); root_child0.setWidth(400f); root_child0.setHeight(400f); + root_child0.setPadding(YogaEdge.ALL, 100); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidthPercent(50f); root_child0_child0.setHeight(50f); + root_child0_child0.setWidthPercent(50f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3066,28 +3030,28 @@ public void test_static_position_containing_block_padding_and_border() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 9); + root_child0.setWidth(400f); + root_child0.setHeight(400f); root_child0.setPadding(YogaEdge.TOP, 8); root_child0.setPadding(YogaEdge.RIGHT, 1); root_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0.setPadding(YogaEdge.LEFT, 9); root_child0.setBorder(YogaEdge.TOP, 5f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 4f); - root_child0.setWidth(400f); - root_child0.setHeight(400f); + root_child0.setBorder(YogaEdge.LEFT, 2f); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setWidthPercent(41f); root_child0_child0_child0.setHeightPercent(61f); + root_child0_child0_child0.setWidthPercent(41f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3144,58 +3108,58 @@ public void test_static_position_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); + root_child0.setWidth(500f); + root_child0.setHeight(500f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); - root_child0.setWidth(500f); - root_child0.setHeight(500f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setHeight(200f); + root_child0_child0.setWidth(200f); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); - root_child0_child0.setWidth(200f); - root_child0_child0.setHeight(200f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setWidthPercent(41f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPosition(YogaEdge.LEFT, 2f); root_child0_child0_child0.setPosition(YogaEdge.RIGHT, 12f); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(41f); - root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3252,56 +3216,56 @@ public void test_static_position_no_position_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); + root_child0.setWidth(500f); + root_child0.setHeight(500f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); - root_child0.setWidth(500f); - root_child0.setHeight(500f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setHeight(200f); + root_child0_child0.setWidth(200f); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); - root_child0_child0.setWidth(200f); - root_child0_child0.setHeight(200f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setWidthPercent(41f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(41f); - root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3358,57 +3322,57 @@ public void test_static_position_zero_for_inset_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); + root_child0.setWidth(500f); + root_child0.setHeight(500f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); - root_child0.setWidth(500f); - root_child0.setHeight(500f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setHeight(200f); + root_child0_child0.setWidth(200f); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); - root_child0_child0.setWidth(200f); - root_child0_child0.setHeight(200f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setWidthPercent(41f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 0f); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(41f); - root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3465,57 +3429,57 @@ public void test_static_position_start_inset_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); + root_child0.setWidth(500f); + root_child0.setHeight(500f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); - root_child0.setWidth(500f); - root_child0.setHeight(500f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setHeight(200f); + root_child0_child0.setWidth(200f); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); - root_child0_child0.setWidth(200f); - root_child0_child0.setHeight(200f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setWidthPercent(41f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPosition(YogaEdge.START, 12f); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(41f); - root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3572,57 +3536,57 @@ public void test_static_position_end_inset_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); + root_child0.setWidth(500f); + root_child0.setHeight(500f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); - root_child0.setWidth(500f); - root_child0.setHeight(500f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); + root_child0_child0.setHeight(200f); + root_child0_child0.setWidth(200f); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); - root_child0_child0.setWidth(200f); - root_child0_child0.setHeight(200f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setWidthPercent(41f); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPosition(YogaEdge.END, 4f); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(41f); - root_child0_child0_child0.setHeightPercent(63f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3679,69 +3643,69 @@ public void test_static_position_row_reverse_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); + root_child0_child0.setFlexDirection(YogaFlexDirection.ROW_REVERSE); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0.setHeightPercent(12f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setHeightPercent(12f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3808,69 +3772,69 @@ public void test_static_position_column_reverse_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); + root_child0_child0.setFlexDirection(YogaFlexDirection.COLUMN_REVERSE); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0.setWidthPercent(21f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(21f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -3937,134 +3901,134 @@ public void test_static_position_justify_flex_start_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); - root_child0.addChildAt(root_child0_child0, 0); - - final YogaNode root_child0_child0_child0 = createNode(config); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); + root_child0.addChildAt(root_child0_child0, 0); + + final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0.setWidthPercent(21f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(21f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); - root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1.setWidthPercent(10f); root_child0_child0_child1.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1.setWidthPercent(10f); + root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child1, 1); final YogaNode root_child0_child0_child1_child0 = createNode(config); - root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1_child0.setWidth(100f); + root_child0_child0_child1_child0.setHeight(50f); root_child0_child0_child1_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1_child0.setWidth(100f); - root_child0_child0_child1_child0.setHeight(50f); + root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child1.addChildAt(root_child0_child0_child1_child0, 0); final YogaNode root_child0_child0_child2 = createNode(config); - root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2.setWidthPercent(10f); root_child0_child0_child2.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2.setWidthPercent(10f); + root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child2, 2); final YogaNode root_child0_child0_child2_child0 = createNode(config); - root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2_child0.setWidth(100f); + root_child0_child0_child2_child0.setHeight(50f); root_child0_child0_child2_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2_child0.setWidth(100f); - root_child0_child0_child2_child0.setHeight(50f); + root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child2.addChildAt(root_child0_child0_child2_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4171,135 +4135,135 @@ public void test_static_position_justify_flex_start_position_set_amalgamation() root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); + root_child0_child0_child0.setWidthPercent(21f); root_child0_child0_child0.setPosition(YogaEdge.RIGHT, 30f); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(21f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); - root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1.setWidthPercent(10f); root_child0_child0_child1.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1.setWidthPercent(10f); + root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child1, 1); final YogaNode root_child0_child0_child1_child0 = createNode(config); - root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1_child0.setWidth(100f); + root_child0_child0_child1_child0.setHeight(50f); root_child0_child0_child1_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1_child0.setWidth(100f); - root_child0_child0_child1_child0.setHeight(50f); + root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child1.addChildAt(root_child0_child0_child1_child0, 0); final YogaNode root_child0_child0_child2 = createNode(config); - root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2.setWidthPercent(10f); root_child0_child0_child2.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2.setWidthPercent(10f); + root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child2, 2); final YogaNode root_child0_child0_child2_child0 = createNode(config); - root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2_child0.setWidth(100f); + root_child0_child0_child2_child0.setHeight(50f); root_child0_child0_child2_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2_child0.setWidth(100f); - root_child0_child0_child2_child0.setHeight(50f); + root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child2.addChildAt(root_child0_child0_child2_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4406,68 +4370,68 @@ public void test_static_position_no_definite_size_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 23f); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4534,69 +4498,69 @@ public void test_static_position_both_insets_set_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0_child0.setPositionPercent(YogaEdge.LEFT, 23f); root_child0_child0_child0.setPosition(YogaEdge.RIGHT, 13f); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4663,135 +4627,135 @@ public void test_static_position_justify_center_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setJustifyContent(YogaJustify.CENTER); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); + root_child0_child0.setJustifyContent(YogaJustify.CENTER); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0.setWidthPercent(21f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(21f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); - root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1.setWidthPercent(10f); root_child0_child0_child1.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1.setWidthPercent(10f); + root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child1, 1); final YogaNode root_child0_child0_child1_child0 = createNode(config); - root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1_child0.setWidth(100f); + root_child0_child0_child1_child0.setHeight(50f); root_child0_child0_child1_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1_child0.setWidth(100f); - root_child0_child0_child1_child0.setHeight(50f); + root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child1.addChildAt(root_child0_child0_child1_child0, 0); final YogaNode root_child0_child0_child2 = createNode(config); - root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2.setWidthPercent(10f); root_child0_child0_child2.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2.setWidthPercent(10f); + root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child2, 2); final YogaNode root_child0_child0_child2_child0 = createNode(config); - root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2_child0.setWidth(100f); + root_child0_child0_child2_child0.setHeight(50f); root_child0_child0_child2_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2_child0.setWidth(100f); - root_child0_child0_child2_child0.setHeight(50f); + root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child2.addChildAt(root_child0_child0_child2_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -4898,135 +4862,135 @@ public void test_static_position_justify_flex_end_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); - root_child0.setMargin(YogaEdge.RIGHT, 9f); - root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.RIGHT, 9f); + root_child0.setMargin(YogaEdge.BOTTOM, 1f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setJustifyContent(YogaJustify.FLEX_END); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); + root_child0_child0.setJustifyContent(YogaJustify.FLEX_END); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0.setWidthPercent(21f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(21f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); - root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1.setWidthPercent(10f); root_child0_child0_child1.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1.setWidthPercent(10f); + root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child1, 1); final YogaNode root_child0_child0_child1_child0 = createNode(config); - root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1_child0.setWidth(100f); + root_child0_child0_child1_child0.setHeight(50f); root_child0_child0_child1_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1_child0.setWidth(100f); - root_child0_child0_child1_child0.setHeight(50f); + root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child1.addChildAt(root_child0_child0_child1_child0, 0); final YogaNode root_child0_child0_child2 = createNode(config); - root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2.setWidthPercent(10f); root_child0_child0_child2.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2.setWidthPercent(10f); + root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child2, 2); final YogaNode root_child0_child0_child2_child0 = createNode(config); - root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2_child0.setWidth(100f); + root_child0_child0_child2_child0.setHeight(50f); root_child0_child0_child2_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2_child0.setWidth(100f); - root_child0_child0_child2_child0.setHeight(50f); + root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child2.addChildAt(root_child0_child0_child2_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5133,135 +5097,135 @@ public void test_static_position_align_flex_start_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setAlignItems(YogaAlign.FLEX_START); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); + root_child0_child0.setAlignItems(YogaAlign.FLEX_START); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0.setWidthPercent(21f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(21f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); - root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1.setWidthPercent(10f); root_child0_child0_child1.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1.setWidthPercent(10f); + root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child1, 1); final YogaNode root_child0_child0_child1_child0 = createNode(config); - root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1_child0.setWidth(100f); + root_child0_child0_child1_child0.setHeight(50f); root_child0_child0_child1_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1_child0.setWidth(100f); - root_child0_child0_child1_child0.setHeight(50f); + root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child1.addChildAt(root_child0_child0_child1_child0, 0); final YogaNode root_child0_child0_child2 = createNode(config); - root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2.setWidthPercent(10f); root_child0_child0_child2.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2.setWidthPercent(10f); + root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child2, 2); final YogaNode root_child0_child0_child2_child0 = createNode(config); - root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2_child0.setWidth(100f); + root_child0_child0_child2_child0.setHeight(50f); root_child0_child0_child2_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2_child0.setWidth(100f); - root_child0_child0_child2_child0.setHeight(50f); + root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child2.addChildAt(root_child0_child0_child2_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5368,135 +5332,135 @@ public void test_static_position_align_center_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setAlignItems(YogaAlign.CENTER); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); + root_child0_child0.setAlignItems(YogaAlign.CENTER); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0.setWidthPercent(21f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(21f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); - root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1.setWidthPercent(10f); root_child0_child0_child1.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1.setWidthPercent(10f); + root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child1, 1); final YogaNode root_child0_child0_child1_child0 = createNode(config); - root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1_child0.setWidth(100f); + root_child0_child0_child1_child0.setHeight(50f); root_child0_child0_child1_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1_child0.setWidth(100f); - root_child0_child0_child1_child0.setHeight(50f); + root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child1.addChildAt(root_child0_child0_child1_child0, 0); final YogaNode root_child0_child0_child2 = createNode(config); - root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2.setWidthPercent(10f); root_child0_child0_child2.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2.setWidthPercent(10f); + root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child2, 2); final YogaNode root_child0_child0_child2_child0 = createNode(config); - root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2_child0.setWidth(100f); + root_child0_child0_child2_child0.setHeight(50f); root_child0_child0_child2_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2_child0.setWidth(100f); - root_child0_child0_child2_child0.setHeight(50f); + root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child2.addChildAt(root_child0_child0_child2_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5603,135 +5567,135 @@ public void test_static_position_align_flex_end_amalgamation() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setMargin(YogaEdge.TOP, 5f); root_child0.setMargin(YogaEdge.RIGHT, 9f); root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 2); - root_child0.setPadding(YogaEdge.TOP, 9); - root_child0.setPadding(YogaEdge.RIGHT, 11); - root_child0.setPadding(YogaEdge.BOTTOM, 13); - root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setMargin(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 6f); root_child0.setBorder(YogaEdge.RIGHT, 7f); root_child0.setBorder(YogaEdge.BOTTOM, 8f); + root_child0.setBorder(YogaEdge.LEFT, 5f); + root_child0.setPadding(YogaEdge.TOP, 9); + root_child0.setPadding(YogaEdge.RIGHT, 11); + root_child0.setPadding(YogaEdge.BOTTOM, 13); + root_child0.setPadding(YogaEdge.LEFT, 2); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setAlignItems(YogaAlign.FLEX_END); root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setMargin(YogaEdge.TOP, 6f); root_child0_child0.setMargin(YogaEdge.RIGHT, 3f); root_child0_child0.setMargin(YogaEdge.BOTTOM, 9f); - root_child0_child0.setPadding(YogaEdge.LEFT, 1); - root_child0_child0.setPadding(YogaEdge.TOP, 7); - root_child0_child0.setPadding(YogaEdge.RIGHT, 9); - root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setMargin(YogaEdge.LEFT, 8f); root_child0_child0.setBorder(YogaEdge.TOP, 10f); root_child0_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0_child0.setBorder(YogaEdge.BOTTOM, 1f); + root_child0_child0.setBorder(YogaEdge.LEFT, 8f); + root_child0_child0.setPadding(YogaEdge.TOP, 7); + root_child0_child0.setPadding(YogaEdge.RIGHT, 9); + root_child0_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0_child0.setPadding(YogaEdge.LEFT, 1); + root_child0_child0.setAlignItems(YogaAlign.FLEX_END); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0.setWidthPercent(21f); root_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0.setWidthPercent(21f); + root_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child0_child0_child0 = createNode(config); - root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child0_child0.setWidth(100f); + root_child0_child0_child0_child0.setHeight(50f); root_child0_child0_child0_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child0_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child0_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child0_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child0_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child0_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child0_child0.setWidth(100f); - root_child0_child0_child0_child0.setHeight(50f); + root_child0_child0_child0_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child0_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child0_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child0_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child0_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child0.addChildAt(root_child0_child0_child0_child0, 0); final YogaNode root_child0_child0_child1 = createNode(config); - root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1.setWidthPercent(10f); root_child0_child0_child1.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1.setWidthPercent(10f); + root_child0_child0_child1.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child1, 1); final YogaNode root_child0_child0_child1_child0 = createNode(config); - root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child1_child0.setWidth(100f); + root_child0_child0_child1_child0.setHeight(50f); root_child0_child0_child1_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child1_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child1_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child1_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child1_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child1_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child1_child0.setWidth(100f); - root_child0_child0_child1_child0.setHeight(50f); + root_child0_child0_child1_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child1_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child1_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child1_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child1_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child1.addChildAt(root_child0_child0_child1_child0, 0); final YogaNode root_child0_child0_child2 = createNode(config); - root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2.setWidthPercent(10f); root_child0_child0_child2.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2.setWidthPercent(10f); + root_child0_child0_child2.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2.setPadding(YogaEdge.LEFT, 5); root_child0_child0.addChildAt(root_child0_child0_child2, 2); final YogaNode root_child0_child0_child2_child0 = createNode(config); - root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); + root_child0_child0_child2_child0.setWidth(100f); + root_child0_child0_child2_child0.setHeight(50f); root_child0_child0_child2_child0.setMargin(YogaEdge.TOP, 12f); root_child0_child0_child2_child0.setMargin(YogaEdge.RIGHT, 4f); root_child0_child0_child2_child0.setMargin(YogaEdge.BOTTOM, 7f); - root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); - root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); - root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); - root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); - root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setMargin(YogaEdge.LEFT, 9f); root_child0_child0_child2_child0.setBorder(YogaEdge.TOP, 1f); root_child0_child0_child2_child0.setBorder(YogaEdge.RIGHT, 5f); root_child0_child0_child2_child0.setBorder(YogaEdge.BOTTOM, 9f); - root_child0_child0_child2_child0.setWidth(100f); - root_child0_child0_child2_child0.setHeight(50f); + root_child0_child0_child2_child0.setBorder(YogaEdge.LEFT, 2f); + root_child0_child0_child2_child0.setPadding(YogaEdge.TOP, 3); + root_child0_child0_child2_child0.setPadding(YogaEdge.RIGHT, 8); + root_child0_child0_child2_child0.setPadding(YogaEdge.BOTTOM, 10); + root_child0_child0_child2_child0.setPadding(YogaEdge.LEFT, 5); root_child0_child0_child2.addChildAt(root_child0_child0_child2_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5835,30 +5799,30 @@ public void test_static_position_static_root() { YogaConfig config = YogaConfigFactory.create(); final YogaNode root = createNode(config); + root.setHeight(200f); + root.setWidth(100f); root.setPositionType(YogaPositionType.STATIC); - root.setPadding(YogaEdge.LEFT, 6); root.setPadding(YogaEdge.TOP, 1); root.setPadding(YogaEdge.RIGHT, 11); root.setPadding(YogaEdge.BOTTOM, 4); - root.setWidth(100f); - root.setHeight(200f); + root.setPadding(YogaEdge.LEFT, 6); final YogaNode root_child0 = createNode(config); + root_child0.setHeightPercent(50f); + root_child0.setWidthPercent(50f); root_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0.setMargin(YogaEdge.LEFT, 12f); - root_child0.setMargin(YogaEdge.TOP, 11f); - root_child0.setMargin(YogaEdge.RIGHT, 15f); - root_child0.setMargin(YogaEdge.BOTTOM, 1f); - root_child0.setPadding(YogaEdge.LEFT, 3); - root_child0.setPadding(YogaEdge.TOP, 7); - root_child0.setPadding(YogaEdge.RIGHT, 5); - root_child0.setPadding(YogaEdge.BOTTOM, 4); - root_child0.setBorder(YogaEdge.LEFT, 4f); root_child0.setBorder(YogaEdge.TOP, 3f); root_child0.setBorder(YogaEdge.RIGHT, 2f); root_child0.setBorder(YogaEdge.BOTTOM, 1f); - root_child0.setWidthPercent(50f); - root_child0.setHeightPercent(50f); + root_child0.setBorder(YogaEdge.LEFT, 4f); + root_child0.setPadding(YogaEdge.TOP, 7); + root_child0.setPadding(YogaEdge.RIGHT, 5); + root_child0.setPadding(YogaEdge.BOTTOM, 4); + root_child0.setPadding(YogaEdge.LEFT, 3); + root_child0.setMargin(YogaEdge.TOP, 11f); + root_child0.setMargin(YogaEdge.RIGHT, 15f); + root_child0.setMargin(YogaEdge.BOTTOM, 1f); + root_child0.setMargin(YogaEdge.LEFT, 12f); root.addChildAt(root_child0, 0); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); @@ -5895,48 +5859,45 @@ public void test_static_position_absolute_child_multiple() { root.setPositionType(YogaPositionType.ABSOLUTE); final YogaNode root_child0 = createNode(config); - root_child0.setPadding(YogaEdge.LEFT, 100); - root_child0.setPadding(YogaEdge.TOP, 100); - root_child0.setPadding(YogaEdge.RIGHT, 100); - root_child0.setPadding(YogaEdge.BOTTOM, 100); root_child0.setWidth(400f); root_child0.setHeight(400f); + root_child0.setPadding(YogaEdge.ALL, 100); root.addChildAt(root_child0, 0); final YogaNode root_child0_child0 = createNode(config); - root_child0_child0.setPositionType(YogaPositionType.STATIC); - root_child0_child0.setWidth(100f); root_child0_child0.setHeight(100f); + root_child0_child0.setWidth(100f); + root_child0_child0.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child0, 0); final YogaNode root_child0_child0_child0 = createNode(config); - root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child0_child0.setWidthPercent(10f); root_child0_child0_child0.setHeight(50f); + root_child0_child0_child0.setWidthPercent(10f); + root_child0_child0_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child0.addChildAt(root_child0_child0_child0, 0); final YogaNode root_child0_child1 = createNode(config); - root_child0_child1.setPositionType(YogaPositionType.STATIC); - root_child0_child1.setWidth(100f); root_child0_child1.setHeight(100f); + root_child0_child1.setWidth(100f); + root_child0_child1.setPositionType(YogaPositionType.STATIC); root_child0.addChildAt(root_child0_child1, 1); final YogaNode root_child0_child1_child0 = createNode(config); - root_child0_child1_child0.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child1_child0.setWidthPercent(50f); root_child0_child1_child0.setHeight(50f); + root_child0_child1_child0.setWidthPercent(50f); + root_child0_child1_child0.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child1.addChildAt(root_child0_child1_child0, 0); final YogaNode root_child0_child1_child1 = createNode(config); - root_child0_child1_child1.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child1_child1.setWidthPercent(50f); root_child0_child1_child1.setHeight(50f); + root_child0_child1_child1.setWidthPercent(50f); + root_child0_child1_child1.setPositionType(YogaPositionType.ABSOLUTE); root_child0_child1.addChildAt(root_child0_child1_child1, 1); final YogaNode root_child0_child2 = createNode(config); - root_child0_child2.setPositionType(YogaPositionType.ABSOLUTE); - root_child0_child2.setWidth(25f); root_child0_child2.setHeight(50f); + root_child0_child2.setWidth(25f); + root_child0_child2.setPositionType(YogaPositionType.ABSOLUTE); root_child0.addChildAt(root_child0_child2, 2); root.setDirection(YogaDirection.LTR); root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED); diff --git a/javascript/CMakeLists.txt b/javascript/CMakeLists.txt index d3ddf3a6f2..4aed9b8578 100644 --- a/javascript/CMakeLists.txt +++ b/javascript/CMakeLists.txt @@ -7,9 +7,8 @@ cmake_minimum_required(VERSION 3.13...3.26) set(CMAKE_VERBOSE_MAKEFILE on) project(yoga) -file(GLOB SOURCES CONFIGURE_DEPENDS +file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../yoga/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/../yoga/**/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) include_directories(..) diff --git a/javascript/src/Node.cpp b/javascript/src/Node.cpp index 42f6d82f63..d7df47854f 100644 --- a/javascript/src/Node.cpp +++ b/javascript/src/Node.cpp @@ -6,7 +6,9 @@ */ #include +#include +#include #include #include "./Config.h" @@ -124,6 +126,14 @@ void Node::setJustifyContent(int justifyContent) { YGNodeStyleSetJustifyContent(m_node, static_cast(justifyContent)); } +void Node::setJustifyItems(int justifyItems) { + YGNodeStyleSetJustifyItems(m_node, static_cast(justifyItems)); +} + +void Node::setJustifySelf(int justifySelf) { + YGNodeStyleSetJustifySelf(m_node, static_cast(justifySelf)); +} + void Node::setMargin(int edge, double margin) { YGNodeStyleSetMargin(m_node, static_cast(edge), margin); } @@ -590,3 +600,102 @@ void Node::setAlwaysFormsContainingBlock(bool alwaysFormsContainingBlock) { return YGNodeSetAlwaysFormsContainingBlock( m_node, alwaysFormsContainingBlock); } + +// Helper function to convert JS track value to YGGridTrackValueRef +static YGGridTrackValueRef convertTrackValue(emscripten::val track) { + int type = track["type"].as(); + + switch (type) { + case YGGridTrackTypeAuto: + return YGAuto(); + case YGGridTrackTypePoints: { + float value = track["value"].as(); + return YGPoints(value); + } + case YGGridTrackTypePercent: { + float value = track["value"].as(); + return YGPercent(value); + } + case YGGridTrackTypeFr: { + float value = track["value"].as(); + return YGFr(value); + } + case YGGridTrackTypeMinmax: { + YGGridTrackValueRef minVal = convertTrackValue(track["min"]); + YGGridTrackValueRef maxVal = convertTrackValue(track["max"]); + return YGMinMax(minVal, maxVal); + } + default: + return YGAuto(); + } +} + +// Helper function to build grid track list from JS array +static YGGridTrackListRef buildGridTrackList(emscripten::val tracks) { + YGGridTrackListRef trackList = YGGridTrackListCreate(); + + unsigned length = tracks["length"].as(); + for (unsigned i = 0; i < length; i++) { + emscripten::val track = tracks[i]; + YGGridTrackValueRef trackValue = convertTrackValue(track); + YGGridTrackListAddTrack(trackList, trackValue); + } + + return trackList; +} + +void Node::setGridTemplateColumns(emscripten::val tracks) { + YGGridTrackListRef trackList = buildGridTrackList(tracks); + YGNodeStyleSetGridTemplateColumns(m_node, trackList); + YGGridTrackListFree(trackList); +} + +void Node::setGridTemplateRows(emscripten::val tracks) { + YGGridTrackListRef trackList = buildGridTrackList(tracks); + YGNodeStyleSetGridTemplateRows(m_node, trackList); + YGGridTrackListFree(trackList); +} + +void Node::setGridAutoColumns(emscripten::val tracks) { + YGGridTrackListRef trackList = buildGridTrackList(tracks); + YGNodeStyleSetGridAutoColumns(m_node, trackList); + YGGridTrackListFree(trackList); +} + +void Node::setGridAutoRows(emscripten::val tracks) { + YGGridTrackListRef trackList = buildGridTrackList(tracks); + YGNodeStyleSetGridAutoRows(m_node, trackList); + YGGridTrackListFree(trackList); +} + +void Node::setGridColumnStart(int value) { + YGNodeStyleSetGridColumnStart(m_node, value); +} + +void Node::setGridColumnStartSpan(int span) { + YGNodeStyleSetGridColumnStartSpan(m_node, span); +} + +void Node::setGridColumnEnd(int value) { + YGNodeStyleSetGridColumnEnd(m_node, value); +} + +void Node::setGridColumnEndSpan(int span) { + YGNodeStyleSetGridColumnEndSpan(m_node, span); +} + +void Node::setGridRowStart(int value) { + YGNodeStyleSetGridRowStart(m_node, value); +} + +void Node::setGridRowStartSpan(int span) { + YGNodeStyleSetGridRowStartSpan(m_node, span); +} + +void Node::setGridRowEnd(int value) { + YGNodeStyleSetGridRowEnd(m_node, value); +} + +void Node::setGridRowEndSpan(int span) { + YGNodeStyleSetGridRowEndSpan(m_node, span); +} diff --git a/javascript/src/Node.h b/javascript/src/Node.h index e101b436db..44c13b19df 100644 --- a/javascript/src/Node.h +++ b/javascript/src/Node.h @@ -84,6 +84,8 @@ class Node { void setFlexDirection(int flexDirection); void setFlexWrap(int flexWrap); void setJustifyContent(int justifyContent); + void setJustifyItems(int justifyItems); + void setJustifySelf(int justifySelf); void setDirection(int direction); void setMargin(int edge, double margin); @@ -150,6 +152,20 @@ class Node { void setBoxSizing(int boxSizing); + // Grid setters + void setGridTemplateColumns(emscripten::val tracks); + void setGridTemplateRows(emscripten::val tracks); + void setGridAutoColumns(emscripten::val tracks); + void setGridAutoRows(emscripten::val tracks); + void setGridColumnStart(int value); + void setGridColumnStartSpan(int span); + void setGridColumnEnd(int value); + void setGridColumnEndSpan(int span); + void setGridRowStart(int value); + void setGridRowStartSpan(int span); + void setGridRowEnd(int value); + void setGridRowEndSpan(int span); + public: // Style getters int getPositionType(void) const; Value getPosition(int edge) const; diff --git a/javascript/src/embind.cpp b/javascript/src/embind.cpp index a2f7202961..2e53981b71 100644 --- a/javascript/src/embind.cpp +++ b/javascript/src/embind.cpp @@ -78,6 +78,8 @@ EMSCRIPTEN_BINDINGS(YOGA_LAYOUT) { .function("setFlexDirection", &Node::setFlexDirection) .function("setFlexWrap", &Node::setFlexWrap) .function("setJustifyContent", &Node::setJustifyContent) + .function("setJustifyItems", &Node::setJustifyItems) + .function("setJustifySelf", &Node::setJustifySelf) .function("setMargin", &Node::setMargin) .function("setMarginPercent", &Node::setMarginPercent) @@ -192,6 +194,20 @@ EMSCRIPTEN_BINDINGS(YOGA_LAYOUT) { .function( "setAlwaysFormsContainingBlock", &Node::setAlwaysFormsContainingBlock) + // Grid setters + .function("setGridTemplateColumns", &Node::setGridTemplateColumns) + .function("setGridTemplateRows", &Node::setGridTemplateRows) + .function("setGridAutoColumns", &Node::setGridAutoColumns) + .function("setGridAutoRows", &Node::setGridAutoRows) + .function("setGridColumnStart", &Node::setGridColumnStart) + .function("setGridColumnStartSpan", &Node::setGridColumnStartSpan) + .function("setGridColumnEnd", &Node::setGridColumnEnd) + .function("setGridColumnEndSpan", &Node::setGridColumnEndSpan) + .function("setGridRowStart", &Node::setGridRowStart) + .function("setGridRowStartSpan", &Node::setGridRowStartSpan) + .function("setGridRowEnd", &Node::setGridRowEnd) + .function("setGridRowEndSpan", &Node::setGridRowEndSpan) + .function("isReferenceBaseline", &Node::isReferenceBaseline) .function("setIsReferenceBaseline", &Node::setIsReferenceBaseline) diff --git a/javascript/src/generated/YGEnums.ts b/javascript/src/generated/YGEnums.ts index f389fe2fdf..f50aa88a73 100644 --- a/javascript/src/generated/YGEnums.ts +++ b/javascript/src/generated/YGEnums.ts @@ -17,6 +17,8 @@ export enum Align { SpaceBetween = 6, SpaceAround = 7, SpaceEvenly = 8, + Start = 9, + End = 10, } export enum BoxSizing { @@ -39,6 +41,7 @@ export enum Display { Flex = 0, None = 1, Contents = 2, + Grid = 3, } export enum Edge { @@ -73,6 +76,14 @@ export enum FlexDirection { RowReverse = 3, } +export enum GridTrackType { + Auto = 0, + Points = 1, + Percent = 2, + Fr = 3, + Minmax = 4, +} + export enum Gutter { Column = 0, Row = 1, @@ -80,12 +91,16 @@ export enum Gutter { } export enum Justify { - FlexStart = 0, - Center = 1, - FlexEnd = 2, - SpaceBetween = 3, - SpaceAround = 4, - SpaceEvenly = 5, + Auto = 0, + FlexStart = 1, + Center = 2, + FlexEnd = 3, + SpaceBetween = 4, + SpaceAround = 5, + SpaceEvenly = 6, + Stretch = 7, + Start = 8, + End = 9, } export enum LogLevel { @@ -146,6 +161,8 @@ const constants = { ALIGN_SPACE_BETWEEN: Align.SpaceBetween, ALIGN_SPACE_AROUND: Align.SpaceAround, ALIGN_SPACE_EVENLY: Align.SpaceEvenly, + ALIGN_START: Align.Start, + ALIGN_END: Align.End, BOX_SIZING_BORDER_BOX: BoxSizing.BorderBox, BOX_SIZING_CONTENT_BOX: BoxSizing.ContentBox, DIMENSION_WIDTH: Dimension.Width, @@ -156,6 +173,7 @@ const constants = { DISPLAY_FLEX: Display.Flex, DISPLAY_NONE: Display.None, DISPLAY_CONTENTS: Display.Contents, + DISPLAY_GRID: Display.Grid, EDGE_LEFT: Edge.Left, EDGE_TOP: Edge.Top, EDGE_RIGHT: Edge.Right, @@ -176,15 +194,24 @@ const constants = { FLEX_DIRECTION_COLUMN_REVERSE: FlexDirection.ColumnReverse, FLEX_DIRECTION_ROW: FlexDirection.Row, FLEX_DIRECTION_ROW_REVERSE: FlexDirection.RowReverse, + GRID_TRACK_TYPE_AUTO: GridTrackType.Auto, + GRID_TRACK_TYPE_POINTS: GridTrackType.Points, + GRID_TRACK_TYPE_PERCENT: GridTrackType.Percent, + GRID_TRACK_TYPE_FR: GridTrackType.Fr, + GRID_TRACK_TYPE_MINMAX: GridTrackType.Minmax, GUTTER_COLUMN: Gutter.Column, GUTTER_ROW: Gutter.Row, GUTTER_ALL: Gutter.All, + JUSTIFY_AUTO: Justify.Auto, JUSTIFY_FLEX_START: Justify.FlexStart, JUSTIFY_CENTER: Justify.Center, JUSTIFY_FLEX_END: Justify.FlexEnd, JUSTIFY_SPACE_BETWEEN: Justify.SpaceBetween, JUSTIFY_SPACE_AROUND: Justify.SpaceAround, JUSTIFY_SPACE_EVENLY: Justify.SpaceEvenly, + JUSTIFY_STRETCH: Justify.Stretch, + JUSTIFY_START: Justify.Start, + JUSTIFY_END: Justify.End, LOG_LEVEL_ERROR: LogLevel.Error, LOG_LEVEL_WARN: LogLevel.Warn, LOG_LEVEL_INFO: LogLevel.Info, diff --git a/javascript/src/wrapAssembly.ts b/javascript/src/wrapAssembly.ts index 9b2dc1e6ec..01fb8bf5a9 100644 --- a/javascript/src/wrapAssembly.ts +++ b/javascript/src/wrapAssembly.ts @@ -20,6 +20,7 @@ import type { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -47,6 +48,13 @@ type Value = { value: number; }; +type GridTrackValue = { + type: GridTrackType; + value?: number; + min?: GridTrackValue; + max?: GridTrackValue; +}; + export type Config = { free(): void; isExperimentalFeatureEnabled(feature: ExperimentalFeature): boolean; @@ -170,6 +178,8 @@ export type Node = { setHeightPercent(height: number | undefined): void; setHeightStretch(): void; setJustifyContent(justifyContent: Justify): void; + setJustifyItems(justifyItems: Justify): void; + setJustifySelf(justifySelf: Justify): void; setGap(gutter: Gutter, gapLength: number | `${number}%` | undefined): Value; setGapPercent(gutter: Gutter, gapLength: number | undefined): Value; setMargin( @@ -258,6 +268,18 @@ export type Node = { unsetDirtiedFunc(): void; unsetMeasureFunc(): void; setAlwaysFormsContainingBlock(alwaysFormsContainingBlock: boolean): void; + setGridTemplateColumns(tracks: GridTrackValue[]): void; + setGridTemplateRows(tracks: GridTrackValue[]): void; + setGridAutoColumns(tracks: GridTrackValue[]): void; + setGridAutoRows(tracks: GridTrackValue[]): void; + setGridColumnStart(value: number): void; + setGridColumnStartSpan(span: number): void; + setGridColumnEnd(value: number): void; + setGridColumnEndSpan(span: number): void; + setGridRowStart(value: number): void; + setGridRowStartSpan(span: number): void; + setGridRowEnd(value: number): void; + setGridRowEndSpan(span: number): void; }; export type Yoga = { diff --git a/javascript/tests/generated/YGAbsolutePositionTest.test.ts b/javascript/tests/generated/YGAbsolutePositionTest.test.ts index 694086e23c..3a77adaeec 100644 --- a/javascript/tests/generated/YGAbsolutePositionTest.test.ts +++ b/javascript/tests/generated/YGAbsolutePositionTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<9deb466dfc94bb340137a9e6b5d5c63d>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAbsolutePositionTest.html + * @generated SignedSource<<8b2b805ed79a219fd7a3d66da477bf80>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAbsolutePositionTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -39,11 +40,11 @@ test('absolute_layout_width_height_start_top', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setWidth(10); + root_child0.setHeight(10); root_child0.setPositionType(PositionType.Absolute); root_child0.setPosition(Edge.Start, 10); root_child0.setPosition(Edge.Top, 10); - root_child0.setWidth(10); - root_child0.setHeight(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -87,11 +88,11 @@ test('absolute_layout_width_height_left_auto_right', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setWidth(10); + root_child0.setHeight(10); root_child0.setPositionType(PositionType.Absolute); root_child0.setPositionAuto(Edge.Left); root_child0.setPosition(Edge.Right, 10); - root_child0.setWidth(10); - root_child0.setHeight(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -135,11 +136,11 @@ test('absolute_layout_width_height_left_right_auto', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setWidth(10); + root_child0.setHeight(10); root_child0.setPositionType(PositionType.Absolute); root_child0.setPosition(Edge.Left, 10); root_child0.setPositionAuto(Edge.Right); - root_child0.setWidth(10); - root_child0.setHeight(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -183,11 +184,11 @@ test('absolute_layout_width_height_left_auto_right_auto', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setWidth(10); + root_child0.setHeight(10); root_child0.setPositionType(PositionType.Absolute); root_child0.setPositionAuto(Edge.Left); root_child0.setPositionAuto(Edge.Right); - root_child0.setWidth(10); - root_child0.setHeight(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -231,11 +232,11 @@ test('absolute_layout_width_height_end_bottom', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setWidth(10); + root_child0.setHeight(10); root_child0.setPositionType(PositionType.Absolute); root_child0.setPosition(Edge.End, 10); root_child0.setPosition(Edge.Bottom, 10); - root_child0.setWidth(10); - root_child0.setHeight(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -327,13 +328,13 @@ test('absolute_layout_width_height_start_top_end_bottom', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setWidth(10); + root_child0.setHeight(10); root_child0.setPositionType(PositionType.Absolute); root_child0.setPosition(Edge.Start, 10); root_child0.setPosition(Edge.Top, 10); root_child0.setPosition(Edge.End, 10); root_child0.setPosition(Edge.Bottom, 10); - root_child0.setWidth(10); - root_child0.setHeight(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -372,11 +373,11 @@ test('do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_pare try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setOverflow(Overflow.Hidden); - root.setWidth(50); root.setHeight(50); + root.setWidth(50); + root.setOverflow(Overflow.Hidden); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -436,59 +437,44 @@ test('absolute_layout_within_border', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Left, 10); - root.setMargin(Edge.Top, 10); - root.setMargin(Edge.Right, 10); - root.setMargin(Edge.Bottom, 10); - root.setPadding(Edge.Left, 10); - root.setPadding(Edge.Top, 10); - root.setPadding(Edge.Right, 10); - root.setPadding(Edge.Bottom, 10); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setBorder(Edge.All, 10); + root.setMargin(Edge.All, 10); + root.setPadding(Edge.All, 10); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); - root_child0.setPosition(Edge.Left, 0); - root_child0.setPosition(Edge.Top, 0); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setPosition(Edge.Left, 0); + root_child0.setPosition(Edge.Top, 0); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setPositionType(PositionType.Absolute); - root_child1.setPosition(Edge.Right, 0); - root_child1.setPosition(Edge.Bottom, 0); root_child1.setWidth(50); root_child1.setHeight(50); + root_child1.setPosition(Edge.Right, 0); + root_child1.setPosition(Edge.Bottom, 0); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); root_child2.setPositionType(PositionType.Absolute); - root_child2.setPosition(Edge.Left, 0); - root_child2.setPosition(Edge.Top, 0); - root_child2.setMargin(Edge.Left, 10); - root_child2.setMargin(Edge.Top, 10); - root_child2.setMargin(Edge.Right, 10); - root_child2.setMargin(Edge.Bottom, 10); root_child2.setWidth(50); root_child2.setHeight(50); + root_child2.setPosition(Edge.Left, 0); + root_child2.setPosition(Edge.Top, 0); + root_child2.setMargin(Edge.All, 10); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); root_child3.setPositionType(PositionType.Absolute); - root_child3.setPosition(Edge.Right, 0); - root_child3.setPosition(Edge.Bottom, 0); - root_child3.setMargin(Edge.Left, 10); - root_child3.setMargin(Edge.Top, 10); - root_child3.setMargin(Edge.Right, 10); - root_child3.setMargin(Edge.Bottom, 10); root_child3.setWidth(50); root_child3.setHeight(50); + root_child3.setPosition(Edge.Right, 0); + root_child3.setPosition(Edge.Bottom, 0); + root_child3.setMargin(Edge.All, 10); root.insertChild(root_child3, 3); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -557,12 +543,12 @@ test('absolute_layout_align_items_and_justify_content_center', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); - root.setWidth(110); root.setHeight(100); + root.setWidth(110); + root.setFlexGrow(1); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -606,12 +592,12 @@ test('absolute_layout_align_items_and_justify_content_flex_end', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.FlexEnd); - root.setAlignItems(Align.FlexEnd); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); - root.setWidth(110); root.setHeight(100); + root.setWidth(110); + root.setFlexGrow(1); + root.setAlignItems(Align.FlexEnd); + root.setJustifyContent(Justify.FlexEnd); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -655,11 +641,11 @@ test('absolute_layout_justify_content_center', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); - root.setWidth(110); root.setHeight(100); + root.setWidth(110); + root.setFlexGrow(1); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -703,11 +689,11 @@ test('absolute_layout_align_items_center', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); - root.setWidth(110); root.setHeight(100); + root.setWidth(110); + root.setFlexGrow(1); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -752,15 +738,15 @@ test('absolute_layout_align_items_center_on_child_only', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); - root.setWidth(110); root.setHeight(100); + root.setWidth(110); + root.setFlexGrow(1); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.Center); root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth(60); root_child0.setHeight(40); + root_child0.setAlignSelf(Align.Center); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -799,18 +785,18 @@ test('absolute_layout_align_items_and_justify_content_center_and_top_position', try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); - root.setWidth(110); root.setHeight(100); + root.setWidth(110); + root.setFlexGrow(1); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); - root_child0.setPosition(Edge.Top, 10); root_child0.setWidth(60); root_child0.setHeight(40); + root_child0.setPosition(Edge.Top, 10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -849,18 +835,18 @@ test('absolute_layout_align_items_and_justify_content_center_and_bottom_position try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); - root.setWidth(110); root.setHeight(100); + root.setWidth(110); + root.setFlexGrow(1); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); - root_child0.setPosition(Edge.Bottom, 10); root_child0.setWidth(60); root_child0.setHeight(40); + root_child0.setPosition(Edge.Bottom, 10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -899,18 +885,18 @@ test('absolute_layout_align_items_and_justify_content_center_and_left_position', try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); - root.setWidth(110); root.setHeight(100); + root.setWidth(110); + root.setFlexGrow(1); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); - root_child0.setPosition(Edge.Left, 5); root_child0.setWidth(60); root_child0.setHeight(40); + root_child0.setPosition(Edge.Left, 5); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -949,18 +935,18 @@ test('absolute_layout_align_items_and_justify_content_center_and_right_position' try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); - root.setWidth(110); root.setHeight(100); + root.setWidth(110); + root.setFlexGrow(1); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); - root_child0.setPosition(Edge.Right, 5); root_child0.setWidth(60); root_child0.setHeight(40); + root_child0.setPosition(Edge.Right, 5); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1000,9 +986,9 @@ test('position_root_with_rtl_should_position_withoutdirection', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPosition(Edge.Left, 72); - root.setWidth(52); root.setHeight(52); + root.setWidth(52); + root.setPosition(Edge.Left, 72); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(72); @@ -1051,8 +1037,8 @@ test('absolute_layout_percentage_bottom_based_on_parent_height', () => { const root_child2 = Yoga.Node.create(config); root_child2.setPositionType(PositionType.Absolute); root_child2.setPosition(Edge.Top, "10%"); - root_child2.setPosition(Edge.Bottom, "10%"); root_child2.setWidth(10); + root_child2.setPosition(Edge.Bottom, "10%"); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1112,14 +1098,14 @@ test('absolute_layout_in_wrap_reverse_column_container', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); root.setHeight(100); + root.setFlexWrap(Wrap.WrapReverse); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setPositionType(PositionType.Absolute); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1158,16 +1144,16 @@ test('absolute_layout_in_wrap_reverse_row_container', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); + root.setFlexDirection(FlexDirection.Row); root.setWidth(100); root.setHeight(100); + root.setFlexWrap(Wrap.WrapReverse); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setPositionType(PositionType.Absolute); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1207,15 +1193,15 @@ test('absolute_layout_in_wrap_reverse_column_container_flex_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); root.setHeight(100); + root.setFlexWrap(Wrap.WrapReverse); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.FlexEnd); - root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setPositionType(PositionType.Absolute); + root_child0.setAlignSelf(Align.FlexEnd); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1254,17 +1240,17 @@ test('absolute_layout_in_wrap_reverse_row_container_flex_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); + root.setFlexDirection(FlexDirection.Row); root.setWidth(100); root.setHeight(100); + root.setFlexWrap(Wrap.WrapReverse); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.FlexEnd); - root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setPositionType(PositionType.Absolute); + root_child0.setAlignSelf(Align.FlexEnd); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1311,11 +1297,11 @@ test('percent_absolute_position_infinite_height', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setPositionType(PositionType.Absolute); - root_child1.setPosition(Edge.Left, "20%"); - root_child1.setPosition(Edge.Top, "20%"); root_child1.setWidth("20%"); root_child1.setHeight("20%"); + root_child1.setPosition(Edge.Left, "20%"); + root_child1.setPosition(Edge.Top, "20%"); + root_child1.setPositionType(PositionType.Absolute); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1365,15 +1351,15 @@ test('absolute_layout_percentage_height_based_on_padded_parent', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Top, 10); - root.setBorder(Edge.Top, 10); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.Top, 10); + root.setBorder(Edge.Top, 10); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth(100); root_child0.setHeight("50%"); + root_child0.setPositionType(PositionType.Absolute); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1412,12 +1398,12 @@ test('absolute_layout_percentage_height_based_on_padded_parent_and_align_items_c try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setAlignItems(Align.Center); - root.setPadding(Edge.Top, 20); - root.setPadding(Edge.Bottom, 20); + root.setJustifyContent(Justify.Center); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.Top, 20); + root.setPadding(Edge.Bottom, 20); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -1462,9 +1448,9 @@ test('absolute_layout_padding_left', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 100); root.setWidth(200); root.setHeight(200); + root.setPadding(Edge.Left, 100); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -1509,9 +1495,9 @@ test('absolute_layout_padding_right', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Right, 100); root.setWidth(200); root.setHeight(200); + root.setPadding(Edge.Right, 100); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -1556,9 +1542,9 @@ test('absolute_layout_padding_top', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Top, 100); root.setWidth(200); root.setHeight(200); + root.setPadding(Edge.Top, 100); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -1603,9 +1589,9 @@ test('absolute_layout_padding_bottom', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Bottom, 100); root.setWidth(200); root.setHeight(200); + root.setPadding(Edge.Bottom, 100); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); @@ -1652,22 +1638,16 @@ test('absolute_layout_padding', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 10); - root_child0.setMargin(Edge.Top, 10); - root_child0.setMargin(Edge.Right, 10); - root_child0.setMargin(Edge.Bottom, 10); root_child0.setWidth(200); root_child0.setHeight(200); + root_child0.setMargin(Edge.All, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setPadding(Edge.Left, 50); - root_child0_child0.setPadding(Edge.Top, 50); - root_child0_child0.setPadding(Edge.Right, 50); - root_child0_child0.setPadding(Edge.Bottom, 50); root_child0_child0.setWidth(200); root_child0_child0.setHeight(200); + root_child0_child0.setPadding(Edge.All, 50); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); @@ -1735,22 +1715,16 @@ test('absolute_layout_border', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 10); - root_child0.setMargin(Edge.Top, 10); - root_child0.setMargin(Edge.Right, 10); - root_child0.setMargin(Edge.Bottom, 10); root_child0.setWidth(200); root_child0.setHeight(200); + root_child0.setMargin(Edge.All, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setBorder(Edge.Left, 10); - root_child0_child0.setBorder(Edge.Top, 10); - root_child0_child0.setBorder(Edge.Right, 10); - root_child0_child0.setBorder(Edge.Bottom, 10); root_child0_child0.setWidth(200); root_child0_child0.setHeight(200); + root_child0_child0.setBorder(Edge.All, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); @@ -1815,21 +1789,21 @@ test('absolute_layout_column_reverse_margin_border', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.ColumnReverse); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setFlexDirection(FlexDirection.ColumnReverse); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); + root_child0.setWidth(50); + root_child0.setHeight(50); root_child0.setPosition(Edge.Left, 5); root_child0.setPosition(Edge.Right, 3); - root_child0.setMargin(Edge.Left, 3); root_child0.setMargin(Edge.Right, 4); - root_child0.setBorder(Edge.Left, 1); + root_child0.setMargin(Edge.Left, 3); root_child0.setBorder(Edge.Right, 7); - root_child0.setWidth(50); - root_child0.setHeight(50); + root_child0.setBorder(Edge.Left, 1); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGAlignContentTest.test.ts b/javascript/tests/generated/YGAlignContentTest.test.ts index aecef1a641..8b6e273fe4 100644 --- a/javascript/tests/generated/YGAlignContentTest.test.ts +++ b/javascript/tests/generated/YGAlignContentTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignContentTest.html + * @generated SignedSource<<88c71c59d2e479a8a82567a7eed7ad96>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAlignContentTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,10 +35,10 @@ test('align_content_flex_start_nowrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -95,11 +96,11 @@ test('align_content_flex_start_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -202,11 +203,11 @@ test('align_content_flex_start_wrap_singleline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -265,17 +266,14 @@ test('align_content_flex_start_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -361,20 +359,16 @@ test('align_content_flex_start_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); - root_child0.setGap(Gutter.Column, 10); - root_child0.setGap(Gutter.Row, 10); + root_child0.setGap(Gutter.All, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -459,9 +453,9 @@ test('align_content_flex_start_without_height_on_children', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -562,20 +556,20 @@ test('align_content_flex_start_with_flex', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); + root_child0.setWidth(50); root_child0.setFlexGrow(1); root_child0.setFlexBasis("0%"); - root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setWidth(50); root_child1.setFlexGrow(1); root_child1.setFlexBasis("0%"); - root_child1.setWidth(50); root_child1.setHeight(10); root.insertChild(root_child1, 1); @@ -584,10 +578,10 @@ test('align_content_flex_start_with_flex', () => { root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setWidth(50); root_child3.setFlexGrow(1); root_child3.setFlexShrink(1); root_child3.setFlexBasis("0%"); - root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); @@ -670,11 +664,11 @@ test('align_content_flex_end_nowrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.FlexEnd); root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -732,12 +726,12 @@ test('align_content_flex_end_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.FlexEnd); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -840,12 +834,12 @@ test('align_content_flex_end_wrap_singleline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.FlexEnd); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -904,18 +898,15 @@ test('align_content_flex_end_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.FlexEnd); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.FlexEnd); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -1001,21 +992,17 @@ test('align_content_flex_end_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.FlexEnd); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.FlexEnd); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); - root_child0.setGap(Gutter.Column, 10); - root_child0.setGap(Gutter.Row, 10); + root_child0.setGap(Gutter.All, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1099,11 +1086,11 @@ test('align_content_center_nowrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Center); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1161,12 +1148,12 @@ test('align_content_center_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Center); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1269,12 +1256,12 @@ test('align_content_center_wrap_singleline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Center); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1333,18 +1320,15 @@ test('align_content_center_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.Center); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.Center); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -1430,21 +1414,17 @@ test('align_content_center_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.Center); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.Center); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); - root_child0.setGap(Gutter.Column, 10); - root_child0.setGap(Gutter.Row, 10); + root_child0.setGap(Gutter.All, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1528,11 +1508,11 @@ test('align_content_space_between_nowrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceBetween); root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.SpaceBetween); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1590,12 +1570,12 @@ test('align_content_space_between_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceBetween); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.SpaceBetween); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1698,12 +1678,12 @@ test('align_content_space_between_wrap_singleline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceBetween); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.SpaceBetween); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1762,18 +1742,15 @@ test('align_content_space_between_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.SpaceBetween); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.SpaceBetween); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -1859,18 +1836,15 @@ test('align_content_space_between_wrapped_negative_space_row_reverse', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.SpaceBetween); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.SpaceBetween); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -1956,21 +1930,17 @@ test('align_content_space_between_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.SpaceBetween); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.SpaceBetween); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); - root_child0.setGap(Gutter.Column, 10); - root_child0.setGap(Gutter.Row, 10); + root_child0.setGap(Gutter.All, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2054,11 +2024,11 @@ test('align_content_space_around_nowrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceAround); root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.SpaceAround); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -2116,12 +2086,12 @@ test('align_content_space_around_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceAround); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.SpaceAround); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -2224,12 +2194,12 @@ test('align_content_space_around_wrap_singleline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceAround); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.SpaceAround); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -2288,18 +2258,15 @@ test('align_content_space_around_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.SpaceAround); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.SpaceAround); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -2385,18 +2352,15 @@ test('align_content_space_around_wrapped_negative_space_row_reverse', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.SpaceAround); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.SpaceAround); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -2482,21 +2446,17 @@ test('align_content_space_around_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.SpaceAround); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.SpaceAround); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); - root_child0.setGap(Gutter.Column, 10); - root_child0.setGap(Gutter.Row, 10); + root_child0.setGap(Gutter.All, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2580,11 +2540,11 @@ test('align_content_space_evenly_nowrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceEvenly); root.setPositionType(PositionType.Absolute); root.setWidth(140); root.setHeight(120); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.SpaceEvenly); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -2642,12 +2602,12 @@ test('align_content_space_evenly_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceEvenly); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.SpaceEvenly); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -2750,12 +2710,12 @@ test('align_content_space_evenly_wrap_singleline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceEvenly); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(140); root.setHeight(120); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.SpaceEvenly); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -2814,18 +2774,15 @@ test('align_content_space_evenly_wrapped_negative_space', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.SpaceEvenly); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.SpaceEvenly); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -2911,21 +2868,17 @@ test('align_content_space_evenly_wrapped_negative_space_gap', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 60); - root.setBorder(Edge.Top, 60); - root.setBorder(Edge.Right, 60); - root.setBorder(Edge.Bottom, 60); root.setWidth(320); root.setHeight(320); + root.setBorder(Edge.All, 60); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.Center); - root_child0.setAlignContent(Align.SpaceEvenly); root_child0.setFlexWrap(Wrap.Wrap); + root_child0.setAlignContent(Align.SpaceEvenly); + root_child0.setJustifyContent(Justify.Center); root_child0.setHeight(10); - root_child0.setGap(Gutter.Column, 10); - root_child0.setGap(Gutter.Row, 10); + root_child0.setGap(Gutter.All, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -3009,11 +2962,11 @@ test('align_content_stretch', () => { try { root = Yoga.Node.create(config); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -3111,12 +3064,12 @@ test('align_content_stretch_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -3214,12 +3167,12 @@ test('align_content_stretch_row_with_children', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -3333,22 +3286,22 @@ test('align_content_stretch_row_with_flex', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setWidth(50); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); - root_child1.setWidth(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -3356,10 +3309,10 @@ test('align_content_stretch_row_with_flex', () => { root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setWidth(50); root_child3.setFlexGrow(1); root_child3.setFlexShrink(1); root_child3.setFlexBasis("0%"); - root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); @@ -3442,22 +3395,22 @@ test('align_content_stretch_row_with_flex_no_shrink', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setWidth(50); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); - root_child1.setWidth(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -3465,9 +3418,9 @@ test('align_content_stretch_row_with_flex_no_shrink', () => { root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); + root_child3.setWidth(50); root_child3.setFlexGrow(1); root_child3.setFlexBasis("0%"); - root_child3.setWidth(50); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); @@ -3550,23 +3503,20 @@ test('align_content_stretch_row_with_margin', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setMargin(Edge.Left, 10); - root_child1.setMargin(Edge.Top, 10); - root_child1.setMargin(Edge.Right, 10); - root_child1.setMargin(Edge.Bottom, 10); root_child1.setWidth(50); + root_child1.setMargin(Edge.All, 10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -3574,11 +3524,8 @@ test('align_content_stretch_row_with_margin', () => { root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setMargin(Edge.Left, 10); - root_child3.setMargin(Edge.Top, 10); - root_child3.setMargin(Edge.Right, 10); - root_child3.setMargin(Edge.Bottom, 10); root_child3.setWidth(50); + root_child3.setMargin(Edge.All, 10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); @@ -3661,23 +3608,20 @@ test('align_content_stretch_row_with_padding', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setPadding(Edge.Left, 10); - root_child1.setPadding(Edge.Top, 10); - root_child1.setPadding(Edge.Right, 10); - root_child1.setPadding(Edge.Bottom, 10); root_child1.setWidth(50); + root_child1.setPadding(Edge.All, 10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -3685,11 +3629,8 @@ test('align_content_stretch_row_with_padding', () => { root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setPadding(Edge.Left, 10); - root_child3.setPadding(Edge.Top, 10); - root_child3.setPadding(Edge.Right, 10); - root_child3.setPadding(Edge.Bottom, 10); root_child3.setWidth(50); + root_child3.setPadding(Edge.All, 10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); @@ -3772,12 +3713,12 @@ test('align_content_stretch_row_with_single_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -3833,12 +3774,12 @@ test('align_content_stretch_row_with_fixed_height', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -3937,12 +3878,12 @@ test('align_content_stretch_row_with_max_height', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -4041,12 +3982,12 @@ test('align_content_stretch_row_with_min_height', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -4145,11 +4086,11 @@ test('align_content_stretch_column', () => { try { root = Yoga.Node.create(config); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(150); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(50); @@ -4162,10 +4103,10 @@ test('align_content_stretch_column', () => { root_child0.insertChild(root_child0_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setHeight(50); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); - root_child1.setHeight(50); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -4266,21 +4207,21 @@ test('align_content_stretch_is_not_overriding_align_items', () => { try { root = Yoga.Node.create(config); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setAlignContent(Align.Stretch); - root_child0.setAlignItems(Align.Center); root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setAlignItems(Align.Center); + root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setAlignContent(Align.Stretch); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setAlignContent(Align.Stretch); - root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setWidth(10); + root_child0_child0.setAlignContent(Align.Stretch); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4329,12 +4270,12 @@ test('align_content_stretch_with_min_cross_axis', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(500); root.setMinHeight(500); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(400); @@ -4392,12 +4333,12 @@ test('align_content_stretch_with_max_cross_axis', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(500); root.setMaxHeight(500); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(400); @@ -4455,20 +4396,14 @@ test('align_content_stretch_with_max_cross_axis_and_border_padding', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setPadding(Edge.Left, 2); - root.setPadding(Edge.Top, 2); - root.setPadding(Edge.Right, 2); - root.setPadding(Edge.Bottom, 2); - root.setBorder(Edge.Left, 5); - root.setBorder(Edge.Top, 5); - root.setBorder(Edge.Right, 5); - root.setBorder(Edge.Bottom, 5); root.setWidth(500); root.setMaxHeight(500); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Stretch); + root.setBorder(Edge.All, 5); + root.setPadding(Edge.All, 2); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(400); @@ -4526,12 +4461,12 @@ test('align_content_space_evenly_with_min_cross_axis', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceEvenly); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(500); root.setMinHeight(500); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.SpaceEvenly); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(400); @@ -4589,12 +4524,12 @@ test('align_content_space_evenly_with_max_cross_axis', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceEvenly); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(500); root.setMaxHeight(500); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.SpaceEvenly); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(400); @@ -4652,12 +4587,12 @@ test('align_content_space_evenly_with_max_cross_axis_violated', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceEvenly); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(500); root.setMaxHeight(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.SpaceEvenly); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(400); @@ -4715,20 +4650,14 @@ test('align_content_space_evenly_with_max_cross_axis_violated_padding_and_border try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceEvenly); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setPadding(Edge.Left, 2); - root.setPadding(Edge.Top, 2); - root.setPadding(Edge.Right, 2); - root.setPadding(Edge.Bottom, 2); - root.setBorder(Edge.Left, 5); - root.setBorder(Edge.Top, 5); - root.setBorder(Edge.Right, 5); - root.setBorder(Edge.Bottom, 5); root.setWidth(500); root.setMaxHeight(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.SpaceEvenly); + root.setBorder(Edge.All, 5); + root.setPadding(Edge.All, 2); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(400); @@ -4786,27 +4715,27 @@ test('align_content_space_around_and_align_items_flex_end_with_flex_wrap', () => try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceAround); - root.setAlignItems(Align.FlexEnd); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(300); root.setHeight(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.SpaceAround); + root.setAlignItems(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(150); root_child0.setHeight(50); + root_child0.setWidth(150); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(120); root_child1.setHeight(100); + root_child1.setWidth(120); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(120); root_child2.setHeight(50); + root_child2.setWidth(120); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4865,27 +4794,27 @@ test('align_content_space_around_and_align_items_center_with_flex_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceAround); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(300); root.setHeight(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.SpaceAround); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(150); root_child0.setHeight(50); + root_child0.setWidth(150); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(120); root_child1.setHeight(100); + root_child1.setWidth(120); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(120); root_child2.setHeight(50); + root_child2.setWidth(120); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4944,27 +4873,27 @@ test('align_content_space_around_and_align_items_flex_start_with_flex_wrap', () try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceAround); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(300); root.setHeight(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.SpaceAround); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(150); root_child0.setHeight(50); + root_child0.setWidth(150); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(120); root_child1.setHeight(100); + root_child1.setWidth(120); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(120); root_child2.setHeight(50); + root_child2.setWidth(120); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5023,61 +4952,61 @@ test('align_content_flex_start_stretch_doesnt_influence_line_box_dim', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 20); + root.setWidth(400); + root.setFlexDirection(FlexDirection.Row); root.setPadding(Edge.Top, 20); - root.setPadding(Edge.Right, 20); root.setPadding(Edge.Bottom, 20); - root.setWidth(400); + root.setPadding(Edge.Left, 20); + root.setPadding(Edge.Right, 20); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Right, 20); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setMargin(Edge.Right, 20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setFlexDirection(FlexDirection.Row); root_child1.setFlexWrap(Wrap.Wrap); - root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); - root_child1_child0.setMargin(Edge.Right, 20); - root_child1_child0.setWidth(30); root_child1_child0.setHeight(30); + root_child1_child0.setWidth(30); + root_child1_child0.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child0, 0); const root_child1_child1 = Yoga.Node.create(config); - root_child1_child1.setMargin(Edge.Right, 20); - root_child1_child1.setWidth(30); root_child1_child1.setHeight(30); + root_child1_child1.setWidth(30); + root_child1_child1.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child1, 1); const root_child1_child2 = Yoga.Node.create(config); - root_child1_child2.setMargin(Edge.Right, 20); - root_child1_child2.setWidth(30); root_child1_child2.setHeight(30); + root_child1_child2.setWidth(30); + root_child1_child2.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child2, 2); const root_child1_child3 = Yoga.Node.create(config); - root_child1_child3.setMargin(Edge.Right, 20); - root_child1_child3.setWidth(30); root_child1_child3.setHeight(30); + root_child1_child3.setWidth(30); + root_child1_child3.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child3, 3); const root_child1_child4 = Yoga.Node.create(config); - root_child1_child4.setMargin(Edge.Right, 20); - root_child1_child4.setWidth(30); root_child1_child4.setHeight(30); + root_child1_child4.setWidth(30); + root_child1_child4.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child4, 4); const root_child2 = Yoga.Node.create(config); - root_child2.setMargin(Edge.Left, 20); - root_child2.setWidth(50); root_child2.setHeight(50); + root_child2.setWidth(50); + root_child2.setMargin(Edge.Left, 20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5186,62 +5115,62 @@ test('align_content_stretch_stretch_does_influence_line_box_dim', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 20); + root.setWidth(400); + root.setFlexDirection(FlexDirection.Row); root.setPadding(Edge.Top, 20); - root.setPadding(Edge.Right, 20); root.setPadding(Edge.Bottom, 20); - root.setWidth(400); + root.setPadding(Edge.Left, 20); + root.setPadding(Edge.Right, 20); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Right, 20); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setMargin(Edge.Right, 20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setFlexDirection(FlexDirection.Row); - root_child1.setAlignContent(Align.Stretch); root_child1.setFlexWrap(Wrap.Wrap); - root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); + root_child1.setFlexGrow(1); + root_child1.setAlignContent(Align.Stretch); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); - root_child1_child0.setMargin(Edge.Right, 20); - root_child1_child0.setWidth(30); root_child1_child0.setHeight(30); + root_child1_child0.setWidth(30); + root_child1_child0.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child0, 0); const root_child1_child1 = Yoga.Node.create(config); - root_child1_child1.setMargin(Edge.Right, 20); - root_child1_child1.setWidth(30); root_child1_child1.setHeight(30); + root_child1_child1.setWidth(30); + root_child1_child1.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child1, 1); const root_child1_child2 = Yoga.Node.create(config); - root_child1_child2.setMargin(Edge.Right, 20); - root_child1_child2.setWidth(30); root_child1_child2.setHeight(30); + root_child1_child2.setWidth(30); + root_child1_child2.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child2, 2); const root_child1_child3 = Yoga.Node.create(config); - root_child1_child3.setMargin(Edge.Right, 20); - root_child1_child3.setWidth(30); root_child1_child3.setHeight(30); + root_child1_child3.setWidth(30); + root_child1_child3.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child3, 3); const root_child1_child4 = Yoga.Node.create(config); - root_child1_child4.setMargin(Edge.Right, 20); - root_child1_child4.setWidth(30); root_child1_child4.setHeight(30); + root_child1_child4.setWidth(30); + root_child1_child4.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child4, 4); const root_child2 = Yoga.Node.create(config); - root_child2.setMargin(Edge.Left, 20); - root_child2.setWidth(50); root_child2.setHeight(50); + root_child2.setWidth(50); + root_child2.setMargin(Edge.Left, 20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5350,62 +5279,62 @@ test('align_content_space_evenly_stretch_does_influence_line_box_dim', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 20); + root.setWidth(400); + root.setFlexDirection(FlexDirection.Row); root.setPadding(Edge.Top, 20); - root.setPadding(Edge.Right, 20); root.setPadding(Edge.Bottom, 20); - root.setWidth(400); + root.setPadding(Edge.Left, 20); + root.setPadding(Edge.Right, 20); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Right, 20); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setMargin(Edge.Right, 20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setFlexDirection(FlexDirection.Row); - root_child1.setAlignContent(Align.Stretch); root_child1.setFlexWrap(Wrap.Wrap); - root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); + root_child1.setFlexGrow(1); + root_child1.setAlignContent(Align.Stretch); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); - root_child1_child0.setMargin(Edge.Right, 20); - root_child1_child0.setWidth(30); root_child1_child0.setHeight(30); + root_child1_child0.setWidth(30); + root_child1_child0.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child0, 0); const root_child1_child1 = Yoga.Node.create(config); - root_child1_child1.setMargin(Edge.Right, 20); - root_child1_child1.setWidth(30); root_child1_child1.setHeight(30); + root_child1_child1.setWidth(30); + root_child1_child1.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child1, 1); const root_child1_child2 = Yoga.Node.create(config); - root_child1_child2.setMargin(Edge.Right, 20); - root_child1_child2.setWidth(30); root_child1_child2.setHeight(30); + root_child1_child2.setWidth(30); + root_child1_child2.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child2, 2); const root_child1_child3 = Yoga.Node.create(config); - root_child1_child3.setMargin(Edge.Right, 20); - root_child1_child3.setWidth(30); root_child1_child3.setHeight(30); + root_child1_child3.setWidth(30); + root_child1_child3.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child3, 3); const root_child1_child4 = Yoga.Node.create(config); - root_child1_child4.setMargin(Edge.Right, 20); - root_child1_child4.setWidth(30); root_child1_child4.setHeight(30); + root_child1_child4.setWidth(30); + root_child1_child4.setMargin(Edge.Right, 20); root_child1.insertChild(root_child1_child4, 4); const root_child2 = Yoga.Node.create(config); - root_child2.setMargin(Edge.Left, 20); - root_child2.setWidth(50); root_child2.setHeight(50); + root_child2.setWidth(50); + root_child2.setMargin(Edge.Left, 20); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5514,28 +5443,28 @@ test('align_content_stretch_and_align_items_flex_end_with_flex_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); - root.setAlignItems(Align.FlexEnd); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(300); root.setHeight(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Stretch); + root.setAlignItems(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.FlexStart); - root_child0.setWidth(150); root_child0.setHeight(50); + root_child0.setWidth(150); + root_child0.setAlignSelf(Align.FlexStart); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(120); root_child1.setHeight(100); + root_child1.setWidth(120); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(120); root_child2.setHeight(50); + root_child2.setWidth(120); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5594,28 +5523,28 @@ test('align_content_stretch_and_align_items_flex_start_with_flex_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(300); root.setHeight(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Stretch); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.FlexEnd); - root_child0.setWidth(150); root_child0.setHeight(50); + root_child0.setWidth(150); + root_child0.setAlignSelf(Align.FlexEnd); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(120); root_child1.setHeight(100); + root_child1.setWidth(120); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(120); root_child2.setHeight(50); + root_child2.setWidth(120); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5674,28 +5603,28 @@ test('align_content_stretch_and_align_items_center_with_flex_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(300); root.setHeight(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Stretch); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.FlexEnd); - root_child0.setWidth(150); root_child0.setHeight(50); + root_child0.setWidth(150); + root_child0.setAlignSelf(Align.FlexEnd); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(120); root_child1.setHeight(100); + root_child1.setWidth(120); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(120); root_child2.setHeight(50); + root_child2.setWidth(120); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5754,27 +5683,27 @@ test('align_content_stretch_and_align_items_stretch_with_flex_wrap', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(300); root.setHeight(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.FlexEnd); - root_child0.setWidth(150); root_child0.setHeight(50); + root_child0.setWidth(150); + root_child0.setAlignSelf(Align.FlexEnd); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(120); root_child1.setHeight(100); + root_child1.setWidth(120); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(120); root_child2.setHeight(50); + root_child2.setWidth(120); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGAlignItemsTest.test.ts b/javascript/tests/generated/YGAlignItemsTest.test.ts index ae4dc63585..dc0843cf01 100644 --- a/javascript/tests/generated/YGAlignItemsTest.test.ts +++ b/javascript/tests/generated/YGAlignItemsTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignItemsTest.html + * @generated SignedSource<<22a1901076af1af5f1c61dfc25d8a76d>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAlignItemsTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -78,14 +79,14 @@ test('align_items_center', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(10); root_child0.setHeight(10); + root_child0.setWidth(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -124,14 +125,14 @@ test('align_items_flex_start', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(10); root_child0.setHeight(10); + root_child0.setWidth(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -170,14 +171,14 @@ test('align_items_flex_end', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexEnd); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setAlignItems(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(10); root_child0.setHeight(10); + root_child0.setWidth(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -216,11 +217,11 @@ test('align_baseline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -278,11 +279,11 @@ test('align_baseline_child', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -355,11 +356,11 @@ test('align_baseline_child_multiline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -367,10 +368,10 @@ test('align_baseline_child_multiline', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexDirection(FlexDirection.Row); - root_child1.setFlexWrap(Wrap.Wrap); root_child1.setWidth(50); root_child1.setHeight(25); + root_child1.setFlexWrap(Wrap.Wrap); + root_child1.setFlexDirection(FlexDirection.Row); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); @@ -479,11 +480,11 @@ test('align_baseline_child_multiline_override', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -491,10 +492,10 @@ test('align_baseline_child_multiline_override', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexDirection(FlexDirection.Row); - root_child1.setFlexWrap(Wrap.Wrap); root_child1.setWidth(50); root_child1.setHeight(25); + root_child1.setFlexWrap(Wrap.Wrap); + root_child1.setFlexDirection(FlexDirection.Row); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); @@ -503,9 +504,9 @@ test('align_baseline_child_multiline_override', () => { root_child1.insertChild(root_child1_child0, 0); const root_child1_child1 = Yoga.Node.create(config); - root_child1_child1.setAlignSelf(Align.Baseline); root_child1_child1.setWidth(25); root_child1_child1.setHeight(10); + root_child1_child1.setAlignSelf(Align.Baseline); root_child1.insertChild(root_child1_child1, 1); const root_child1_child2 = Yoga.Node.create(config); @@ -514,9 +515,9 @@ test('align_baseline_child_multiline_override', () => { root_child1.insertChild(root_child1_child2, 2); const root_child1_child3 = Yoga.Node.create(config); - root_child1_child3.setAlignSelf(Align.Baseline); root_child1_child3.setWidth(25); root_child1_child3.setHeight(10); + root_child1_child3.setAlignSelf(Align.Baseline); root_child1.insertChild(root_child1_child3, 3); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -605,11 +606,11 @@ test('align_baseline_child_multiline_no_override_on_secondline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -617,10 +618,10 @@ test('align_baseline_child_multiline_no_override_on_secondline', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexDirection(FlexDirection.Row); - root_child1.setFlexWrap(Wrap.Wrap); root_child1.setWidth(50); root_child1.setHeight(25); + root_child1.setFlexWrap(Wrap.Wrap); + root_child1.setFlexDirection(FlexDirection.Row); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); @@ -639,9 +640,9 @@ test('align_baseline_child_multiline_no_override_on_secondline', () => { root_child1.insertChild(root_child1_child2, 2); const root_child1_child3 = Yoga.Node.create(config); - root_child1_child3.setAlignSelf(Align.Baseline); root_child1_child3.setWidth(25); root_child1_child3.setHeight(10); + root_child1_child3.setAlignSelf(Align.Baseline); root_child1.insertChild(root_child1_child3, 3); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -730,16 +731,16 @@ test('align_baseline_child_top', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); - root_child0.setPosition(Edge.Top, 10); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setPosition(Edge.Top, 10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -808,11 +809,11 @@ test('align_baseline_child_top2', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -820,9 +821,9 @@ test('align_baseline_child_top2', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setPosition(Edge.Top, 5); root_child1.setWidth(50); root_child1.setHeight(20); + root_child1.setPosition(Edge.Top, 5); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); @@ -886,11 +887,11 @@ test('align_baseline_double_nested_child', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -978,10 +979,10 @@ test('align_baseline_column', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1039,19 +1040,16 @@ test('align_baseline_child_margin', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 5); - root_child0.setMargin(Edge.Top, 5); - root_child0.setMargin(Edge.Right, 5); - root_child0.setMargin(Edge.Bottom, 5); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.All, 5); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1060,12 +1058,9 @@ test('align_baseline_child_margin', () => { root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); - root_child1_child0.setMargin(Edge.Left, 1); - root_child1_child0.setMargin(Edge.Top, 1); - root_child1_child0.setMargin(Edge.Right, 1); - root_child1_child0.setMargin(Edge.Bottom, 1); root_child1_child0.setWidth(50); root_child1_child0.setHeight(10); + root_child1_child0.setMargin(Edge.All, 1); root_child1.insertChild(root_child1_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1124,15 +1119,12 @@ test('align_baseline_child_padding', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 5); - root.setPadding(Edge.Top, 5); - root.setPadding(Edge.Right, 5); - root.setPadding(Edge.Bottom, 5); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 5); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1140,12 +1132,9 @@ test('align_baseline_child_padding', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setPadding(Edge.Left, 5); - root_child1.setPadding(Edge.Top, 5); - root_child1.setPadding(Edge.Right, 5); - root_child1.setPadding(Edge.Bottom, 5); root_child1.setWidth(50); root_child1.setHeight(20); + root_child1.setPadding(Edge.All, 5); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); @@ -1209,12 +1198,12 @@ test('align_baseline_multiline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1332,11 +1321,11 @@ test.skip('align_baseline_multiline_column', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); + root.setAlignItems(Align.Baseline); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1454,11 +1443,11 @@ test.skip('align_baseline_multiline_column2', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); + root.setAlignItems(Align.Baseline); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1576,12 +1565,12 @@ test('align_baseline_multiline_row_and_column', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Baseline); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Baseline); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1699,21 +1688,21 @@ test('align_items_center_child_with_margin_bigger_than_parent', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setWidth(52); root.setHeight(52); + root.setWidth(52); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.Center); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setMargin(Edge.Left, 10); - root_child0_child0.setMargin(Edge.Right, 10); root_child0_child0.setWidth(52); root_child0_child0.setHeight(52); + root_child0_child0.setMargin(Edge.Left, 10); + root_child0_child0.setMargin(Edge.Right, 10); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1762,21 +1751,21 @@ test('align_items_flex_end_child_with_margin_bigger_than_parent', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setWidth(52); root.setHeight(52); + root.setWidth(52); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.FlexEnd); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setMargin(Edge.Left, 10); - root_child0_child0.setMargin(Edge.Right, 10); root_child0_child0.setWidth(52); root_child0_child0.setHeight(52); + root_child0_child0.setMargin(Edge.Left, 10); + root_child0_child0.setMargin(Edge.Right, 10); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1825,11 +1814,11 @@ test('align_items_center_child_without_margin_bigger_than_parent', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setWidth(52); root.setHeight(52); + root.setWidth(52); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.Center); @@ -1886,11 +1875,11 @@ test('align_items_flex_end_child_without_margin_bigger_than_parent', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setWidth(52); root.setHeight(52); + root.setWidth(52); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.FlexEnd); @@ -1947,15 +1936,15 @@ test('align_center_should_size_based_on_content', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Top, 20); root.setWidth(100); root.setHeight(100); + root.setAlignItems(Align.Center); + root.setMargin(Edge.Top, 20); const root_child0 = Yoga.Node.create(config); - root_child0.setJustifyContent(Justify.Center); root_child0.setFlexShrink(1); + root_child0.setJustifyContent(Justify.Center); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2025,13 +2014,13 @@ test('align_stretch_should_size_based_on_parent', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Top, 20); root.setWidth(100); root.setHeight(100); + root.setMargin(Edge.Top, 20); const root_child0 = Yoga.Node.create(config); - root_child0.setJustifyContent(Justify.Center); root_child0.setFlexShrink(1); + root_child0.setJustifyContent(Justify.Center); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2101,8 +2090,8 @@ test('align_flex_start_with_shrinking_children', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(500); root.setHeight(500); + root.setWidth(500); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.FlexStart); @@ -2175,8 +2164,8 @@ test('align_flex_start_with_stretching_children', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(500); root.setHeight(500); + root.setWidth(500); const root_child0 = Yoga.Node.create(config); root.insertChild(root_child0, 0); @@ -2248,8 +2237,8 @@ test('align_flex_start_with_shrinking_children_with_stretch', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(500); root.setHeight(500); + root.setWidth(500); const root_child0 = Yoga.Node.create(config); root_child0.setAlignItems(Align.FlexStart); @@ -2321,17 +2310,17 @@ test('align_flex_end_with_row_reverse', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexEnd); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(75); + root.setAlignItems(Align.FlexEnd); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 3); - root_child0.setMargin(Edge.Right, 5); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Right, 5); + root_child0.setMargin(Edge.Left, 3); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -2386,15 +2375,15 @@ test('align_stretch_with_row_reverse', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(75); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 3); - root_child0.setMargin(Edge.Right, 5); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Right, 5); + root_child0.setMargin(Edge.Left, 3); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -2464,6 +2453,7 @@ test('align_items_non_stretch_s526008', () => { root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0_child0.setWidth(0); root_child0_child0_child0_child0.setHeight(10); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGAlignSelfTest.test.ts b/javascript/tests/generated/YGAlignSelfTest.test.ts index 5d2e49ecc9..5aba0fade2 100644 --- a/javascript/tests/generated/YGAlignSelfTest.test.ts +++ b/javascript/tests/generated/YGAlignSelfTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<1badc9ed5a0cb8d9a4a1b23653cfbe58>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignSelfTest.html + * @generated SignedSource<<27724b197eaccc74fd01d18c47c30454>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAlignSelfTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -39,9 +40,9 @@ test('align_self_center', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.Center); - root_child0.setWidth(10); root_child0.setHeight(10); + root_child0.setWidth(10); + root_child0.setAlignSelf(Align.Center); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -85,9 +86,9 @@ test('align_self_flex_end', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.FlexEnd); - root_child0.setWidth(10); root_child0.setHeight(10); + root_child0.setWidth(10); + root_child0.setAlignSelf(Align.FlexEnd); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -131,9 +132,9 @@ test('align_self_flex_start', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.FlexStart); - root_child0.setWidth(10); root_child0.setHeight(10); + root_child0.setWidth(10); + root_child0.setAlignSelf(Align.FlexStart); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -172,15 +173,15 @@ test('align_self_flex_end_override_flex_start', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.FlexEnd); - root_child0.setWidth(10); root_child0.setHeight(10); + root_child0.setWidth(10); + root_child0.setAlignSelf(Align.FlexEnd); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -219,21 +220,21 @@ test('align_self_baseline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setAlignSelf(Align.Baseline); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setAlignSelf(Align.Baseline); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setAlignSelf(Align.Baseline); root_child1.setWidth(50); root_child1.setHeight(20); + root_child1.setAlignSelf(Align.Baseline); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); diff --git a/javascript/tests/generated/YGAndroidNewsFeed.test.ts b/javascript/tests/generated/YGAndroidNewsFeed.test.ts index 488ed8d531..f9942f4171 100644 --- a/javascript/tests/generated/YGAndroidNewsFeed.test.ts +++ b/javascript/tests/generated/YGAndroidNewsFeed.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAndroidNewsFeed.html + * @generated SignedSource<<458488fd6da0ab944d90968e6d17d85c>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAndroidNewsFeed.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,8 +35,8 @@ test('android_news_feed', () => { try { root = Yoga.Node.create(config); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); + root.setAlignContent(Align.Stretch); root.setWidth(1080); const root_child0 = Yoga.Node.create(config); @@ -51,10 +52,10 @@ test('android_news_feed', () => { const root_child0_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0_child0.setFlexDirection(FlexDirection.Row); - root_child0_child0_child0_child0.setAlignContent(Align.Stretch); root_child0_child0_child0_child0.setAlignItems(Align.FlexStart); - root_child0_child0_child0_child0.setMargin(Edge.Start, 36); + root_child0_child0_child0_child0.setAlignContent(Align.Stretch); root_child0_child0_child0_child0.setMargin(Edge.Top, 24); + root_child0_child0_child0_child0.setMargin(Edge.Start, 36); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); const root_child0_child0_child0_child0_child0 = Yoga.Node.create(config); @@ -95,10 +96,10 @@ test('android_news_feed', () => { const root_child0_child0_child1_child0 = Yoga.Node.create(config); root_child0_child0_child1_child0.setFlexDirection(FlexDirection.Row); - root_child0_child0_child1_child0.setAlignContent(Align.Stretch); root_child0_child0_child1_child0.setAlignItems(Align.FlexStart); - root_child0_child0_child1_child0.setMargin(Edge.Start, 174); + root_child0_child0_child1_child0.setAlignContent(Align.Stretch); root_child0_child0_child1_child0.setMargin(Edge.Top, 24); + root_child0_child0_child1_child0.setMargin(Edge.Start, 174); root_child0_child0_child1.insertChild(root_child0_child0_child1_child0, 0); const root_child0_child0_child1_child0_child0 = Yoga.Node.create(config); diff --git a/javascript/tests/generated/YGAspectRatioTest.test.ts b/javascript/tests/generated/YGAspectRatioTest.test.ts index 69a7427809..91e862983f 100644 --- a/javascript/tests/generated/YGAspectRatioTest.test.ts +++ b/javascript/tests/generated/YGAspectRatioTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<57064c3213fc22e0637ae5768ce6fea5>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAspectRatioTest.html + * @generated SignedSource<<2612ef132d3a74dbf8a5f83e6bbfb305>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAspectRatioTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -39,10 +40,10 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { root.setHeight(300); const root_child0 = Yoga.Node.create(config); - root_child0.setOverflow(Overflow.Scroll); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); + root_child0.setOverflow(Overflow.Scroll); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -53,7 +54,7 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { root_child0_child0_child0.setFlexGrow(2); root_child0_child0_child0.setFlexShrink(1); root_child0_child0_child0.setFlexBasis("0%"); - root_child0_child0_child0.setAspectRatio(1 / 1); + root_child0_child0_child0.setAspectRatio(1); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); @@ -70,7 +71,7 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { root_child0_child0_child2_child0.setFlexGrow(1); root_child0_child0_child2_child0.setFlexShrink(1); root_child0_child0_child2_child0.setFlexBasis("0%"); - root_child0_child0_child2_child0.setAspectRatio(1 / 1); + root_child0_child0_child2_child0.setAspectRatio(1); root_child0_child0_child2.insertChild(root_child0_child0_child2_child0, 0); const root_child0_child0_child2_child0_child0 = Yoga.Node.create(config); @@ -81,7 +82,7 @@ test.skip('aspect_ratio_does_not_stretch_cross_axis_dim', () => { root_child0_child0_child2_child0_child1.setFlexGrow(1); root_child0_child0_child2_child0_child1.setFlexShrink(1); root_child0_child0_child2_child0_child1.setFlexBasis("0%"); - root_child0_child0_child2_child0_child1.setAspectRatio(1 / 1); + root_child0_child0_child2_child0_child1.setAspectRatio(1); root_child0_child0_child2_child0.insertChild(root_child0_child0_child2_child0_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -195,8 +196,8 @@ test('zero_aspect_ratio_behaves_like_auto', () => { root.setHeight(300); const root_child0 = Yoga.Node.create(config); + root_child0.setAspectRatio(0); root_child0.setWidth(50); - root_child0.setAspectRatio(0 / 1); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGAutoTest.test.ts b/javascript/tests/generated/YGAutoTest.test.ts index 5e9557dc0f..154f17482d 100644 --- a/javascript/tests/generated/YGAutoTest.test.ts +++ b/javascript/tests/generated/YGAutoTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<234cdb7f76ac586e034a5b6ca2033fa4>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAutoTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAutoTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,10 +35,10 @@ test('auto_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setWidth('auto'); + root.setWidth("auto"); root.setHeight(50); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -112,7 +113,7 @@ test('auto_height', () => { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); root.setWidth(50); - root.setHeight('auto'); + root.setHeight("auto"); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -187,6 +188,7 @@ test('auto_flex_basis', () => { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); root.setWidth(50); + root.setFlexBasis("auto"); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -264,9 +266,9 @@ test('auto_position', () => { root.setHeight(50); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionAuto(Edge.Right); root_child0.setWidth(25); root_child0.setHeight(25); + root_child0.setPositionAuto(Edge.Right); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -310,9 +312,9 @@ test('auto_margin', () => { root.setHeight(50); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 'auto'); root_child0.setWidth(25); root_child0.setHeight(25); + root_child0.setMargin(Edge.Left, "auto"); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGBorderTest.test.ts b/javascript/tests/generated/YGBorderTest.test.ts index ddbdd2aad1..4e4f50007d 100644 --- a/javascript/tests/generated/YGBorderTest.test.ts +++ b/javascript/tests/generated/YGBorderTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGBorderTest.html + * @generated SignedSource<<4505ba01efc52d9e00e59f26c85e1a4c>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGBorderTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -35,10 +36,7 @@ test('border_no_size', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); + root.setBorder(Edge.All, 10); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -67,10 +65,7 @@ test('border_container_match_child', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); + root.setBorder(Edge.All, 10); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -114,16 +109,13 @@ test('border_flex_child', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setBorder(Edge.All, 10); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setWidth(10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -163,12 +155,9 @@ test('border_stretch_child', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setBorder(Edge.All, 10); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -210,18 +199,18 @@ test('border_center_child', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); + root.setWidth(100); + root.setHeight(100); root.setBorder(Edge.Start, 10); root.setBorder(Edge.End, 20); root.setBorder(Edge.Bottom, 20); - root.setWidth(100); - root.setHeight(100); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(10); root_child0.setHeight(10); + root_child0.setWidth(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGBoxSizingTest.test.ts b/javascript/tests/generated/YGBoxSizingTest.test.ts index d967870518..b1ec284ccd 100644 --- a/javascript/tests/generated/YGBoxSizingTest.test.ts +++ b/javascript/tests/generated/YGBoxSizingTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGBoxSizingTest.html + * @generated SignedSource<<38edf690445155cbd291739b48167383>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGBoxSizingTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -35,16 +36,10 @@ test('box_sizing_content_box_simple', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 5); - root.setPadding(Edge.Top, 5); - root.setPadding(Edge.Right, 5); - root.setPadding(Edge.Bottom, 5); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 5); + root.setBorder(Edge.All, 10); root.setBoxSizing(BoxSizing.ContentBox); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -74,16 +69,10 @@ test('box_sizing_border_box_simple', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 5); - root.setPadding(Edge.Top, 5); - root.setPadding(Edge.Right, 5); - root.setPadding(Edge.Bottom, 5); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 5); + root.setBorder(Edge.All, 10); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -116,16 +105,10 @@ test('box_sizing_content_box_percent', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 4); - root_child0.setPadding(Edge.Top, 4); - root_child0.setPadding(Edge.Right, 4); - root_child0.setPadding(Edge.Bottom, 4); - root_child0.setBorder(Edge.Left, 16); - root_child0.setBorder(Edge.Top, 16); - root_child0.setBorder(Edge.Right, 16); - root_child0.setBorder(Edge.Bottom, 16); root_child0.setWidth("50%"); root_child0.setHeight("25%"); + root_child0.setPadding(Edge.All, 4); + root_child0.setBorder(Edge.All, 16); root_child0.setBoxSizing(BoxSizing.ContentBox); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -170,16 +153,10 @@ test('box_sizing_border_box_percent', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 4); - root_child0.setPadding(Edge.Top, 4); - root_child0.setPadding(Edge.Right, 4); - root_child0.setPadding(Edge.Bottom, 4); - root_child0.setBorder(Edge.Left, 16); - root_child0.setBorder(Edge.Top, 16); - root_child0.setBorder(Edge.Right, 16); - root_child0.setBorder(Edge.Bottom, 16); root_child0.setWidth("50%"); root_child0.setHeight("25%"); + root_child0.setPadding(Edge.All, 4); + root_child0.setBorder(Edge.All, 16); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -223,17 +200,11 @@ test('box_sizing_content_box_absolute', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionType(PositionType.Absolute); - root_child0.setPadding(Edge.Left, 12); - root_child0.setPadding(Edge.Top, 12); - root_child0.setPadding(Edge.Right, 12); - root_child0.setPadding(Edge.Bottom, 12); - root_child0.setBorder(Edge.Left, 8); - root_child0.setBorder(Edge.Top, 8); - root_child0.setBorder(Edge.Right, 8); - root_child0.setBorder(Edge.Bottom, 8); root_child0.setHeight("25%"); + root_child0.setPadding(Edge.All, 12); + root_child0.setBorder(Edge.All, 8); root_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0.setPositionType(PositionType.Absolute); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -277,16 +248,10 @@ test('box_sizing_border_box_absolute', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionType(PositionType.Absolute); - root_child0.setPadding(Edge.Left, 12); - root_child0.setPadding(Edge.Top, 12); - root_child0.setPadding(Edge.Right, 12); - root_child0.setPadding(Edge.Bottom, 12); - root_child0.setBorder(Edge.Left, 8); - root_child0.setBorder(Edge.Top, 8); - root_child0.setBorder(Edge.Right, 8); - root_child0.setBorder(Edge.Bottom, 8); root_child0.setHeight("25%"); + root_child0.setPadding(Edge.All, 12); + root_child0.setBorder(Edge.All, 8); + root_child0.setPositionType(PositionType.Absolute); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -326,16 +291,10 @@ test('box_sizing_content_box_comtaining_block', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 12); - root.setPadding(Edge.Top, 12); - root.setPadding(Edge.Right, 12); - root.setPadding(Edge.Bottom, 12); - root.setBorder(Edge.Left, 8); - root.setBorder(Edge.Top, 8); - root.setBorder(Edge.Right, 8); - root.setBorder(Edge.Bottom, 8); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 12); + root.setBorder(Edge.All, 8); root.setBoxSizing(BoxSizing.ContentBox); const root_child0 = Yoga.Node.create(config); @@ -343,9 +302,9 @@ test('box_sizing_content_box_comtaining_block', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.setWidth(50); root_child0_child0.setHeight("25%"); + root_child0_child0.setPositionType(PositionType.Absolute); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -395,25 +354,19 @@ test('box_sizing_border_box_comtaining_block', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 12); - root.setPadding(Edge.Top, 12); - root.setPadding(Edge.Right, 12); - root.setPadding(Edge.Bottom, 12); - root.setBorder(Edge.Left, 8); - root.setBorder(Edge.Top, 8); - root.setBorder(Edge.Right, 8); - root.setBorder(Edge.Bottom, 8); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 12); + root.setBorder(Edge.All, 8); const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Static); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.setWidth(50); root_child0_child0.setHeight("25%"); + root_child0_child0.setPositionType(PositionType.Absolute); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -463,12 +416,9 @@ test('box_sizing_content_box_padding_only', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 5); - root.setPadding(Edge.Top, 5); - root.setPadding(Edge.Right, 5); - root.setPadding(Edge.Bottom, 5); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 5); root.setBoxSizing(BoxSizing.ContentBox); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -502,12 +452,9 @@ test('box_sizing_content_box_padding_only_percent', () => { root.setHeight(150); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, "10%"); - root_child0.setPadding(Edge.Top, "10%"); - root_child0.setPadding(Edge.Right, "10%"); - root_child0.setPadding(Edge.Bottom, "10%"); root_child0.setWidth(50); root_child0.setHeight(75); + root_child0.setPadding(Edge.All, "10%"); root_child0.setBoxSizing(BoxSizing.ContentBox); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -548,12 +495,9 @@ test('box_sizing_border_box_padding_only', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 5); - root.setPadding(Edge.Top, 5); - root.setPadding(Edge.Right, 5); - root.setPadding(Edge.Bottom, 5); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 5); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -586,12 +530,9 @@ test('box_sizing_border_box_padding_only_percent', () => { root.setHeight(150); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, "10%"); - root_child0.setPadding(Edge.Top, "10%"); - root_child0.setPadding(Edge.Right, "10%"); - root_child0.setPadding(Edge.Bottom, "10%"); root_child0.setWidth(50); root_child0.setHeight(75); + root_child0.setPadding(Edge.All, "10%"); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -631,12 +572,9 @@ test('box_sizing_content_box_border_only', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setBorder(Edge.All, 10); root.setBoxSizing(BoxSizing.ContentBox); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -711,12 +649,9 @@ test('box_sizing_border_box_border_only', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setBorder(Edge.All, 10); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -850,16 +785,10 @@ test('box_sizing_content_box_children', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 5); - root.setPadding(Edge.Top, 5); - root.setPadding(Edge.Right, 5); - root.setPadding(Edge.Bottom, 5); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 5); + root.setBorder(Edge.All, 10); root.setBoxSizing(BoxSizing.ContentBox); const root_child0 = Yoga.Node.create(config); @@ -949,16 +878,10 @@ test('box_sizing_border_box_children', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 5); - root.setPadding(Edge.Top, 5); - root.setPadding(Edge.Right, 5); - root.setPadding(Edge.Bottom, 5); - root.setBorder(Edge.Left, 10); - root.setBorder(Edge.Top, 10); - root.setBorder(Edge.Right, 10); - root.setBorder(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 5); + root.setBorder(Edge.All, 10); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(25); @@ -1056,17 +979,11 @@ test('box_sizing_content_box_siblings', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setPadding(Edge.Left, 10); - root_child1.setPadding(Edge.Top, 10); - root_child1.setPadding(Edge.Right, 10); - root_child1.setPadding(Edge.Bottom, 10); - root_child1.setBorder(Edge.Left, 10); - root_child1.setBorder(Edge.Top, 10); - root_child1.setBorder(Edge.Right, 10); - root_child1.setBorder(Edge.Bottom, 10); root_child1.setWidth(25); root_child1.setHeight(25); root_child1.setBoxSizing(BoxSizing.ContentBox); + root_child1.setPadding(Edge.All, 10); + root_child1.setBorder(Edge.All, 10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -1155,16 +1072,10 @@ test('box_sizing_border_box_siblings', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setPadding(Edge.Left, 10); - root_child1.setPadding(Edge.Top, 10); - root_child1.setPadding(Edge.Right, 10); - root_child1.setPadding(Edge.Bottom, 10); - root_child1.setBorder(Edge.Left, 10); - root_child1.setBorder(Edge.Top, 10); - root_child1.setBorder(Edge.Right, 10); - root_child1.setBorder(Edge.Bottom, 10); root_child1.setWidth(25); root_child1.setHeight(25); + root_child1.setPadding(Edge.All, 10); + root_child1.setBorder(Edge.All, 10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -1248,17 +1159,11 @@ test('box_sizing_content_box_max_width', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 15); - root_child0.setBorder(Edge.Top, 15); - root_child0.setBorder(Edge.Right, 15); - root_child0.setBorder(Edge.Bottom, 15); root_child0.setMaxWidth(50); root_child0.setHeight(25); root_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 15); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1317,16 +1222,10 @@ test('box_sizing_border_box_max_width', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 15); - root_child0.setBorder(Edge.Top, 15); - root_child0.setBorder(Edge.Right, 15); - root_child0.setBorder(Edge.Bottom, 15); root_child0.setMaxWidth(50); root_child0.setHeight(25); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 15); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1385,17 +1284,11 @@ test('box_sizing_content_box_max_height', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 15); - root_child0.setBorder(Edge.Top, 15); - root_child0.setBorder(Edge.Right, 15); - root_child0.setBorder(Edge.Bottom, 15); root_child0.setWidth(50); root_child0.setMaxHeight(50); root_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 15); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1454,16 +1347,10 @@ test('box_sizing_border_box_max_height', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 15); - root_child0.setBorder(Edge.Top, 15); - root_child0.setBorder(Edge.Right, 15); - root_child0.setBorder(Edge.Bottom, 15); root_child0.setWidth(50); root_child0.setMaxHeight(50); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 15); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1522,17 +1409,11 @@ test('box_sizing_content_box_min_width', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 15); - root_child0.setBorder(Edge.Top, 15); - root_child0.setBorder(Edge.Right, 15); - root_child0.setBorder(Edge.Bottom, 15); root_child0.setMinWidth(50); root_child0.setHeight(25); root_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 15); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1591,16 +1472,10 @@ test('box_sizing_border_box_min_width', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 15); - root_child0.setBorder(Edge.Top, 15); - root_child0.setBorder(Edge.Right, 15); - root_child0.setBorder(Edge.Bottom, 15); root_child0.setMinWidth(50); root_child0.setHeight(25); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 15); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1659,17 +1534,11 @@ test('box_sizing_content_box_min_height', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 15); - root_child0.setBorder(Edge.Top, 15); - root_child0.setBorder(Edge.Right, 15); - root_child0.setBorder(Edge.Bottom, 15); root_child0.setWidth(50); root_child0.setMinHeight(50); root_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 15); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1728,16 +1597,10 @@ test('box_sizing_border_box_min_height', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 15); - root_child0.setBorder(Edge.Top, 15); - root_child0.setBorder(Edge.Right, 15); - root_child0.setBorder(Edge.Bottom, 15); root_child0.setWidth(50); root_child0.setMinHeight(50); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 15); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1796,15 +1659,9 @@ test('box_sizing_content_box_no_height_no_width', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 2); - root_child0.setPadding(Edge.Right, 2); - root_child0.setPadding(Edge.Bottom, 2); - root_child0.setBorder(Edge.Left, 7); - root_child0.setBorder(Edge.Top, 7); - root_child0.setBorder(Edge.Right, 7); - root_child0.setBorder(Edge.Bottom, 7); root_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0.setPadding(Edge.All, 2); + root_child0.setBorder(Edge.All, 7); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1848,14 +1705,8 @@ test('box_sizing_border_box_no_height_no_width', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 2); - root_child0.setPadding(Edge.Right, 2); - root_child0.setPadding(Edge.Bottom, 2); - root_child0.setBorder(Edge.Left, 7); - root_child0.setBorder(Edge.Top, 7); - root_child0.setBorder(Edge.Right, 7); - root_child0.setBorder(Edge.Bottom, 7); + root_child0.setPadding(Edge.All, 2); + root_child0.setBorder(Edge.All, 7); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1895,44 +1746,26 @@ test('box_sizing_content_box_nested', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 15); - root.setPadding(Edge.Top, 15); - root.setPadding(Edge.Right, 15); - root.setPadding(Edge.Bottom, 15); - root.setBorder(Edge.Left, 3); - root.setBorder(Edge.Top, 3); - root.setBorder(Edge.Right, 3); - root.setBorder(Edge.Bottom, 3); root.setWidth(100); root.setHeight(100); root.setBoxSizing(BoxSizing.ContentBox); + root.setPadding(Edge.All, 15); + root.setBorder(Edge.All, 3); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 2); - root_child0.setPadding(Edge.Right, 2); - root_child0.setPadding(Edge.Bottom, 2); - root_child0.setBorder(Edge.Left, 7); - root_child0.setBorder(Edge.Top, 7); - root_child0.setBorder(Edge.Right, 7); - root_child0.setBorder(Edge.Bottom, 7); root_child0.setWidth(20); root_child0.setHeight(20); root_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0.setPadding(Edge.All, 2); + root_child0.setBorder(Edge.All, 7); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 1); - root_child0_child0.setPadding(Edge.Right, 1); - root_child0_child0.setPadding(Edge.Bottom, 1); - root_child0_child0.setBorder(Edge.Left, 2); - root_child0_child0.setBorder(Edge.Top, 2); - root_child0_child0.setBorder(Edge.Right, 2); - root_child0_child0.setBorder(Edge.Bottom, 2); root_child0_child0.setWidth(10); root_child0_child0.setHeight(5); root_child0_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0_child0.setPadding(Edge.All, 1); + root_child0_child0.setBorder(Edge.All, 2); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1982,41 +1815,23 @@ test('box_sizing_border_box_nested', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 15); - root.setPadding(Edge.Top, 15); - root.setPadding(Edge.Right, 15); - root.setPadding(Edge.Bottom, 15); - root.setBorder(Edge.Left, 3); - root.setBorder(Edge.Top, 3); - root.setBorder(Edge.Right, 3); - root.setBorder(Edge.Bottom, 3); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 15); + root.setBorder(Edge.All, 3); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 2); - root_child0.setPadding(Edge.Right, 2); - root_child0.setPadding(Edge.Bottom, 2); - root_child0.setBorder(Edge.Left, 7); - root_child0.setBorder(Edge.Top, 7); - root_child0.setBorder(Edge.Right, 7); - root_child0.setBorder(Edge.Bottom, 7); root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setPadding(Edge.All, 2); + root_child0.setBorder(Edge.All, 7); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 1); - root_child0_child0.setPadding(Edge.Right, 1); - root_child0_child0.setPadding(Edge.Bottom, 1); - root_child0_child0.setBorder(Edge.Left, 2); - root_child0_child0.setBorder(Edge.Top, 2); - root_child0_child0.setBorder(Edge.Right, 2); - root_child0_child0.setBorder(Edge.Bottom, 2); root_child0_child0.setWidth(10); root_child0_child0.setHeight(5); + root_child0_child0.setPadding(Edge.All, 1); + root_child0_child0.setBorder(Edge.All, 2); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2066,56 +1881,32 @@ test('box_sizing_content_box_nested_alternating', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 3); - root.setPadding(Edge.Top, 3); - root.setPadding(Edge.Right, 3); - root.setPadding(Edge.Bottom, 3); - root.setBorder(Edge.Left, 2); - root.setBorder(Edge.Top, 2); - root.setBorder(Edge.Right, 2); - root.setBorder(Edge.Bottom, 2); root.setWidth(100); root.setHeight(100); root.setBoxSizing(BoxSizing.ContentBox); + root.setPadding(Edge.All, 3); + root.setBorder(Edge.All, 2); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 8); - root_child0.setPadding(Edge.Top, 8); - root_child0.setPadding(Edge.Right, 8); - root_child0.setPadding(Edge.Bottom, 8); - root_child0.setBorder(Edge.Left, 2); - root_child0.setBorder(Edge.Top, 2); - root_child0.setBorder(Edge.Right, 2); - root_child0.setBorder(Edge.Bottom, 2); root_child0.setWidth(40); root_child0.setHeight(40); + root_child0.setPadding(Edge.All, 8); + root_child0.setBorder(Edge.All, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPadding(Edge.Left, 3); - root_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0.setPadding(Edge.Right, 3); - root_child0_child0.setPadding(Edge.Bottom, 3); - root_child0_child0.setBorder(Edge.Left, 6); - root_child0_child0.setBorder(Edge.Top, 6); - root_child0_child0.setBorder(Edge.Right, 6); - root_child0_child0.setBorder(Edge.Bottom, 6); root_child0_child0.setWidth(20); root_child0_child0.setHeight(25); root_child0_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0_child0.setPadding(Edge.All, 3); + root_child0_child0.setBorder(Edge.All, 6); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0_child0.setPadding(Edge.Top, 1); - root_child0_child0_child0.setPadding(Edge.Right, 1); - root_child0_child0_child0.setPadding(Edge.Bottom, 1); - root_child0_child0_child0.setBorder(Edge.Left, 1); - root_child0_child0_child0.setBorder(Edge.Top, 1); - root_child0_child0_child0.setBorder(Edge.Right, 1); - root_child0_child0_child0.setBorder(Edge.Bottom, 1); root_child0_child0_child0.setWidth(10); root_child0_child0_child0.setHeight(5); + root_child0_child0_child0.setPadding(Edge.All, 1); + root_child0_child0_child0.setBorder(Edge.All, 1); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2175,56 +1966,32 @@ test('box_sizing_border_box_nested_alternating', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 3); - root.setPadding(Edge.Top, 3); - root.setPadding(Edge.Right, 3); - root.setPadding(Edge.Bottom, 3); - root.setBorder(Edge.Left, 2); - root.setBorder(Edge.Top, 2); - root.setBorder(Edge.Right, 2); - root.setBorder(Edge.Bottom, 2); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 3); + root.setBorder(Edge.All, 2); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 8); - root_child0.setPadding(Edge.Top, 8); - root_child0.setPadding(Edge.Right, 8); - root_child0.setPadding(Edge.Bottom, 8); - root_child0.setBorder(Edge.Left, 2); - root_child0.setBorder(Edge.Top, 2); - root_child0.setBorder(Edge.Right, 2); - root_child0.setBorder(Edge.Bottom, 2); root_child0.setWidth(40); root_child0.setHeight(40); root_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0.setPadding(Edge.All, 8); + root_child0.setBorder(Edge.All, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPadding(Edge.Left, 3); - root_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0.setPadding(Edge.Right, 3); - root_child0_child0.setPadding(Edge.Bottom, 3); - root_child0_child0.setBorder(Edge.Left, 6); - root_child0_child0.setBorder(Edge.Top, 6); - root_child0_child0.setBorder(Edge.Right, 6); - root_child0_child0.setBorder(Edge.Bottom, 6); root_child0_child0.setWidth(20); root_child0_child0.setHeight(25); + root_child0_child0.setPadding(Edge.All, 3); + root_child0_child0.setBorder(Edge.All, 6); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0_child0.setPadding(Edge.Top, 1); - root_child0_child0_child0.setPadding(Edge.Right, 1); - root_child0_child0_child0.setPadding(Edge.Bottom, 1); - root_child0_child0_child0.setBorder(Edge.Left, 1); - root_child0_child0_child0.setBorder(Edge.Top, 1); - root_child0_child0_child0.setBorder(Edge.Right, 1); - root_child0_child0_child0.setBorder(Edge.Bottom, 1); root_child0_child0_child0.setWidth(10); root_child0_child0_child0.setHeight(5); root_child0_child0_child0.setBoxSizing(BoxSizing.ContentBox); + root_child0_child0_child0.setPadding(Edge.All, 1); + root_child0_child0_child0.setBorder(Edge.All, 1); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2283,22 +2050,16 @@ test.skip('box_sizing_content_box_flex_basis_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexBasis(50); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 10); - root_child0.setBorder(Edge.Top, 10); - root_child0.setBorder(Edge.Right, 10); - root_child0.setBorder(Edge.Bottom, 10); root_child0.setHeight(25); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 10); root_child0.setBoxSizing(BoxSizing.ContentBox); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2338,22 +2099,16 @@ test('box_sizing_border_box_flex_basis_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexBasis(50); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 10); - root_child0.setBorder(Edge.Top, 10); - root_child0.setBorder(Edge.Right, 10); - root_child0.setBorder(Edge.Bottom, 10); root_child0.setHeight(25); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2398,15 +2153,9 @@ test.skip('box_sizing_content_box_flex_basis_column', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexBasis(50); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 10); - root_child0.setBorder(Edge.Top, 10); - root_child0.setBorder(Edge.Right, 10); - root_child0.setBorder(Edge.Bottom, 10); root_child0.setHeight(25); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 10); root_child0.setBoxSizing(BoxSizing.ContentBox); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2452,15 +2201,9 @@ test('box_sizing_border_box_flex_basis_column', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexBasis(50); - root_child0.setPadding(Edge.Left, 5); - root_child0.setPadding(Edge.Top, 5); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 5); - root_child0.setBorder(Edge.Left, 10); - root_child0.setBorder(Edge.Top, 10); - root_child0.setBorder(Edge.Right, 10); - root_child0.setBorder(Edge.Bottom, 10); root_child0.setHeight(25); + root_child0.setPadding(Edge.All, 5); + root_child0.setBorder(Edge.All, 10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2500,9 +2243,9 @@ test('box_sizing_content_box_padding_start', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Start, 5); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.Start, 5); root.setBoxSizing(BoxSizing.ContentBox); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2532,9 +2275,9 @@ test('box_sizing_border_box_padding_start', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Start, 5); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.Start, 5); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -2563,9 +2306,9 @@ test('box_sizing_content_box_padding_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.End, 5); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.End, 5); root.setBoxSizing(BoxSizing.ContentBox); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2595,9 +2338,9 @@ test('box_sizing_border_box_padding_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.End, 5); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.End, 5); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -2626,9 +2369,9 @@ test('box_sizing_content_box_border_start', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Start, 5); root.setWidth(100); root.setHeight(100); + root.setBorder(Edge.Start, 5); root.setBoxSizing(BoxSizing.ContentBox); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2658,9 +2401,9 @@ test('box_sizing_border_box_border_start', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Start, 5); root.setWidth(100); root.setHeight(100); + root.setBorder(Edge.Start, 5); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -2689,9 +2432,9 @@ test('box_sizing_content_box_border_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.End, 5); root.setWidth(100); root.setHeight(100); + root.setBorder(Edge.End, 5); root.setBoxSizing(BoxSizing.ContentBox); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2721,9 +2464,9 @@ test('box_sizing_border_box_border_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.End, 5); root.setWidth(100); root.setHeight(100); + root.setBorder(Edge.End, 5); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); diff --git a/javascript/tests/generated/YGDimensionTest.test.ts b/javascript/tests/generated/YGDimensionTest.test.ts index 39c140df0e..0d6e435e89 100644 --- a/javascript/tests/generated/YGDimensionTest.test.ts +++ b/javascript/tests/generated/YGDimensionTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<719c8f3b9fea672881a47f593f4aabd0>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGDimensionTest.html + * @generated SignedSource<<843251bb9a4e870102ebaaab51a331ff>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGDimensionTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, diff --git a/javascript/tests/generated/YGDisplayTest.test.ts b/javascript/tests/generated/YGDisplayTest.test.ts index 9c6cd8d773..5baeeae609 100644 --- a/javascript/tests/generated/YGDisplayTest.test.ts +++ b/javascript/tests/generated/YGDisplayTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGDisplayTest.html + * @generated SignedSource<<6a692b354eec4eb352ee7d7764b9b5d3>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGDisplayTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,10 +35,10 @@ test('display_none', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -94,10 +95,10 @@ test('display_none_fixed_size', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -155,19 +156,16 @@ test('display_none_with_margin', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 10); - root_child0.setMargin(Edge.Top, 10); - root_child0.setMargin(Edge.Right, 10); - root_child0.setMargin(Edge.Bottom, 10); root_child0.setWidth(20); root_child0.setHeight(20); root_child0.setDisplay(Display.None); + root_child0.setMargin(Edge.All, 10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -220,10 +218,10 @@ test('display_none_with_child', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -317,10 +315,10 @@ test('display_none_with_position', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -328,8 +326,8 @@ test('display_none_with_position', () => { const root_child1 = Yoga.Node.create(config); root_child1.setFlexGrow(1); - root_child1.setPosition(Edge.Top, 10); root_child1.setDisplay(Display.None); + root_child1.setPosition(Edge.Top, 10); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -383,10 +381,10 @@ test('display_none_with_position_absolute', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); + root_child0.setDisplay(Display.None); root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth(100); root_child0.setHeight(100); - root_child0.setDisplay(Display.None); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -425,10 +423,10 @@ test('display_contents', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setDisplay(Display.Contents); @@ -504,15 +502,15 @@ test('display_contents_fixed_size', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); + root_child0.setDisplay(Display.Contents); root_child0.setWidth(50); root_child0.setHeight(50); - root_child0.setDisplay(Display.Contents); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -585,19 +583,16 @@ test('display_contents_with_margin', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 10); - root_child0.setMargin(Edge.Top, 10); - root_child0.setMargin(Edge.Right, 10); - root_child0.setMargin(Edge.Bottom, 10); root_child0.setWidth(20); root_child0.setHeight(20); root_child0.setDisplay(Display.Contents); + root_child0.setMargin(Edge.All, 10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -650,17 +645,14 @@ test('display_contents_with_padding', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 10); - root_child0.setPadding(Edge.Top, 10); - root_child0.setPadding(Edge.Right, 10); - root_child0.setPadding(Edge.Bottom, 10); root_child0.setDisplay(Display.Contents); + root_child0.setPadding(Edge.All, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -733,14 +725,14 @@ test('display_contents_with_position', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setPosition(Edge.Top, 10); root_child0.setDisplay(Display.Contents); + root_child0.setPosition(Edge.Top, 10); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -813,16 +805,16 @@ test('display_contents_with_position_absolute', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); + root_child0.setDisplay(Display.Contents); root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth(50); root_child0.setHeight(50); - root_child0.setDisplay(Display.Contents); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -895,10 +887,10 @@ test('display_contents_nested', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setDisplay(Display.Contents); @@ -988,10 +980,10 @@ test('display_contents_with_siblings', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); diff --git a/javascript/tests/generated/YGFlexDirectionTest.test.ts b/javascript/tests/generated/YGFlexDirectionTest.test.ts index 2999befc5e..e011d7cefd 100644 --- a/javascript/tests/generated/YGFlexDirectionTest.test.ts +++ b/javascript/tests/generated/YGFlexDirectionTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<285a0c9dd4b646e7b1af77658fc41d99>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexDirectionTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGFlexDirectionTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -105,9 +106,9 @@ test('flex_direction_row_no_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -178,8 +179,8 @@ test('flex_direction_column', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -249,10 +250,10 @@ test('flex_direction_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -322,10 +323,10 @@ test('flex_direction_column_reverse', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.ColumnReverse); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.ColumnReverse); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -395,10 +396,10 @@ test('flex_direction_row_reverse', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -468,11 +469,11 @@ test('flex_direction_row_reverse_margin_left', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Left, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setMargin(Edge.Left, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -542,11 +543,11 @@ test('flex_direction_row_reverse_margin_start', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Start, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setMargin(Edge.Start, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -616,11 +617,11 @@ test('flex_direction_row_reverse_margin_right', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Right, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setMargin(Edge.Right, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -690,11 +691,11 @@ test('flex_direction_row_reverse_margin_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.End, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setMargin(Edge.End, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -764,11 +765,11 @@ test('flex_direction_column_reverse_margin_top', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.ColumnReverse); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Top, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.ColumnReverse); + root.setMargin(Edge.Top, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -838,11 +839,11 @@ test('flex_direction_column_reverse_margin_bottom', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.ColumnReverse); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Bottom, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.ColumnReverse); + root.setMargin(Edge.Bottom, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -912,11 +913,11 @@ test('flex_direction_row_reverse_padding_left', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setPadding(Edge.Left, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -986,11 +987,11 @@ test('flex_direction_row_reverse_padding_start', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Start, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setPadding(Edge.Start, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1060,11 +1061,11 @@ test('flex_direction_row_reverse_padding_right', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Right, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setPadding(Edge.Right, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1134,11 +1135,11 @@ test('flex_direction_row_reverse_padding_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.End, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setPadding(Edge.End, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1208,11 +1209,11 @@ test('flex_direction_column_reverse_padding_top', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.ColumnReverse); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Top, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.ColumnReverse); + root.setPadding(Edge.Top, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1282,11 +1283,11 @@ test('flex_direction_column_reverse_padding_bottom', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.ColumnReverse); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Bottom, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.ColumnReverse); + root.setPadding(Edge.Bottom, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1356,11 +1357,11 @@ test('flex_direction_row_reverse_border_left', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Left, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setBorder(Edge.Left, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1430,11 +1431,11 @@ test('flex_direction_row_reverse_border_start', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Start, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setBorder(Edge.Start, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1504,11 +1505,11 @@ test('flex_direction_row_reverse_border_right', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Right, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setBorder(Edge.Right, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1578,11 +1579,11 @@ test('flex_direction_row_reverse_border_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.End, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.RowReverse); + root.setBorder(Edge.End, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1652,11 +1653,11 @@ test('flex_direction_column_reverse_border_top', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.ColumnReverse); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Top, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.ColumnReverse); + root.setBorder(Edge.Top, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1726,11 +1727,11 @@ test('flex_direction_column_reverse_border_bottom', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.ColumnReverse); root.setPositionType(PositionType.Absolute); - root.setBorder(Edge.Bottom, 100); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); + root.setFlexDirection(FlexDirection.ColumnReverse); + root.setBorder(Edge.Bottom, 100); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -1801,14 +1802,14 @@ test('flex_direction_row_reverse_pos_left', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(100); + root_child0.setWidth(100); root_child0.setFlexDirection(FlexDirection.RowReverse); root_child0.setPosition(Edge.Left, 100); - root_child0.setWidth(100); - root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1890,14 +1891,14 @@ test('flex_direction_row_reverse_pos_start', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(100); + root_child0.setWidth(100); root_child0.setFlexDirection(FlexDirection.RowReverse); root_child0.setPosition(Edge.Start, 100); - root_child0.setWidth(100); - root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1979,14 +1980,14 @@ test('flex_direction_row_reverse_pos_right', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(100); + root_child0.setWidth(100); root_child0.setFlexDirection(FlexDirection.RowReverse); root_child0.setPosition(Edge.Right, 100); - root_child0.setWidth(100); - root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2068,14 +2069,14 @@ test('flex_direction_row_reverse_pos_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(100); + root_child0.setWidth(100); root_child0.setFlexDirection(FlexDirection.RowReverse); root_child0.setPosition(Edge.End, 100); - root_child0.setWidth(100); - root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2157,14 +2158,14 @@ test('flex_direction_column_reverse_pos_top', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(100); + root_child0.setWidth(100); root_child0.setFlexDirection(FlexDirection.ColumnReverse); root_child0.setPosition(Edge.Top, 100); - root_child0.setWidth(100); - root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2246,14 +2247,14 @@ test('flex_direction_column_reverse_pos_bottom', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(100); + root_child0.setWidth(100); root_child0.setFlexDirection(FlexDirection.ColumnReverse); root_child0.setPosition(Edge.Bottom, 100); - root_child0.setWidth(100); - root_child0.setHeight(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2335,20 +2336,20 @@ test('flex_direction_row_reverse_inner_pos_left', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPosition(Edge.Left, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPosition(Edge.Left, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -2426,20 +2427,20 @@ test('flex_direction_row_reverse_inner_pos_right', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPosition(Edge.Right, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPosition(Edge.Right, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -2517,20 +2518,20 @@ test('flex_direction_col_reverse_inner_pos_top', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPosition(Edge.Top, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPosition(Edge.Top, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -2608,20 +2609,20 @@ test('flex_direction_col_reverse_inner_pos_bottom', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPosition(Edge.Bottom, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPosition(Edge.Bottom, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -2699,20 +2700,20 @@ test.skip('flex_direction_row_reverse_inner_pos_start', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPosition(Edge.Start, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPosition(Edge.Start, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -2790,20 +2791,20 @@ test.skip('flex_direction_row_reverse_inner_pos_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPosition(Edge.End, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPosition(Edge.End, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -2881,20 +2882,20 @@ test('flex_direction_row_reverse_inner_margin_left', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setMargin(Edge.Left, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setMargin(Edge.Left, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -2972,20 +2973,20 @@ test('flex_direction_row_reverse_inner_margin_right', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setMargin(Edge.Right, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setMargin(Edge.Right, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3063,20 +3064,20 @@ test('flex_direction_col_reverse_inner_margin_top', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setMargin(Edge.Top, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setMargin(Edge.Top, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3154,20 +3155,20 @@ test('flex_direction_col_reverse_inner_margin_bottom', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setMargin(Edge.Bottom, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setMargin(Edge.Bottom, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3245,20 +3246,20 @@ test('flex_direction_row_reverse_inner_marign_start', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setMargin(Edge.Start, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setMargin(Edge.Start, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3336,20 +3337,20 @@ test('flex_direction_row_reverse_inner_margin_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setMargin(Edge.End, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setMargin(Edge.End, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3427,20 +3428,20 @@ test('flex_direction_row_reverse_inner_border_left', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setBorder(Edge.Left, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setBorder(Edge.Left, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3518,20 +3519,20 @@ test('flex_direction_row_reverse_inner_border_right', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setBorder(Edge.Right, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setBorder(Edge.Right, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3609,20 +3610,20 @@ test('flex_direction_col_reverse_inner_border_top', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setBorder(Edge.Top, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3700,20 +3701,20 @@ test('flex_direction_col_reverse_inner_border_bottom', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setBorder(Edge.Bottom, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setBorder(Edge.Bottom, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3791,20 +3792,20 @@ test('flex_direction_row_reverse_inner_border_start', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setBorder(Edge.Left, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setBorder(Edge.Start, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3882,20 +3883,20 @@ test('flex_direction_row_reverse_inner_border_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setBorder(Edge.Right, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setBorder(Edge.End, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -3973,20 +3974,20 @@ test('flex_direction_row_reverse_inner_padding_left', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPadding(Edge.Left, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPadding(Edge.Left, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -4064,20 +4065,20 @@ test('flex_direction_row_reverse_inner_padding_right', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPadding(Edge.Right, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPadding(Edge.Right, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -4155,20 +4156,20 @@ test('flex_direction_col_reverse_inner_padding_top', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPadding(Edge.Top, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPadding(Edge.Top, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -4246,20 +4247,20 @@ test('flex_direction_col_reverse_inner_padding_bottom', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPadding(Edge.Bottom, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPadding(Edge.Bottom, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -4337,20 +4338,20 @@ test('flex_direction_row_reverse_inner_padding_start', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPadding(Edge.Start, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPadding(Edge.Start, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -4428,20 +4429,20 @@ test('flex_direction_row_reverse_inner_padding_end', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setPadding(Edge.End, 10); root_child0_child0.setWidth(10); root_child0_child0.setHeight(10); + root_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0.setPadding(Edge.End, 10); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -4519,15 +4520,15 @@ test('flex_direction_alternating_with_percent', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(200); root.setHeight(300); + root.setWidth(200); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setHeight("50%"); + root_child0.setWidth("50%"); root_child0.setPosition(Edge.Left, "10%"); root_child0.setPosition(Edge.Top, "10%"); - root_child0.setWidth("50%"); - root_child0.setHeight("50%"); + root_child0.setFlexDirection(FlexDirection.Row); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGFlexTest.test.ts b/javascript/tests/generated/YGFlexTest.test.ts index 6eee8e8640..d59895d90b 100644 --- a/javascript/tests/generated/YGFlexTest.test.ts +++ b/javascript/tests/generated/YGFlexTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<60e19ea0b6b108cd6b0d4062c0b0316d>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexTest.html + * @generated SignedSource<<8762f5e52c5ba5e7bf554f284fbaada6>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGFlexTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -39,8 +40,8 @@ test('flex_basis_flex_grow_column', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -93,21 +94,21 @@ test('flex_shrink_flex_grow_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexShrink(1); root_child0.setWidth(500); root_child0.setHeight(100); + root_child0.setFlexShrink(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexShrink(1); root_child1.setWidth(500); root_child1.setHeight(100); + root_child1.setFlexShrink(1); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -156,22 +157,22 @@ test('flex_shrink_flex_grow_child_flex_shrink_other_child', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexShrink(1); root_child0.setWidth(500); root_child0.setHeight(100); + root_child0.setFlexShrink(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); - root_child1.setFlexShrink(1); root_child1.setWidth(500); root_child1.setHeight(100); + root_child1.setFlexGrow(1); + root_child1.setFlexShrink(1); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -220,14 +221,14 @@ test('flex_basis_flex_grow_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -285,8 +286,8 @@ test('flex_basis_flex_shrink_column', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexShrink(1); root_child0.setFlexBasis(100); + root_child0.setFlexShrink(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -339,14 +340,14 @@ test('flex_basis_flex_shrink_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexShrink(1); root_child0.setFlexBasis(100); + root_child0.setFlexShrink(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -408,9 +409,9 @@ test('flex_shrink_to_zero', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexShrink(1); root_child1.setWidth(50); root_child1.setHeight(50); + root_child1.setFlexShrink(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -475,23 +476,23 @@ test('flex_basis_overrides_main_size', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(20); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); - root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setHeight(10); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setHeight(10); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -551,8 +552,8 @@ test('flex_grow_shrink_at_most', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); root.insertChild(root_child0, 0); @@ -609,8 +610,8 @@ test('flex_grow_less_than_factor_one', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(200); root.setHeight(500); + root.setWidth(200); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(0.2); diff --git a/javascript/tests/generated/YGFlexWrapTest.test.ts b/javascript/tests/generated/YGFlexWrapTest.test.ts index 28ee4cee2e..bc3986bc14 100644 --- a/javascript/tests/generated/YGFlexWrapTest.test.ts +++ b/javascript/tests/generated/YGFlexWrapTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<5c4e3faf7c401d359b341c41a3055313>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexWrapTest.html + * @generated SignedSource<<3e7b15dff819295cb06caa3f087766b7>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGFlexWrapTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -28,40 +29,40 @@ import { Wrap, } from 'yoga-layout'; -test('wrap_column', () => { +test.skip('wrap_column', () => { const config = Yoga.Config.create(); let root; try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(30); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(30); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(30); + root_child3.setWidth(30); root.insertChild(root_child3, 3); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); expect(root.getComputedTop()).toBe(0); - expect(root.getComputedWidth()).toBe(60); + expect(root.getComputedWidth()).toBe(30); expect(root.getComputedHeight()).toBe(100); expect(root_child0.getComputedLeft()).toBe(0); @@ -88,25 +89,25 @@ test('wrap_column', () => { expect(root.getComputedLeft()).toBe(0); expect(root.getComputedTop()).toBe(0); - expect(root.getComputedWidth()).toBe(60); + expect(root.getComputedWidth()).toBe(30); expect(root.getComputedHeight()).toBe(100); - expect(root_child0.getComputedLeft()).toBe(30); + expect(root_child0.getComputedLeft()).toBe(0); expect(root_child0.getComputedTop()).toBe(0); expect(root_child0.getComputedWidth()).toBe(30); expect(root_child0.getComputedHeight()).toBe(30); - expect(root_child1.getComputedLeft()).toBe(30); + expect(root_child1.getComputedLeft()).toBe(0); expect(root_child1.getComputedTop()).toBe(30); expect(root_child1.getComputedWidth()).toBe(30); expect(root_child1.getComputedHeight()).toBe(30); - expect(root_child2.getComputedLeft()).toBe(30); + expect(root_child2.getComputedLeft()).toBe(0); expect(root_child2.getComputedTop()).toBe(60); expect(root_child2.getComputedWidth()).toBe(30); expect(root_child2.getComputedHeight()).toBe(30); - expect(root_child3.getComputedLeft()).toBe(0); + expect(root_child3.getComputedLeft()).toBe(-30); expect(root_child3.getComputedTop()).toBe(0); expect(root_child3.getComputedWidth()).toBe(30); expect(root_child3.getComputedHeight()).toBe(30); @@ -124,29 +125,29 @@ test('wrap_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(30); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(30); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(30); + root_child3.setWidth(30); root.insertChild(root_child3, 3); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -215,30 +216,30 @@ test('wrap_row_align_items_flex_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.FlexEnd); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignItems(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(10); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(20); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(30); + root_child3.setWidth(30); root.insertChild(root_child3, 3); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -307,30 +308,30 @@ test('wrap_row_align_items_center', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(10); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(20); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(30); + root_child3.setWidth(30); root.insertChild(root_child3, 3); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -399,21 +400,21 @@ test('flex_wrap_children_with_min_main_overriding_flex_basis', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexBasis(50); - root_child0.setMinWidth(55); root_child0.setHeight(50); + root_child0.setMinWidth(55); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setFlexBasis(50); - root_child1.setMinWidth(55); root_child1.setHeight(50); + root_child1.setMinWidth(55); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -475,8 +476,8 @@ test('flex_wrap_wrap_to_child_height', () => { root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setWidth(100); root_child0_child0_child0.setHeight(100); + root_child0_child0_child0.setWidth(100); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -550,11 +551,11 @@ test('flex_wrap_align_stretch_fits_one_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(150); root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -610,34 +611,34 @@ test('wrap_reverse_row_align_content_flex_start', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.WrapReverse); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(10); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(20); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(40); + root_child3.setWidth(30); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); - root_child4.setWidth(30); root_child4.setHeight(50); + root_child4.setWidth(30); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -716,35 +717,35 @@ test('wrap_reverse_row_align_content_center', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.WrapReverse); + root.setAlignContent(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(10); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(20); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(40); + root_child3.setWidth(30); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); - root_child4.setWidth(30); root_child4.setHeight(50); + root_child4.setWidth(30); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -823,34 +824,34 @@ test('wrap_reverse_row_single_line_different_size', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); root.setWidth(300); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.WrapReverse); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(10); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(20); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(40); + root_child3.setWidth(30); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); - root_child4.setWidth(30); root_child4.setHeight(50); + root_child4.setWidth(30); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -929,35 +930,35 @@ test('wrap_reverse_row_align_content_stretch', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.WrapReverse); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(10); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(20); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(40); + root_child3.setWidth(30); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); - root_child4.setWidth(30); root_child4.setHeight(50); + root_child4.setWidth(30); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1036,35 +1037,35 @@ test('wrap_reverse_row_align_content_space_around', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceAround); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); root.setWidth(100); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.WrapReverse); + root.setAlignContent(Align.SpaceAround); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(10); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(20); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(40); + root_child3.setWidth(30); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); - root_child4.setWidth(30); root_child4.setHeight(50); + root_child4.setWidth(30); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1143,35 +1144,35 @@ test('wrap_reverse_column_fixed_size', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.WrapReverse); root.setWidth(200); root.setHeight(100); + root.setFlexWrap(Wrap.WrapReverse); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(30); root_child0.setHeight(10); + root_child0.setWidth(30); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setWidth(30); root_child1.setHeight(20); + root_child1.setWidth(30); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setWidth(30); root_child2.setHeight(30); + root_child2.setWidth(30); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setWidth(30); root_child3.setHeight(40); + root_child3.setWidth(30); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); - root_child4.setWidth(30); root_child4.setHeight(50); + root_child4.setWidth(30); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1250,10 +1251,10 @@ test('wrapped_row_within_align_items_center', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -1326,10 +1327,10 @@ test('wrapped_row_within_align_items_flex_start', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -1402,10 +1403,10 @@ test('wrapped_row_within_align_items_flex_end', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexEnd); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -1478,13 +1479,13 @@ test('wrapped_column_max_height', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + root.setHeight(500); + root.setWidth(700); + root.setAlignItems(Align.Center); root.setJustifyContent(Justify.Center); root.setAlignContent(Align.Center); - root.setAlignItems(Align.Center); - root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); - root.setWidth(700); - root.setHeight(500); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(100); @@ -1493,12 +1494,9 @@ test('wrapped_column_max_height', () => { root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setMargin(Edge.Left, 20); - root_child1.setMargin(Edge.Top, 20); - root_child1.setMargin(Edge.Right, 20); - root_child1.setMargin(Edge.Bottom, 20); root_child1.setWidth(200); root_child1.setHeight(200); + root_child1.setMargin(Edge.All, 20); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -1562,33 +1560,30 @@ test('wrapped_column_max_height_flex', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); + root.setHeight(500); + root.setWidth(700); + root.setAlignItems(Align.Center); root.setJustifyContent(Justify.Center); root.setAlignContent(Align.Center); - root.setAlignItems(Align.Center); - root.setPositionType(PositionType.Absolute); root.setFlexWrap(Wrap.Wrap); - root.setWidth(700); - root.setHeight(500); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); - root_child0.setFlexShrink(1); - root_child0.setFlexBasis("0%"); root_child0.setWidth(100); root_child0.setHeight(500); root_child0.setMaxHeight(200); + root_child0.setFlexGrow(1); + root_child0.setFlexShrink(1); + root_child0.setFlexBasis("0%"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setWidth(200); + root_child1.setHeight(200); + root_child1.setMargin(Edge.All, 20); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); - root_child1.setMargin(Edge.Left, 20); - root_child1.setMargin(Edge.Top, 20); - root_child1.setMargin(Edge.Right, 20); - root_child1.setMargin(Edge.Bottom, 20); - root_child1.setWidth(200); - root_child1.setHeight(200); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -1666,8 +1661,8 @@ test('wrap_nodes_with_content_sizing_overflowing_margin', () => { root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setWidth(40); root_child0_child0_child0.setHeight(40); + root_child0_child0_child0.setWidth(40); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -1675,8 +1670,8 @@ test('wrap_nodes_with_content_sizing_overflowing_margin', () => { root_child0.insertChild(root_child0_child1, 1); const root_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child1_child0.setWidth(40); root_child0_child1_child0.setHeight(40); + root_child0_child1_child0.setWidth(40); root_child0_child1.insertChild(root_child0_child1_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1769,8 +1764,8 @@ test('wrap_nodes_with_content_sizing_margin_cross', () => { root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setWidth(40); root_child0_child0_child0.setHeight(40); + root_child0_child0_child0.setWidth(40); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -1778,8 +1773,8 @@ test('wrap_nodes_with_content_sizing_margin_cross', () => { root_child0.insertChild(root_child0_child1, 1); const root_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child1_child0.setWidth(40); root_child0_child1_child0.setHeight(40); + root_child0_child1_child0.setWidth(40); root_child0_child1.insertChild(root_child0_child1_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1858,11 +1853,11 @@ test('wrap_with_min_cross_axis', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(500); root.setMinHeight(500); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(400); @@ -1920,11 +1915,11 @@ test('wrap_with_max_cross_axis', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setWidth(500); root.setMaxHeight(500); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(400); @@ -1982,9 +1977,9 @@ test('nowrap_expands_flexline_box_to_min_cross', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setMinHeight(400); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -2028,10 +2023,10 @@ test('wrap_does_not_impose_min_cross_onto_single_flexline', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setMinHeight(400); + root.setFlexDirection(FlexDirection.Row); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); diff --git a/javascript/tests/generated/YGGapTest.test.ts b/javascript/tests/generated/YGGapTest.test.ts index d38f592eaa..0f67fe977f 100644 --- a/javascript/tests/generated/YGGapTest.test.ts +++ b/javascript/tests/generated/YGGapTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<3fad56933a314f0a81b6ed504040ffae>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGGapTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGGapTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,8 +35,8 @@ test('column_gap_flexible', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setWidth(80); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -115,8 +116,8 @@ test('column_gap_inflexible', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setWidth(80); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -189,8 +190,8 @@ test('column_gap_mixed_flexible', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setWidth(80); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -265,8 +266,8 @@ test('column_gap_child_margins', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setWidth(80); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -275,24 +276,21 @@ test('column_gap_child_margins', () => { root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); - root_child0.setMargin(Edge.Left, 2); - root_child0.setMargin(Edge.Right, 2); + root_child0.setMargin(Edge.Horizontal, 2); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); - root_child1.setMargin(Edge.Left, 10); - root_child1.setMargin(Edge.Right, 10); + root_child1.setMargin(Edge.Horizontal, 10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); root_child2.setFlexGrow(1); root_child2.setFlexShrink(1); root_child2.setFlexBasis("0%"); - root_child2.setMargin(Edge.Left, 15); - root_child2.setMargin(Edge.Right, 15); + root_child2.setMargin(Edge.Horizontal, 15); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -351,8 +349,8 @@ test('column_row_gap_wrapping', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); root.setWidth(80); root.setGap(Gutter.Column, 10); @@ -519,17 +517,17 @@ test('column_gap_start_index', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); root.setWidth(80); root.setGap(Gutter.Column, 10); root.setGap(Gutter.Row, 20); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setPositionType(PositionType.Absolute); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -613,8 +611,8 @@ test('column_gap_justify_flex_start', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -687,9 +685,9 @@ test('column_gap_justify_center', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.Center); - root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -762,9 +760,9 @@ test('column_gap_justify_flex_end', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.FlexEnd); - root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -837,9 +835,9 @@ test('column_gap_justify_space_between', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.SpaceBetween); - root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -912,9 +910,9 @@ test('column_gap_justify_space_around', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.SpaceAround); - root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -987,9 +985,9 @@ test('column_gap_justify_space_evenly', () => { try { root = Yoga.Node.create(config); + root.setPositionType(PositionType.Absolute); root.setFlexDirection(FlexDirection.Row); root.setJustifyContent(Justify.SpaceEvenly); - root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -1062,8 +1060,8 @@ test('column_gap_wrap_align_flex_start', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(100); @@ -1186,10 +1184,10 @@ test('column_gap_wrap_align_center', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Center); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.Center); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -1311,10 +1309,10 @@ test('column_gap_wrap_align_flex_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.FlexEnd); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.FlexEnd); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -1436,10 +1434,10 @@ test('column_gap_wrap_align_space_between', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceBetween); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.SpaceBetween); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -1561,10 +1559,10 @@ test('column_gap_wrap_align_space_around', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.SpaceAround); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); + root.setAlignContent(Align.SpaceAround); root.setWidth(100); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -1686,37 +1684,37 @@ test('column_gap_wrap_align_stretch', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); root.setWidth(300); root.setHeight(300); root.setGap(Gutter.Column, 5); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setMinWidth(60); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setMinWidth(60); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setMinWidth(60); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setFlexGrow(1); root_child3.setMinWidth(60); + root_child3.setFlexGrow(1); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); - root_child4.setFlexGrow(1); root_child4.setMinWidth(60); + root_child4.setFlexGrow(1); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1795,8 +1793,8 @@ test('column_gap_determines_parent_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setHeight(100); root.setGap(Gutter.Column, 10); @@ -1868,14 +1866,14 @@ test('row_gap_align_items_stretch', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(200); root.setGap(Gutter.Column, 10); root.setGap(Gutter.Row, 20); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(20); @@ -1987,14 +1985,14 @@ test('row_gap_align_items_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.FlexEnd); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(200); root.setGap(Gutter.Column, 10); root.setGap(Gutter.Row, 20); + root.setAlignItems(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(20); @@ -2115,24 +2113,21 @@ test('row_gap_column_child_margins', () => { root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); - root_child0.setMargin(Edge.Top, 2); - root_child0.setMargin(Edge.Bottom, 2); + root_child0.setMargin(Edge.Vertical, 2); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); root_child1.setFlexGrow(1); root_child1.setFlexShrink(1); root_child1.setFlexBasis("0%"); - root_child1.setMargin(Edge.Top, 10); - root_child1.setMargin(Edge.Bottom, 10); + root_child1.setMargin(Edge.Vertical, 10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); root_child2.setFlexGrow(1); root_child2.setFlexShrink(1); root_child2.setFlexBasis("0%"); - root_child2.setMargin(Edge.Top, 15); - root_child2.setMargin(Edge.Bottom, 15); + root_child2.setMargin(Edge.Vertical, 15); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2191,29 +2186,26 @@ test('row_gap_row_wrap_child_margins', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setFlexWrap(Wrap.Wrap); root.setWidth(100); root.setHeight(200); root.setGap(Gutter.Row, 10); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Top, 2); - root_child0.setMargin(Edge.Bottom, 2); root_child0.setWidth(60); + root_child0.setMargin(Edge.Vertical, 2); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setMargin(Edge.Top, 10); - root_child1.setMargin(Edge.Bottom, 10); root_child1.setWidth(60); + root_child1.setMargin(Edge.Vertical, 10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setMargin(Edge.Top, 15); - root_child2.setMargin(Edge.Bottom, 15); root_child2.setWidth(60); + root_child2.setMargin(Edge.Vertical, 15); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2344,17 +2336,13 @@ test('row_gap_percent_wrapping', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setPadding(Edge.Left, 10); - root.setPadding(Edge.Top, 10); - root.setPadding(Edge.Right, 10); - root.setPadding(Edge.Bottom, 10); + root.setFlexDirection(FlexDirection.Row); root.setWidth(300); root.setHeight(700); - root.setGap(Gutter.Column, "10%"); - root.setGap(Gutter.Row, "10%"); + root.setPadding(Edge.All, 10); + root.setGap(Gutter.All, "10%"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(100); @@ -2457,12 +2445,11 @@ test('row_gap_percent_determines_parent_height', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); root.setWidth(300); - root.setGap(Gutter.Column, "10%"); - root.setGap(Gutter.Row, "10%"); + root.setGap(Gutter.All, "10%"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(100); @@ -2565,61 +2552,42 @@ test('row_gap_percent_wrapping_with_both_content_padding_and_item_padding', () = try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setPadding(Edge.Left, 10); - root.setPadding(Edge.Top, 10); - root.setPadding(Edge.Right, 10); - root.setPadding(Edge.Bottom, 10); + root.setFlexDirection(FlexDirection.Row); root.setWidth(300); root.setHeight(700); - root.setGap(Gutter.Column, "10%"); - root.setGap(Gutter.Row, "10%"); + root.setPadding(Edge.All, 10); + root.setGap(Gutter.All, "10%"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 10); - root_child0.setPadding(Edge.Top, 10); - root_child0.setPadding(Edge.Right, 10); - root_child0.setPadding(Edge.Bottom, 10); root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setPadding(Edge.All, 10); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setPadding(Edge.Left, 10); - root_child1.setPadding(Edge.Top, 10); - root_child1.setPadding(Edge.Right, 10); - root_child1.setPadding(Edge.Bottom, 10); root_child1.setWidth(100); root_child1.setHeight(100); + root_child1.setPadding(Edge.All, 10); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setPadding(Edge.Left, 10); - root_child2.setPadding(Edge.Top, 10); - root_child2.setPadding(Edge.Right, 10); - root_child2.setPadding(Edge.Bottom, 10); root_child2.setWidth(100); root_child2.setHeight(100); + root_child2.setPadding(Edge.All, 10); root.insertChild(root_child2, 2); const root_child3 = Yoga.Node.create(config); - root_child3.setPadding(Edge.Left, 10); - root_child3.setPadding(Edge.Top, 10); - root_child3.setPadding(Edge.Right, 10); - root_child3.setPadding(Edge.Bottom, 10); root_child3.setWidth(100); root_child3.setHeight(100); + root_child3.setPadding(Edge.All, 10); root.insertChild(root_child3, 3); const root_child4 = Yoga.Node.create(config); - root_child4.setPadding(Edge.Left, 10); - root_child4.setPadding(Edge.Top, 10); - root_child4.setPadding(Edge.Right, 10); - root_child4.setPadding(Edge.Bottom, 10); root_child4.setWidth(100); root_child4.setHeight(100); + root_child4.setPadding(Edge.All, 10); root.insertChild(root_child4, 4); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2698,17 +2666,13 @@ test('row_gap_percent_wrapping_with_both_content_padding', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setPadding(Edge.Left, 10); - root.setPadding(Edge.Top, 10); - root.setPadding(Edge.Right, 10); - root.setPadding(Edge.Bottom, 10); + root.setFlexDirection(FlexDirection.Row); root.setWidth(300); root.setHeight(700); - root.setGap(Gutter.Column, "10%"); - root.setGap(Gutter.Row, "10%"); + root.setPadding(Edge.All, 10); + root.setGap(Gutter.All, "10%"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(100); @@ -2811,17 +2775,13 @@ test('row_gap_percent_wrapping_with_content_margin', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setMargin(Edge.Left, 10); - root.setMargin(Edge.Top, 10); - root.setMargin(Edge.Right, 10); - root.setMargin(Edge.Bottom, 10); + root.setFlexDirection(FlexDirection.Row); root.setWidth(300); root.setHeight(700); - root.setGap(Gutter.Column, "10%"); - root.setGap(Gutter.Row, "10%"); + root.setMargin(Edge.All, 10); + root.setGap(Gutter.All, "10%"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(100); @@ -2924,21 +2884,14 @@ test('row_gap_percent_wrapping_with_content_margin_and_padding', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setMargin(Edge.Left, 10); - root.setMargin(Edge.Top, 10); - root.setMargin(Edge.Right, 10); - root.setMargin(Edge.Bottom, 10); - root.setPadding(Edge.Left, 10); - root.setPadding(Edge.Top, 10); - root.setPadding(Edge.Right, 10); - root.setPadding(Edge.Bottom, 10); + root.setFlexDirection(FlexDirection.Row); root.setWidth(300); root.setHeight(700); - root.setGap(Gutter.Column, "10%"); - root.setGap(Gutter.Row, "10%"); + root.setMargin(Edge.All, 10); + root.setPadding(Edge.All, 10); + root.setGap(Gutter.All, "10%"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(100); @@ -3041,12 +2994,11 @@ test('row_gap_percent_wrapping_with_flexible_content', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setWidth(300); root.setHeight(300); - root.setGap(Gutter.Column, "10%"); - root.setGap(Gutter.Row, "10%"); + root.setGap(Gutter.All, "10%"); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -3122,12 +3074,11 @@ test('row_gap_percent_wrapping_with_mixed_flexible_content', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setWidth(300); root.setHeight(300); - root.setGap(Gutter.Column, "10%"); - root.setGap(Gutter.Row, "10%"); + root.setGap(Gutter.All, "10%"); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -3199,12 +3150,11 @@ test.skip('row_gap_percent_wrapping_with_min_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); root.setMinWidth(300); - root.setGap(Gutter.Column, "10%"); - root.setGap(Gutter.Row, "10%"); + root.setGap(Gutter.All, "10%"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(100); diff --git a/javascript/tests/generated/YGIntrinsicSizeTest.test.ts b/javascript/tests/generated/YGIntrinsicSizeTest.test.ts index 97f43f46ee..db62ef4c66 100644 --- a/javascript/tests/generated/YGIntrinsicSizeTest.test.ts +++ b/javascript/tests/generated/YGIntrinsicSizeTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGIntrinsicSizeTest.html + * @generated SignedSource<<457c866e88817af1c8cde1b85e5ed3f9>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGIntrinsicSizeTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,10 +35,10 @@ test('contains_inner_text_long_word', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -80,10 +81,10 @@ test('contains_inner_text_no_width_no_height', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -126,10 +127,10 @@ test('contains_inner_text_no_width_no_height_long_word_in_paragraph', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -172,10 +173,10 @@ test('contains_inner_text_fixed_width', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -219,10 +220,10 @@ test('contains_inner_text_no_width_fixed_height', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -266,10 +267,10 @@ test('contains_inner_text_fixed_width_fixed_height', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -314,10 +315,10 @@ test('contains_inner_text_max_width_max_height', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -362,9 +363,9 @@ test('contains_inner_text_max_width_max_height_column', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setMaxWidth(50); @@ -407,10 +408,10 @@ test('contains_inner_text_max_width', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -454,10 +455,10 @@ test('contains_inner_text_fixed_width_shorter_text', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -501,10 +502,10 @@ test('contains_inner_text_fixed_height_shorter_text', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -548,10 +549,10 @@ test('contains_inner_text_max_height', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(2000); root.setHeight(2000); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -595,10 +596,10 @@ test('max_content_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); root.setWidth("max-content"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -676,8 +677,8 @@ test.skip('fit_content_width', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setFlexWrap(Wrap.Wrap); root_child0.setWidth("fit-content"); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -766,8 +767,8 @@ test('stretch_width', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setFlexWrap(Wrap.Wrap); root_child0.setWidth("stretch"); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -852,8 +853,8 @@ test('max_content_height', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setHeight("max-content"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -930,8 +931,8 @@ test.skip('fit_content_height', () => { root.setHeight(90); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight("fit-content"); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1019,8 +1020,8 @@ test.skip('stretch_height', () => { root.setHeight(500); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight("stretch"); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1105,8 +1106,8 @@ test('max_content_flex_basis_column', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); root.setFlexBasis("max-content"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1183,8 +1184,8 @@ test.skip('fit_content_flex_basis_column', () => { root.setHeight(90); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexWrap(Wrap.Wrap); root_child0.setFlexBasis("fit-content"); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1272,6 +1273,7 @@ test('stretch_flex_basis_column', () => { root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setFlexBasis("stretch"); root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); @@ -1356,10 +1358,10 @@ test.skip('max_content_flex_basis_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); + root.setFlexDirection(FlexDirection.Row); root.setFlexBasis("max-content"); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1437,8 +1439,8 @@ test.skip('fit_content_flex_basis_row', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setFlexWrap(Wrap.Wrap); root_child0.setFlexBasis("fit-content"); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1527,6 +1529,7 @@ test.skip('stretch_flex_basis_row', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); + root_child0.setFlexBasis("stretch"); root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); @@ -1611,11 +1614,11 @@ test.skip('max_content_max_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setWidth(200); + root.setFlexDirection(FlexDirection.Row); root.setMaxWidth("max-content"); + root.setWidth(200); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1693,9 +1696,9 @@ test.skip('fit_content_max_width', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setFlexWrap(Wrap.Wrap); - root_child0.setWidth(110); root_child0.setMaxWidth("fit-content"); + root_child0.setWidth(110); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1784,9 +1787,9 @@ test.skip('stretch_max_width', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setFlexWrap(Wrap.Wrap); - root_child0.setWidth(600); root_child0.setMaxWidth("stretch"); + root_child0.setWidth(600); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1870,11 +1873,11 @@ test.skip('max_content_min_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setWidth(100); + root.setFlexDirection(FlexDirection.Row); root.setMinWidth("max-content"); + root.setWidth(100); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -1952,9 +1955,9 @@ test.skip('fit_content_min_width', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setFlexWrap(Wrap.Wrap); - root_child0.setWidth(90); root_child0.setMinWidth("fit-content"); + root_child0.setWidth(90); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2043,9 +2046,9 @@ test.skip('stretch_min_width', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setFlexWrap(Wrap.Wrap); - root_child0.setWidth(400); root_child0.setMinWidth("stretch"); + root_child0.setWidth(400); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2130,9 +2133,9 @@ test.skip('max_content_max_height', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setHeight(200); root.setMaxHeight("max-content"); + root.setHeight(200); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -2209,9 +2212,9 @@ test.skip('fit_content_max_height', () => { root.setHeight(90); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexWrap(Wrap.Wrap); - root_child0.setHeight(110); root_child0.setMaxHeight("fit-content"); + root_child0.setHeight(110); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2299,9 +2302,9 @@ test.skip('stretch_max_height', () => { root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setMaxHeight("stretch"); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(600); - root_child0.setMaxHeight("stretch"); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2386,9 +2389,9 @@ test.skip('max_content_min_height', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexWrap(Wrap.Wrap); - root.setHeight(100); root.setMinHeight("max-content"); + root.setHeight(100); + root.setFlexWrap(Wrap.Wrap); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -2465,9 +2468,9 @@ test.skip('fit_content_min_height', () => { root.setHeight(90); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexWrap(Wrap.Wrap); - root_child0.setHeight(90); root_child0.setMinHeight("fit-content"); + root_child0.setHeight(90); + root_child0.setFlexWrap(Wrap.Wrap); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2555,9 +2558,9 @@ test.skip('stretch_min_height', () => { root.setHeight(500); const root_child0 = Yoga.Node.create(config); + root_child0.setMinHeight("stretch"); root_child0.setFlexWrap(Wrap.Wrap); root_child0.setHeight(400); - root_child0.setMinHeight("stretch"); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2819,8 +2822,8 @@ test.skip('text_max_content_min_width', () => { root.setWidth(200); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(200); root_child0.setMinWidth("max-content"); + root_child0.setWidth(200); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2878,8 +2881,8 @@ test.skip('text_stretch_min_width', () => { root.setWidth(200); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(100); root_child0.setMinWidth("stretch"); + root_child0.setWidth(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2937,8 +2940,8 @@ test.skip('text_fit_content_min_width', () => { root.setWidth(200); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(300); root_child0.setMinWidth("fit-content"); + root_child0.setWidth(300); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -2996,8 +2999,8 @@ test.skip('text_max_content_max_width', () => { root.setWidth(200); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(2000); root_child0.setMaxWidth("max-content"); + root_child0.setWidth(2000); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -3055,8 +3058,8 @@ test.skip('text_stretch_max_width', () => { root.setWidth(200); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(300); root_child0.setMaxWidth("stretch"); + root_child0.setWidth(300); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -3114,8 +3117,8 @@ test.skip('text_fit_content_max_width', () => { root.setWidth(200); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(1000); root_child0.setMaxWidth("fit-content"); + root_child0.setWidth(1000); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); diff --git a/javascript/tests/generated/YGJustifyContentTest.test.ts b/javascript/tests/generated/YGJustifyContentTest.test.ts index 63f814f1a2..968bf668f1 100644 --- a/javascript/tests/generated/YGJustifyContentTest.test.ts +++ b/javascript/tests/generated/YGJustifyContentTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGJustifyContentTest.html + * @generated SignedSource<<75acf74715f196f615f3a1b37707c53a>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGJustifyContentTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,10 +35,10 @@ test('justify_content_row_flex_start', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -107,11 +108,11 @@ test('justify_content_row_flex_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.FlexEnd); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.FlexEnd); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -181,11 +182,11 @@ test('justify_content_row_center', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -255,11 +256,11 @@ test('justify_content_row_space_between', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.SpaceBetween); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.SpaceBetween); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -329,11 +330,11 @@ test('justify_content_row_space_around', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.SpaceAround); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.SpaceAround); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -475,10 +476,10 @@ test('justify_content_column_flex_end', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.FlexEnd); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setJustifyContent(Justify.FlexEnd); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -548,10 +549,10 @@ test('justify_content_column_center', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -621,10 +622,10 @@ test('justify_content_column_space_between', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.SpaceBetween); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setJustifyContent(Justify.SpaceBetween); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -694,10 +695,10 @@ test('justify_content_column_space_around', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.SpaceAround); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setJustifyContent(Justify.SpaceAround); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -767,15 +768,15 @@ test('justify_content_row_min_width_and_margin', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Left, 100); root.setMinWidth(50); + root.setMargin(Edge.Left, 100); + root.setJustifyContent(Justify.Center); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setWidth(20); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -814,16 +815,16 @@ test('justify_content_row_max_width_and_margin', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Left, 100); root.setWidth(100); root.setMaxWidth(80); + root.setMargin(Edge.Left, 100); + root.setJustifyContent(Justify.Center); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setWidth(20); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -862,14 +863,14 @@ test('justify_content_column_min_height_and_margin', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Top, 100); root.setMinHeight(50); + root.setMargin(Edge.Top, 100); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setWidth(20); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -908,15 +909,15 @@ test('justify_content_column_max_height_and_margin', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setMargin(Edge.Top, 100); root.setHeight(100); root.setMaxHeight(80); + root.setMargin(Edge.Top, 100); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(20); root_child0.setHeight(20); + root_child0.setWidth(20); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -955,10 +956,10 @@ test('justify_content_column_space_evenly', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.SpaceEvenly); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setJustifyContent(Justify.SpaceEvenly); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -1028,11 +1029,11 @@ test('justify_content_row_space_evenly', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.SpaceEvenly); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setJustifyContent(Justify.SpaceEvenly); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -1102,10 +1103,10 @@ test('justify_content_min_width_with_padding_child_width_greater_than_parent', ( try { root = Yoga.Node.create(config); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); root.setWidth(1000); root.setHeight(1584); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -1116,16 +1117,16 @@ test('justify_content_min_width_with_padding_child_width_greater_than_parent', ( root_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0.setJustifyContent(Justify.Center); root_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0.setMinWidth(400); root_child0_child0.setPadding(Edge.Left, 100); root_child0_child0.setPadding(Edge.Right, 100); - root_child0_child0.setMinWidth(400); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setFlexDirection(FlexDirection.Row); - root_child0_child0_child0.setAlignContent(Align.Stretch); - root_child0_child0_child0.setWidth(300); root_child0_child0_child0.setHeight(100); + root_child0_child0_child0.setWidth(300); + root_child0_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1184,10 +1185,10 @@ test('justify_content_min_width_with_padding_child_width_lower_than_parent', () try { root = Yoga.Node.create(config); - root.setAlignContent(Align.Stretch); root.setPositionType(PositionType.Absolute); root.setWidth(1080); root.setHeight(1584); + root.setAlignContent(Align.Stretch); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -1198,16 +1199,16 @@ test('justify_content_min_width_with_padding_child_width_lower_than_parent', () root_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0.setJustifyContent(Justify.Center); root_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0.setMinWidth(400); root_child0_child0.setPadding(Edge.Left, 100); root_child0_child0.setPadding(Edge.Right, 100); - root_child0_child0.setMinWidth(400); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setFlexDirection(FlexDirection.Row); - root_child0_child0_child0.setAlignContent(Align.Stretch); - root_child0_child0_child0.setWidth(199); root_child0_child0_child0.setHeight(100); + root_child0_child0_child0.setWidth(199); + root_child0_child0_child0.setAlignContent(Align.Stretch); + root_child0_child0_child0.setFlexDirection(FlexDirection.Row); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1266,14 +1267,14 @@ test('justify_content_space_between_indefinite_container_dim_with_free_space', ( try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(300); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setJustifyContent(Justify.SpaceBetween); root_child0.setMinWidth(200); + root_child0.setJustifyContent(Justify.SpaceBetween); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1342,10 +1343,10 @@ test('justify_content_flex_start_row_reverse', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.RowReverse); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(20); @@ -1415,10 +1416,10 @@ test('justify_content_flex_end_row_reverse', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.RowReverse); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(20); @@ -1488,10 +1489,10 @@ test('justify_content_overflow_row_flex_start', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(40); @@ -1561,11 +1562,11 @@ test('justify_content_overflow_row_flex_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.FlexEnd); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.FlexEnd); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(40); @@ -1635,11 +1636,11 @@ test('justify_content_overflow_row_center', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(40); @@ -1709,11 +1710,11 @@ test('justify_content_overflow_row_space_between', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.SpaceBetween); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.SpaceBetween); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(40); @@ -1783,11 +1784,11 @@ test('justify_content_overflow_row_space_around', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.SpaceAround); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.SpaceAround); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(40); @@ -1857,11 +1858,11 @@ test('justify_content_overflow_row_space_evenly', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.SpaceEvenly); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.SpaceEvenly); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(40); @@ -1931,11 +1932,11 @@ test.skip('justify_content_overflow_row_reverse_space_around', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); - root.setJustifyContent(Justify.SpaceAround); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.RowReverse); + root.setJustifyContent(Justify.SpaceAround); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(40); @@ -2005,11 +2006,11 @@ test.skip('justify_content_overflow_row_reverse_space_evenly', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.RowReverse); - root.setJustifyContent(Justify.SpaceEvenly); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.RowReverse); + root.setJustifyContent(Justify.SpaceEvenly); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(40); @@ -2079,15 +2080,15 @@ test('justify_content_overflow_row_space_evenly_auto_margin', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.SpaceEvenly); root.setPositionType(PositionType.Absolute); root.setWidth(102); root.setHeight(102); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.SpaceEvenly); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(40); + root_child0.setMargin(Edge.Right, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); diff --git a/javascript/tests/generated/YGMarginTest.test.ts b/javascript/tests/generated/YGMarginTest.test.ts index 8046de55d0..5d2627d610 100644 --- a/javascript/tests/generated/YGMarginTest.test.ts +++ b/javascript/tests/generated/YGMarginTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<3a4aaa192f950239104218a9666654c1>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGMarginTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGMarginTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,14 +35,14 @@ test('margin_start', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Start, 10); root_child0.setWidth(10); + root_child0.setMargin(Edge.Start, 10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -85,8 +86,8 @@ test('margin_top', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Top, 10); root_child0.setHeight(10); + root_child0.setMargin(Edge.Top, 10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -125,15 +126,15 @@ test('margin_end', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setJustifyContent(Justify.FlexEnd); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setJustifyContent(Justify.FlexEnd); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.End, 10); root_child0.setWidth(10); + root_child0.setMargin(Edge.End, 10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -172,14 +173,14 @@ test('margin_bottom', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.FlexEnd); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setJustifyContent(Justify.FlexEnd); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Bottom, 10); root_child0.setHeight(10); + root_child0.setMargin(Edge.Bottom, 10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -218,15 +219,15 @@ test('margin_and_flex_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Start, 10); root_child0.setMargin(Edge.End, 10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -270,9 +271,9 @@ test('margin_and_flex_column', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Top, 10); root_child0.setMargin(Edge.Bottom, 10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -311,15 +312,15 @@ test('margin_and_stretch_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Top, 10); root_child0.setMargin(Edge.Bottom, 10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -363,9 +364,9 @@ test('margin_and_stretch_column', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Start, 10); root_child0.setMargin(Edge.End, 10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -404,14 +405,14 @@ test('margin_with_sibling_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setMargin(Edge.End, 10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -469,8 +470,8 @@ test('margin_with_sibling_column', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setMargin(Edge.Bottom, 10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -523,15 +524,15 @@ test('margin_auto_bottom', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Bottom, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Bottom, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -585,15 +586,15 @@ test('margin_auto_top', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Top, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Top, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -647,16 +648,16 @@ test('margin_auto_bottom_and_top', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Top, 'auto'); - root_child0.setMargin(Edge.Bottom, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Top, "auto"); + root_child0.setMargin(Edge.Bottom, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -710,16 +711,16 @@ test('margin_auto_bottom_and_top_justify_center', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Top, 'auto'); - root_child0.setMargin(Edge.Bottom, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Top, "auto"); + root_child0.setMargin(Edge.Bottom, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -773,21 +774,21 @@ test('margin_auto_multiple_children_column', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Top, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Top, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setMargin(Edge.Top, 'auto'); root_child1.setWidth(50); root_child1.setHeight(50); + root_child1.setMargin(Edge.Top, "auto"); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -851,22 +852,22 @@ test('margin_auto_multiple_children_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Right, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setMargin(Edge.Right, 'auto'); root_child1.setWidth(50); root_child1.setHeight(50); + root_child1.setMargin(Edge.Right, "auto"); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); @@ -930,17 +931,17 @@ test('margin_auto_left_and_right_column', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 'auto'); - root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Left, "auto"); + root_child0.setMargin(Edge.Right, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -999,10 +1000,10 @@ test('margin_auto_left_and_right', () => { root.setHeight(200); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 'auto'); - root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Left, "auto"); + root_child0.setMargin(Edge.Right, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1056,17 +1057,17 @@ test('margin_auto_start_and_end_column', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Start, 'auto'); - root_child0.setMargin(Edge.End, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Start, "auto"); + root_child0.setMargin(Edge.End, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1125,10 +1126,10 @@ test('margin_auto_start_and_end', () => { root.setHeight(200); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Start, 'auto'); - root_child0.setMargin(Edge.End, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Start, "auto"); + root_child0.setMargin(Edge.End, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1182,16 +1183,16 @@ test('margin_auto_left_and_right_column_and_center', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 'auto'); - root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Left, "auto"); + root_child0.setMargin(Edge.Right, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1245,15 +1246,15 @@ test('margin_auto_left', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Left, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1307,15 +1308,15 @@ test('margin_auto_right', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Right, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1369,16 +1370,16 @@ test('margin_auto_left_and_right_stretch', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 'auto'); - root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Left, "auto"); + root_child0.setMargin(Edge.Right, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1437,10 +1438,10 @@ test('margin_auto_top_and_bottom_stretch', () => { root.setHeight(200); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Top, 'auto'); - root_child0.setMargin(Edge.Bottom, 'auto'); root_child0.setWidth(50); root_child0.setHeight(50); + root_child0.setMargin(Edge.Top, "auto"); + root_child0.setMargin(Edge.Bottom, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1499,10 +1500,10 @@ test('margin_should_not_be_part_of_max_height', () => { root.setHeight(250); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Top, 20); root_child0.setWidth(100); root_child0.setHeight(100); root_child0.setMaxHeight(100); + root_child0.setMargin(Edge.Top, 20); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1546,10 +1547,10 @@ test('margin_should_not_be_part_of_max_width', () => { root.setHeight(250); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 20); root_child0.setWidth(100); - root_child0.setMaxWidth(100); root_child0.setHeight(100); + root_child0.setMaxWidth(100); + root_child0.setMargin(Edge.Left, 20); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1588,16 +1589,16 @@ test('margin_auto_left_right_child_bigger_than_parent', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setWidth(52); root.setHeight(52); + root.setWidth(52); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 'auto'); - root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(72); root_child0.setHeight(72); + root_child0.setMargin(Edge.Left, "auto"); + root_child0.setMargin(Edge.Right, "auto"); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1636,15 +1637,15 @@ test('margin_auto_left_child_bigger_than_parent', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setWidth(52); root.setHeight(52); + root.setWidth(52); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 'auto'); root_child0.setWidth(72); root_child0.setHeight(72); + root_child0.setMargin(Edge.Left, "auto"); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1683,16 +1684,16 @@ test('margin_fix_left_auto_right_child_bigger_than_parent', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setWidth(52); root.setHeight(52); + root.setWidth(52); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 10); - root_child0.setMargin(Edge.Right, 'auto'); root_child0.setWidth(72); root_child0.setHeight(72); + root_child0.setMargin(Edge.Left, 10); + root_child0.setMargin(Edge.Right, "auto"); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1731,16 +1732,16 @@ test('margin_auto_left_fix_right_child_bigger_than_parent', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setWidth(52); root.setHeight(52); + root.setWidth(52); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 'auto'); - root_child0.setMargin(Edge.Right, 10); root_child0.setWidth(72); root_child0.setHeight(72); + root_child0.setMargin(Edge.Left, "auto"); + root_child0.setMargin(Edge.Right, 10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1779,16 +1780,16 @@ test('margin_auto_top_stretching_child', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); - root_child0.setMargin(Edge.Top, 'auto'); + root_child0.setMargin(Edge.Top, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1842,16 +1843,16 @@ test('margin_auto_left_stretching_child', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); root_child0.setFlexShrink(1); root_child0.setFlexBasis("0%"); - root_child0.setMargin(Edge.Left, 'auto'); + root_child0.setMargin(Edge.Left, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -1905,15 +1906,15 @@ test('margin_auto_overflowing_container', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Bottom, 'auto'); root_child0.setWidth(50); root_child0.setHeight(150); + root_child0.setMargin(Edge.Bottom, "auto"); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); diff --git a/javascript/tests/generated/YGMinMaxDimensionTest.test.ts b/javascript/tests/generated/YGMinMaxDimensionTest.test.ts index dfe3773f5e..a18a971970 100644 --- a/javascript/tests/generated/YGMinMaxDimensionTest.test.ts +++ b/javascript/tests/generated/YGMinMaxDimensionTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<1bd782301afbab34ed3c9a296c3ecaa6>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGMinMaxDimensionTest.html + * @generated SignedSource<<0bedc36bbb320134d03275e2d0ec5b5e>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGMinMaxDimensionTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -39,8 +40,8 @@ test('max_width', () => { root.setHeight(100); const root_child0 = Yoga.Node.create(config); - root_child0.setMaxWidth(50); root_child0.setHeight(10); + root_child0.setMaxWidth(50); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -79,10 +80,10 @@ test('max_height', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -184,10 +185,10 @@ test.skip('min_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -244,11 +245,11 @@ test('justify_content_min_max', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); - root.setWidth(100); - root.setMinHeight(100); root.setMaxHeight(200); + root.setMinHeight(100); + root.setWidth(100); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(60); @@ -291,11 +292,11 @@ test('align_items_min_max', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); - root.setMinWidth(100); root.setMaxWidth(200); + root.setMinWidth(100); root.setHeight(100); + root.setAlignItems(Align.Center); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(60); @@ -338,10 +339,10 @@ test('justify_content_overflow_min_max', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); root.setPositionType(PositionType.Absolute); root.setMinHeight(100); root.setMaxHeight(110); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(50); @@ -415,9 +416,9 @@ test('flex_grow_to_min', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setMinHeight(100); root.setMaxHeight(500); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -474,11 +475,11 @@ test('flex_grow_in_at_most_container', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setFlexDirection(FlexDirection.Row); @@ -535,13 +536,13 @@ test('flex_grow_child', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(100); root_child0.setFlexGrow(1); root_child0.setFlexBasis(0); - root_child0.setHeight(100); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -648,8 +649,8 @@ test('flex_grow_within_max_width', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexGrow(1); root_child0_child0.setHeight(20); + root_child0_child0.setFlexGrow(1); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -708,8 +709,8 @@ test('flex_grow_within_constrained_max_width', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexGrow(1); root_child0_child0.setHeight(20); + root_child0_child0.setFlexGrow(1); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -759,14 +760,14 @@ test('flex_root_ignored', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setFlexGrow(1); root.setWidth(100); root.setMinHeight(100); root.setMaxHeight(500); + root.setFlexGrow(1); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setFlexBasis(200); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -825,14 +826,14 @@ test('flex_grow_root_minimized', () => { root.setMaxHeight(500); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setMinHeight(100); root_child0.setMaxHeight(500); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexBasis(200); + root_child0_child0.setFlexGrow(1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -900,14 +901,14 @@ test('flex_grow_height_maximized', () => { root.setHeight(500); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setMinHeight(100); root_child0.setMaxHeight(500); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexGrow(1); root_child0_child0.setFlexBasis(200); + root_child0_child0.setFlexGrow(1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); @@ -970,10 +971,10 @@ test('flex_grow_within_constrained_min_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setMinWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -1090,9 +1091,9 @@ test('flex_grow_within_constrained_max_row', () => { root.setWidth(200); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setMaxWidth(100); root_child0.setHeight(100); + root_child0.setMaxWidth(100); + root_child0.setFlexDirection(FlexDirection.Row); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1161,8 +1162,8 @@ test('flex_grow_within_constrained_max_column', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setMaxHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); root_child0.setFlexShrink(1); @@ -1219,21 +1220,21 @@ test('child_min_max_width_flexing', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(120); root.setHeight(50); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); + root_child0.setMinWidth(60); root_child0.setFlexGrow(1); root_child0.setFlexBasis(0); - root_child0.setMinWidth(60); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); + root_child1.setMaxWidth(20); root_child1.setFlexGrow(1); root_child1.setFlexBasis("50%"); - root_child1.setMaxWidth(20); root.insertChild(root_child1, 1); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1283,8 +1284,8 @@ test('min_width_overrides_width', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(50); root.setMinWidth(100); + root.setWidth(50); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -1313,8 +1314,8 @@ test('max_width_overrides_width', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(200); root.setMaxWidth(100); + root.setWidth(200); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -1343,8 +1344,8 @@ test('min_height_overrides_height', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setHeight(50); root.setMinHeight(100); + root.setHeight(50); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -1373,8 +1374,8 @@ test('max_height_overrides_height', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setHeight(200); root.setMaxHeight(100); + root.setHeight(200); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -1402,10 +1403,10 @@ test('min_max_percent_no_width_height', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setMinWidth("10%"); diff --git a/javascript/tests/generated/YGPaddingTest.test.ts b/javascript/tests/generated/YGPaddingTest.test.ts index 474a80821e..e668e3a48c 100644 --- a/javascript/tests/generated/YGPaddingTest.test.ts +++ b/javascript/tests/generated/YGPaddingTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<07e65137c3055db0090d46067ec69d5e>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGPaddingTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGPaddingTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -35,10 +36,7 @@ test('padding_no_size', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 10); - root.setPadding(Edge.Top, 10); - root.setPadding(Edge.Right, 10); - root.setPadding(Edge.Bottom, 10); + root.setPadding(Edge.All, 10); root.calculateLayout(undefined, undefined, Direction.LTR); expect(root.getComputedLeft()).toBe(0); @@ -67,10 +65,7 @@ test('padding_container_match_child', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 10); - root.setPadding(Edge.Top, 10); - root.setPadding(Edge.Right, 10); - root.setPadding(Edge.Bottom, 10); + root.setPadding(Edge.All, 10); const root_child0 = Yoga.Node.create(config); root_child0.setWidth(10); @@ -114,16 +109,13 @@ test('padding_flex_child', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 10); - root.setPadding(Edge.Top, 10); - root.setPadding(Edge.Right, 10); - root.setPadding(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 10); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setWidth(10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -163,12 +155,9 @@ test('padding_stretch_child', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 10); - root.setPadding(Edge.Top, 10); - root.setPadding(Edge.Right, 10); - root.setPadding(Edge.Bottom, 10); root.setWidth(100); root.setHeight(100); + root.setPadding(Edge.All, 10); const root_child0 = Yoga.Node.create(config); root_child0.setHeight(10); @@ -210,18 +199,18 @@ test('padding_center_child', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); + root.setWidth(100); + root.setHeight(100); root.setPadding(Edge.Start, 10); root.setPadding(Edge.End, 20); root.setPadding(Edge.Bottom, 20); - root.setWidth(100); - root.setHeight(100); + root.setAlignItems(Align.Center); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(10); root_child0.setHeight(10); + root_child0.setWidth(10); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -260,19 +249,16 @@ test('child_with_padding_align_end', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.FlexEnd); - root.setAlignItems(Align.FlexEnd); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setJustifyContent(Justify.FlexEnd); + root.setAlignItems(Align.FlexEnd); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 20); - root_child0.setPadding(Edge.Top, 20); - root_child0.setPadding(Edge.Right, 20); - root_child0.setPadding(Edge.Bottom, 20); root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setPadding(Edge.All, 20); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -312,10 +298,10 @@ test('physical_and_relative_edge_defined', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setPadding(Edge.Left, 20); - root.setPadding(Edge.End, 50); root.setWidth(200); root.setHeight(200); + root.setPadding(Edge.Left, 20); + root.setPadding(Edge.End, 50); const root_child0 = Yoga.Node.create(config); root_child0.setWidth("100%"); diff --git a/javascript/tests/generated/YGPercentageTest.test.ts b/javascript/tests/generated/YGPercentageTest.test.ts index 4f95fb28cb..1cb1c48806 100644 --- a/javascript/tests/generated/YGPercentageTest.test.ts +++ b/javascript/tests/generated/YGPercentageTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<091fb5c6d9004e40211bba58ac19d686>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGPercentageTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGPercentageTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,10 +35,10 @@ test('percentage_width_height', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setWidth("30%"); @@ -80,16 +81,16 @@ test('percentage_position_left_top', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(400); root.setHeight(400); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setPosition(Edge.Left, "10%"); - root_child0.setPosition(Edge.Top, "20%"); root_child0.setWidth("45%"); root_child0.setHeight("55%"); + root_child0.setPosition(Edge.Left, "10%"); + root_child0.setPosition(Edge.Top, "20%"); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -128,16 +129,16 @@ test('percentage_position_bottom_right', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(500); root.setHeight(500); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setPosition(Edge.Right, "20%"); - root_child0.setPosition(Edge.Bottom, "10%"); root_child0.setWidth("55%"); root_child0.setHeight("15%"); + root_child0.setPosition(Edge.Bottom, "10%"); + root_child0.setPosition(Edge.Right, "20%"); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -176,10 +177,10 @@ test('percentage_flex_basis', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -357,10 +358,10 @@ test('percentage_flex_basis_main_max_height', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -482,10 +483,10 @@ test('percentage_flex_basis_main_max_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -607,10 +608,10 @@ test('percentage_flex_basis_main_min_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(200); root.setHeight(200); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -739,39 +740,21 @@ test('percentage_multiple_nested_with_padding_margin_and_percentage_values', () const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); root_child0.setFlexBasis("10%"); - root_child0.setMargin(Edge.Left, 5); - root_child0.setMargin(Edge.Top, 5); - root_child0.setMargin(Edge.Right, 5); - root_child0.setMargin(Edge.Bottom, 5); - root_child0.setPadding(Edge.Left, 3); - root_child0.setPadding(Edge.Top, 3); - root_child0.setPadding(Edge.Right, 3); - root_child0.setPadding(Edge.Bottom, 3); root_child0.setMinWidth("60%"); + root_child0.setMargin(Edge.All, 5); + root_child0.setPadding(Edge.All, 3); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setMargin(Edge.Left, 5); - root_child0_child0.setMargin(Edge.Top, 5); - root_child0_child0.setMargin(Edge.Right, 5); - root_child0_child0.setMargin(Edge.Bottom, 5); - root_child0_child0.setPadding(Edge.Left, "3%"); - root_child0_child0.setPadding(Edge.Top, "3%"); - root_child0_child0.setPadding(Edge.Right, "3%"); - root_child0_child0.setPadding(Edge.Bottom, "3%"); root_child0_child0.setWidth("50%"); + root_child0_child0.setMargin(Edge.All, 5); + root_child0_child0.setPadding(Edge.All, "3%"); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setMargin(Edge.Left, "5%"); - root_child0_child0_child0.setMargin(Edge.Top, "5%"); - root_child0_child0_child0.setMargin(Edge.Right, "5%"); - root_child0_child0_child0.setMargin(Edge.Bottom, "5%"); - root_child0_child0_child0.setPadding(Edge.Left, 3); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 3); - root_child0_child0_child0.setPadding(Edge.Bottom, 3); root_child0_child0_child0.setWidth("45%"); + root_child0_child0_child0.setMargin(Edge.All, "5%"); + root_child0_child0_child0.setPadding(Edge.All, 3); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -852,10 +835,7 @@ test('percentage_margin_should_calculate_based_only_on_width', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); - root_child0.setMargin(Edge.Left, "10%"); - root_child0.setMargin(Edge.Top, "10%"); - root_child0.setMargin(Edge.Right, "10%"); - root_child0.setMargin(Edge.Bottom, "10%"); + root_child0.setMargin(Edge.All, "10%"); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -915,10 +895,7 @@ test('percentage_padding_should_calculate_based_only_on_width', () => { const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); - root_child0.setPadding(Edge.Left, "10%"); - root_child0.setPadding(Edge.Top, "10%"); - root_child0.setPadding(Edge.Right, "10%"); - root_child0.setPadding(Edge.Bottom, "10%"); + root_child0.setPadding(Edge.All, "10%"); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -978,8 +955,8 @@ test('percentage_absolute_position', () => { const root_child0 = Yoga.Node.create(config); root_child0.setPositionType(PositionType.Absolute); - root_child0.setPosition(Edge.Left, "30%"); root_child0.setPosition(Edge.Top, "10%"); + root_child0.setPosition(Edge.Left, "30%"); root_child0.setWidth(10); root_child0.setHeight(10); root.insertChild(root_child0, 0); @@ -1063,8 +1040,8 @@ test('percent_within_flex_grow', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setWidth(350); root.setHeight(100); @@ -1150,11 +1127,11 @@ test('percentage_container_in_wrapping_container', () => { try { root = Yoga.Node.create(config); - root.setJustifyContent(Justify.Center); - root.setAlignItems(Align.Center); root.setPositionType(PositionType.Absolute); + root.setAlignItems(Align.Center); root.setWidth(200); root.setHeight(200); + root.setJustifyContent(Justify.Center); const root_child0 = Yoga.Node.create(config); root.insertChild(root_child0, 0); @@ -1246,11 +1223,11 @@ test('percent_absolute_position', () => { root.setHeight(50); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.Row); - root_child0.setPositionType(PositionType.Absolute); - root_child0.setPosition(Edge.Left, "50%"); - root_child0.setWidth("100%"); root_child0.setHeight(50); + root_child0.setWidth("100%"); + root_child0.setPosition(Edge.Left, "50%"); + root_child0.setPositionType(PositionType.Absolute); + root_child0.setFlexDirection(FlexDirection.Row); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); @@ -1317,8 +1294,8 @@ test('percent_of_minmax_main', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setMinWidth(60); root.setMaxWidth(60); root.setHeight(50); @@ -1364,8 +1341,8 @@ test.skip('percent_of_min_main', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setMinWidth(60); root.setHeight(50); @@ -1410,8 +1387,8 @@ test.skip('percent_of_min_main_multiple', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setMinWidth(60); root.setHeight(50); @@ -1486,8 +1463,8 @@ test.skip('percent_of_max_main', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); + root.setFlexDirection(FlexDirection.Row); root.setMaxWidth(60); root.setHeight(50); @@ -1584,9 +1561,9 @@ test('percent_absolute_of_minmax_cross_stretched', () => { root.setHeight(50); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionType(PositionType.Absolute); root_child0.setWidth("50%"); root_child0.setHeight(20); + root_child0.setPositionType(PositionType.Absolute); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1625,11 +1602,11 @@ test('percent_of_minmax_cross_unstretched', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setMinWidth(60); root.setMaxWidth(60); root.setHeight(50); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setWidth("50%"); @@ -1672,10 +1649,10 @@ test.skip('percent_of_min_cross_unstretched', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setMinWidth(60); root.setHeight(50); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setWidth("50%"); @@ -1718,10 +1695,10 @@ test('percent_of_max_cross_unstretched', () => { try { root = Yoga.Node.create(config); - root.setAlignItems(Align.FlexStart); root.setPositionType(PositionType.Absolute); root.setMaxWidth(60); root.setHeight(50); + root.setAlignItems(Align.FlexStart); const root_child0 = Yoga.Node.create(config); root_child0.setWidth("50%"); diff --git a/javascript/tests/generated/YGRoundingTest.test.ts b/javascript/tests/generated/YGRoundingTest.test.ts index ca653f138c..0c3050890f 100644 --- a/javascript/tests/generated/YGRoundingTest.test.ts +++ b/javascript/tests/generated/YGRoundingTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<8119d2703019b25513720167cb4dea4e>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGRoundingTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGRoundingTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -34,10 +35,10 @@ test('rounding_flex_basis_flex_grow_row_width_of_100', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(100); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -107,10 +108,10 @@ test('rounding_flex_basis_flex_grow_row_prime_number_width', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(113); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); root_child0.setFlexGrow(1); @@ -208,14 +209,14 @@ test('rounding_flex_basis_flex_shrink_row', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(101); root.setHeight(100); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexShrink(1); root_child0.setFlexBasis(100); + root_child0.setFlexShrink(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); @@ -283,23 +284,23 @@ test('rounding_flex_basis_overrides_main_size', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(113); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(20); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); - root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setHeight(10); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setHeight(10); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -359,23 +360,23 @@ test('rounding_total_fractial', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(87.4); root.setHeight(113.4); + root.setWidth(87.4); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(20.3); root_child0.setFlexGrow(0.7); root_child0.setFlexBasis(50.3); - root_child0.setHeight(20.3); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1.6); root_child1.setHeight(10); + root_child1.setFlexGrow(1.6); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1.1); root_child2.setHeight(10.7); + root_child2.setFlexGrow(1.1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -435,37 +436,37 @@ test('rounding_total_fractial_nested', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(87.4); root.setHeight(113.4); + root.setWidth(87.4); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(20.3); root_child0.setFlexGrow(0.7); root_child0.setFlexBasis(50.3); - root_child0.setHeight(20.3); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexGrow(1); - root_child0_child0.setFlexBasis(0.3); root_child0_child0.setPosition(Edge.Bottom, 13.3); root_child0_child0.setHeight(9.9); + root_child0_child0.setFlexGrow(1); + root_child0_child0.setFlexBasis(0.3); root_child0.insertChild(root_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); - root_child0_child1.setFlexGrow(4); - root_child0_child1.setFlexBasis(0.3); root_child0_child1.setPosition(Edge.Top, 13.3); root_child0_child1.setHeight(1.1); + root_child0_child1.setFlexGrow(4); + root_child0_child1.setFlexBasis(0.3); root_child0.insertChild(root_child0_child1, 1); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1.6); root_child1.setHeight(10); + root_child1.setFlexGrow(1.6); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1.1); root_child2.setHeight(10.7); + root_child2.setFlexGrow(1.1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -545,23 +546,23 @@ test('rounding_fractial_input_1', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(113.4); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(20); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); - root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setHeight(10); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setHeight(10); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -621,23 +622,23 @@ test('rounding_fractial_input_2', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(113.6); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(20); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); - root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setHeight(10); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setHeight(10); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -698,23 +699,23 @@ test('rounding_fractial_input_3', () => { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); root.setPosition(Edge.Top, 0.3); - root.setWidth(100); root.setHeight(113.4); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(20); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); - root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setHeight(10); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setHeight(10); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -775,23 +776,23 @@ test('rounding_fractial_input_4', () => { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); root.setPosition(Edge.Top, 0.7); - root.setWidth(100); root.setHeight(113.4); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight(20); root_child0.setFlexGrow(1); root_child0.setFlexBasis(50); - root_child0.setHeight(20); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setHeight(10); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setHeight(10); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -850,28 +851,28 @@ test('rounding_inner_node_controversy_horizontal', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(320); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setHeight(10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setHeight(10); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); - root_child1_child0.setFlexGrow(1); root_child1_child0.setHeight(10); + root_child1_child0.setFlexGrow(1); root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setHeight(10); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -944,23 +945,23 @@ test('rounding_inner_node_controversy_vertical', () => { root.setHeight(320); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setWidth(10); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setWidth(10); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); - root_child1_child0.setFlexGrow(1); root_child1_child0.setWidth(10); + root_child1_child0.setFlexGrow(1); root_child1.insertChild(root_child1_child0, 0); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setWidth(10); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1029,29 +1030,29 @@ test('rounding_inner_node_controversy_combined', () => { try { root = Yoga.Node.create(config); - root.setFlexDirection(FlexDirection.Row); root.setPositionType(PositionType.Absolute); root.setWidth(640); root.setHeight(320); + root.setFlexDirection(FlexDirection.Row); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexGrow(1); root_child0.setHeight("100%"); + root_child0.setFlexGrow(1); root.insertChild(root_child0, 0); const root_child1 = Yoga.Node.create(config); - root_child1.setFlexGrow(1); root_child1.setHeight("100%"); + root_child1.setFlexGrow(1); root.insertChild(root_child1, 1); const root_child1_child0 = Yoga.Node.create(config); - root_child1_child0.setFlexGrow(1); root_child1_child0.setWidth("100%"); + root_child1_child0.setFlexGrow(1); root_child1.insertChild(root_child1_child0, 0); const root_child1_child1 = Yoga.Node.create(config); - root_child1_child1.setFlexGrow(1); root_child1_child1.setWidth("100%"); + root_child1_child1.setFlexGrow(1); root_child1.insertChild(root_child1_child1, 1); const root_child1_child1_child0 = Yoga.Node.create(config); @@ -1060,13 +1061,13 @@ test('rounding_inner_node_controversy_combined', () => { root_child1_child1.insertChild(root_child1_child1_child0, 0); const root_child1_child2 = Yoga.Node.create(config); - root_child1_child2.setFlexGrow(1); root_child1_child2.setWidth("100%"); + root_child1_child2.setFlexGrow(1); root_child1.insertChild(root_child1_child2, 2); const root_child2 = Yoga.Node.create(config); - root_child2.setFlexGrow(1); root_child2.setHeight("100%"); + root_child2.setFlexGrow(1); root.insertChild(root_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGSizeOverflowTest.test.ts b/javascript/tests/generated/YGSizeOverflowTest.test.ts index 325dd26db1..f995fd294e 100644 --- a/javascript/tests/generated/YGSizeOverflowTest.test.ts +++ b/javascript/tests/generated/YGSizeOverflowTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGSizeOverflowTest.html + * @generated SignedSource<<35624a5883d14ff8104e4951e95b1d7c>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGSizeOverflowTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -35,15 +36,15 @@ test('nested_overflowing_child', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setWidth(200); root_child0_child0.setHeight(200); + root_child0_child0.setWidth(200); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -93,17 +94,17 @@ test('nested_overflowing_child_in_constraint_parent', () => { try { root = Yoga.Node.create(config); root.setPositionType(PositionType.Absolute); - root.setWidth(100); root.setHeight(100); + root.setWidth(100); const root_child0 = Yoga.Node.create(config); - root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setWidth(100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setWidth(200); root_child0_child0.setHeight(200); + root_child0_child0.setWidth(200); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/javascript/tests/generated/YGStaticPositionTest.test.ts b/javascript/tests/generated/YGStaticPositionTest.test.ts index 0c2bd37327..12c943a09e 100644 --- a/javascript/tests/generated/YGStaticPositionTest.test.ts +++ b/javascript/tests/generated/YGStaticPositionTest.test.ts @@ -4,8 +4,8 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGStaticPositionTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGStaticPositionTest.html */ import { instrinsicSizeMeasureFunc } from '../tools/utils.ts' @@ -19,6 +19,7 @@ import { Errata, ExperimentalFeature, FlexDirection, + GridTrackType, Gutter, Justify, MeasureMode, @@ -37,11 +38,11 @@ test('static_position_insets_have_no_effect_left_top', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionType(PositionType.Static); - root_child0.setPosition(Edge.Left, 50); - root_child0.setPosition(Edge.Top, 50); root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setPositionType(PositionType.Static); + root_child0.setPosition(Edge.Top, 50); + root_child0.setPosition(Edge.Left, 50); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -83,11 +84,11 @@ test('static_position_insets_have_no_effect_right_bottom', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPositionType(PositionType.Static); - root_child0.setPosition(Edge.Right, 50); - root_child0.setPosition(Edge.Bottom, 50); root_child0.setWidth(100); root_child0.setHeight(100); + root_child0.setPositionType(PositionType.Static); + root_child0.setPosition(Edge.Bottom, 50); + root_child0.setPosition(Edge.Right, 50); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -134,18 +135,18 @@ test('static_position_absolute_child_insets_relative_to_positioned_ancestor', () root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 100); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setPosition(Edge.Left, 50); root_child0_child0_child0.setPosition(Edge.Top, 50); - root_child0_child0_child0.setWidth(50); - root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setPosition(Edge.Left, 50); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -207,23 +208,23 @@ test('static_position_absolute_child_insets_relative_to_positioned_ancestor_row_ root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); root_child0.setWidth(200); root_child0.setHeight(200); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setPosition(Edge.Left, 50); root_child0_child0_child0.setPosition(Edge.Top, 50); - root_child0_child0_child0.setWidth(50); - root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setPosition(Edge.Left, 50); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -285,24 +286,24 @@ test('column_reverse_static_position_absolute_child_insets_relative_to_positione root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.RowReverse); root_child0.setWidth(200); root_child0.setHeight(200); + root_child0.setFlexDirection(FlexDirection.RowReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); + root_child0_child0.setFlexDirection(FlexDirection.ColumnReverse); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setPosition(Edge.Left, 50); root_child0_child0_child0.setPosition(Edge.Top, 50); - root_child0_child0_child0.setWidth(50); - root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setPosition(Edge.Left, 50); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -364,23 +365,23 @@ test('static_position_absolute_child_insets_relative_to_positioned_ancestor_row' root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.Row); root_child0.setWidth(200); root_child0.setHeight(200); + root_child0.setFlexDirection(FlexDirection.Row); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.Top, 50); root_child0_child0_child0.setPosition(Edge.Right, 50); - root_child0_child0_child0.setWidth(50); - root_child0_child0_child0.setHeight(50); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -442,24 +443,24 @@ test('column_reverse_static_position_absolute_child_insets_relative_to_positione root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.Row); root_child0.setWidth(200); root_child0.setHeight(200); + root_child0.setFlexDirection(FlexDirection.Row); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); + root_child0_child0.setFlexDirection(FlexDirection.ColumnReverse); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.Top, 50); root_child0_child0_child0.setPosition(Edge.Right, 50); - root_child0_child0_child0.setWidth(50); - root_child0_child0_child0.setHeight(50); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -521,23 +522,23 @@ test('static_position_absolute_child_insets_relative_to_positioned_ancestor_colu root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); root_child0.setWidth(200); root_child0.setHeight(200); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.Top, 50); root_child0_child0_child0.setPosition(Edge.Right, 50); - root_child0_child0_child0.setWidth(50); - root_child0_child0_child0.setHeight(50); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -599,24 +600,24 @@ test('column_reverse_static_position_absolute_child_insets_relative_to_positione root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setFlexDirection(FlexDirection.ColumnReverse); root_child0.setWidth(200); root_child0.setHeight(200); + root_child0.setFlexDirection(FlexDirection.ColumnReverse); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexDirection(FlexDirection.ColumnReverse); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); + root_child0_child0.setFlexDirection(FlexDirection.ColumnReverse); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.Top, 50); root_child0_child0_child0.setPosition(Edge.Right, 50); - root_child0_child0_child0.setWidth(50); - root_child0_child0_child0.setHeight(50); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -683,39 +684,39 @@ test('static_position_absolute_child_insets_relative_to_positioned_ancestor_deep root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 100); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setMargin(Edge.Left, 100); - root_child0_child0_child0.setWidth(100); root_child0_child0_child0.setHeight(100); + root_child0_child0_child0.setWidth(100); + root_child0_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0_child0.setMargin(Edge.Left, 100); - root_child0_child0_child0_child0.setWidth(100); root_child0_child0_child0_child0.setHeight(100); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); const root_child0_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0_child0_child0.setMargin(Edge.Left, 100); - root_child0_child0_child0_child0_child0.setWidth(100); root_child0_child0_child0_child0_child0.setHeight(100); + root_child0_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0_child0.setMargin(Edge.Left, 100); + root_child0_child0_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0_child0_child0.insertChild(root_child0_child0_child0_child0_child0, 0); const root_child0_child0_child0_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0_child0_child0.setWidth(50); root_child0_child0_child0_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0_child0_child0_child0.setPosition(Edge.Left, 50); root_child0_child0_child0_child0_child0_child0.setPosition(Edge.Top, 50); - root_child0_child0_child0_child0_child0_child0.setWidth(50); - root_child0_child0_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0_child0_child0.setPosition(Edge.Left, 50); root_child0_child0_child0_child0_child0.insertChild(root_child0_child0_child0_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -812,15 +813,15 @@ test('static_position_absolute_child_width_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setWidth("50%"); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -887,14 +888,14 @@ test('static_position_relative_child_width_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setWidth("50%"); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth("50%"); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -961,15 +962,15 @@ test('static_position_static_child_width_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setWidth("50%"); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1036,15 +1037,15 @@ test('static_position_absolute_child_height_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight("50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1111,14 +1112,14 @@ test('static_position_relative_child_height_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight("50%"); + root_child0_child0_child0.setWidth(50); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1185,15 +1186,15 @@ test('static_position_static_child_height_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight("50%"); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1260,16 +1261,16 @@ test('static_position_absolute_child_left_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setPosition(Edge.Left, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Left, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1336,15 +1337,15 @@ test('static_position_relative_child_left_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPosition(Edge.Left, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Left, "50%"); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1411,16 +1412,16 @@ test('static_position_static_child_left_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setPosition(Edge.Left, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Left, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1487,16 +1488,16 @@ test('static_position_absolute_child_right_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setPosition(Edge.Right, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Right, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1563,15 +1564,15 @@ test('static_position_relative_child_right_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPosition(Edge.Right, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Right, "50%"); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1638,16 +1639,16 @@ test('static_position_static_child_right_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setPosition(Edge.Right, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Right, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1714,16 +1715,16 @@ test('static_position_absolute_child_top_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setPosition(Edge.Top, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Top, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1790,15 +1791,15 @@ test('static_position_relative_child_top_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPosition(Edge.Top, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Top, "50%"); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1865,16 +1866,16 @@ test('static_position_static_child_top_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setPosition(Edge.Top, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Top, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -1941,16 +1942,16 @@ test('static_position_absolute_child_bottom_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setPosition(Edge.Bottom, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Bottom, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2017,15 +2018,15 @@ test('static_position_relative_child_bottom_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPosition(Edge.Bottom, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Bottom, "50%"); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2092,16 +2093,16 @@ test('static_position_static_child_bottom_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setPosition(Edge.Bottom, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPosition(Edge.Bottom, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2168,19 +2169,16 @@ test('static_position_absolute_child_margin_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, "50%"); - root_child0_child0_child0.setMargin(Edge.Top, "50%"); - root_child0_child0_child0.setMargin(Edge.Right, "50%"); - root_child0_child0_child0.setMargin(Edge.Bottom, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setMargin(Edge.All, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2247,18 +2245,15 @@ test('static_position_relative_child_margin_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setMargin(Edge.Left, "50%"); - root_child0_child0_child0.setMargin(Edge.Top, "50%"); - root_child0_child0_child0.setMargin(Edge.Right, "50%"); - root_child0_child0_child0.setMargin(Edge.Bottom, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setMargin(Edge.All, "50%"); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2325,19 +2320,16 @@ test('static_position_static_child_margin_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setMargin(Edge.Left, "50%"); - root_child0_child0_child0.setMargin(Edge.Top, "50%"); - root_child0_child0_child0.setMargin(Edge.Right, "50%"); - root_child0_child0_child0.setMargin(Edge.Bottom, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setMargin(Edge.All, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2404,19 +2396,16 @@ test('static_position_absolute_child_padding_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setPadding(Edge.Left, "50%"); - root_child0_child0_child0.setPadding(Edge.Top, "50%"); - root_child0_child0_child0.setPadding(Edge.Right, "50%"); - root_child0_child0_child0.setPadding(Edge.Bottom, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPadding(Edge.All, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2483,18 +2472,15 @@ test('static_position_relative_child_padding_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPadding(Edge.Left, "50%"); - root_child0_child0_child0.setPadding(Edge.Top, "50%"); - root_child0_child0_child0.setPadding(Edge.Right, "50%"); - root_child0_child0_child0.setPadding(Edge.Bottom, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPadding(Edge.All, "50%"); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2561,19 +2547,16 @@ test('static_position_static_child_padding_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setPadding(Edge.Left, "50%"); - root_child0_child0_child0.setPadding(Edge.Top, "50%"); - root_child0_child0_child0.setPadding(Edge.Right, "50%"); - root_child0_child0_child0.setPadding(Edge.Bottom, "50%"); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPadding(Edge.All, "50%"); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2640,15 +2623,15 @@ test('static_position_absolute_child_border_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2715,14 +2698,14 @@ test('static_position_relative_child_border_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2789,15 +2772,15 @@ test('static_position_static_child_border_percentage', () => { root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setWidth(50); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth(50); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2859,24 +2842,21 @@ test('static_position_absolute_child_containing_block_padding_box', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 100); - root_child0.setPadding(Edge.Top, 100); - root_child0.setPadding(Edge.Right, 100); - root_child0.setPadding(Edge.Bottom, 100); root_child0.setWidth(400); root_child0.setHeight(400); + root_child0.setPadding(Edge.All, 100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setWidth("50%"); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -2938,23 +2918,20 @@ test('static_position_relative_child_containing_block_padding_box', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 100); - root_child0.setPadding(Edge.Top, 100); - root_child0.setPadding(Edge.Right, 100); - root_child0.setPadding(Edge.Bottom, 100); root_child0.setWidth(400); root_child0.setHeight(400); + root_child0.setPadding(Edge.All, 100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setWidth("50%"); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth("50%"); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3016,24 +2993,21 @@ test('static_position_static_child_containing_block_padding_box', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 100); - root_child0.setPadding(Edge.Top, 100); - root_child0.setPadding(Edge.Right, 100); - root_child0.setPadding(Edge.Bottom, 100); root_child0.setWidth(400); root_child0.setHeight(400); + root_child0.setPadding(Edge.All, 100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Static); - root_child0_child0_child0.setWidth("50%"); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth("50%"); + root_child0_child0_child0.setPositionType(PositionType.Static); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3095,18 +3069,15 @@ test('static_position_absolute_child_containing_block_content_box', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 100); - root_child0.setPadding(Edge.Top, 100); - root_child0.setPadding(Edge.Right, 100); - root_child0.setPadding(Edge.Bottom, 100); root_child0.setWidth(400); root_child0.setHeight(400); + root_child0.setPadding(Edge.All, 100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0.setWidth("50%"); root_child0_child0.setHeight(50); + root_child0_child0.setWidth("50%"); + root_child0_child0.setPositionType(PositionType.Absolute); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3158,17 +3129,14 @@ test('static_position_relative_child_containing_block_content_box', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 100); - root_child0.setPadding(Edge.Top, 100); - root_child0.setPadding(Edge.Right, 100); - root_child0.setPadding(Edge.Bottom, 100); root_child0.setWidth(400); root_child0.setHeight(400); + root_child0.setPadding(Edge.All, 100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setWidth("50%"); root_child0_child0.setHeight(50); + root_child0_child0.setWidth("50%"); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3220,18 +3188,15 @@ test('static_position_static_child_containing_block_content_box', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 100); - root_child0.setPadding(Edge.Top, 100); - root_child0.setPadding(Edge.Right, 100); - root_child0.setPadding(Edge.Bottom, 100); root_child0.setWidth(400); root_child0.setHeight(400); + root_child0.setPadding(Edge.All, 100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth("50%"); root_child0_child0.setHeight(50); + root_child0_child0.setWidth("50%"); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3283,28 +3248,28 @@ test('static_position_containing_block_padding_and_border', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 9); + root_child0.setWidth(400); + root_child0.setHeight(400); root_child0.setPadding(Edge.Top, 8); root_child0.setPadding(Edge.Right, 1); root_child0.setPadding(Edge.Bottom, 4); - root_child0.setBorder(Edge.Left, 2); + root_child0.setPadding(Edge.Left, 9); root_child0.setBorder(Edge.Top, 5); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 4); - root_child0.setWidth(400); - root_child0.setHeight(400); + root_child0.setBorder(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setWidth("41%"); root_child0_child0_child0.setHeight("61%"); + root_child0_child0_child0.setWidth("41%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3366,58 +3331,58 @@ test('static_position_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); + root_child0.setWidth(500); + root_child0.setHeight(500); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); - root_child0.setWidth(500); - root_child0.setHeight(500); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setHeight(200); + root_child0_child0.setWidth(200); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); - root_child0_child0.setWidth(200); - root_child0_child0.setHeight(200); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setWidth("41%"); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.Left, 2); root_child0_child0_child0.setPosition(Edge.Right, 12); - root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("41%"); - root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3479,56 +3444,56 @@ test('static_position_no_position_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); + root_child0.setWidth(500); + root_child0.setHeight(500); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); - root_child0.setWidth(500); - root_child0.setHeight(500); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setHeight(200); + root_child0_child0.setWidth(200); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); - root_child0_child0.setWidth(200); - root_child0_child0.setHeight(200); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setWidth("41%"); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("41%"); - root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3590,57 +3555,57 @@ test('static_position_zero_for_inset_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); + root_child0.setWidth(500); + root_child0.setHeight(500); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); - root_child0.setWidth(500); - root_child0.setHeight(500); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setHeight(200); + root_child0_child0.setWidth(200); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); - root_child0_child0.setWidth(200); - root_child0_child0.setHeight(200); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setWidth("41%"); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.Left, "0%"); - root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("41%"); - root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3702,57 +3667,57 @@ test('static_position_start_inset_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); + root_child0.setWidth(500); + root_child0.setHeight(500); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); - root_child0.setWidth(500); - root_child0.setHeight(500); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setHeight(200); + root_child0_child0.setWidth(200); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); - root_child0_child0.setWidth(200); - root_child0_child0.setHeight(200); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setWidth("41%"); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.Start, 12); - root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("41%"); - root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3814,57 +3779,57 @@ test('static_position_end_inset_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); + root_child0.setWidth(500); + root_child0.setHeight(500); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); - root_child0.setWidth(500); - root_child0.setHeight(500); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setHeight(200); + root_child0_child0.setWidth(200); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); - root_child0_child0.setWidth(200); - root_child0_child0.setHeight(200); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setWidth("41%"); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.End, 4); - root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("41%"); - root_child0_child0_child0.setHeight("63%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -3926,69 +3891,69 @@ test('static_position_row_reverse_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexDirection(FlexDirection.RowReverse); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); + root_child0_child0.setFlexDirection(FlexDirection.RowReverse); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0.setHeight("12%"); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setHeight("12%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4060,69 +4025,69 @@ test('static_position_column_reverse_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setFlexDirection(FlexDirection.ColumnReverse); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); + root_child0_child0.setFlexDirection(FlexDirection.ColumnReverse); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0.setWidth("21%"); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("21%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4194,134 +4159,134 @@ test('static_position_justify_flex_start_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); - root_child0.insertChild(root_child0_child0, 0); - - const root_child0_child0_child0 = Yoga.Node.create(config); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); + root_child0.insertChild(root_child0_child0, 0); + + const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0.setWidth("21%"); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("21%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); - root_child0_child0_child1.setMargin(Edge.Left, 9); + root_child0_child0_child1.setWidth("10%"); root_child0_child0_child1.setMargin(Edge.Top, 12); root_child0_child0_child1.setMargin(Edge.Right, 4); root_child0_child0_child1.setMargin(Edge.Bottom, 7); - root_child0_child0_child1.setPadding(Edge.Left, 5); - root_child0_child0_child1.setPadding(Edge.Top, 3); - root_child0_child0_child1.setPadding(Edge.Right, 8); - root_child0_child0_child1.setPadding(Edge.Bottom, 10); - root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setMargin(Edge.Left, 9); root_child0_child0_child1.setBorder(Edge.Top, 1); root_child0_child0_child1.setBorder(Edge.Right, 5); root_child0_child0_child1.setBorder(Edge.Bottom, 9); - root_child0_child0_child1.setWidth("10%"); + root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setPadding(Edge.Top, 3); + root_child0_child0_child1.setPadding(Edge.Right, 8); + root_child0_child0_child1.setPadding(Edge.Bottom, 10); + root_child0_child0_child1.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child1, 1); const root_child0_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child0_child1_child0.setMargin(Edge.Left, 9); + root_child0_child0_child1_child0.setWidth(100); + root_child0_child0_child1_child0.setHeight(50); root_child0_child0_child1_child0.setMargin(Edge.Top, 12); root_child0_child0_child1_child0.setMargin(Edge.Right, 4); root_child0_child0_child1_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child1_child0.setPadding(Edge.Left, 5); - root_child0_child0_child1_child0.setPadding(Edge.Top, 3); - root_child0_child0_child1_child0.setPadding(Edge.Right, 8); - root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setMargin(Edge.Left, 9); root_child0_child0_child1_child0.setBorder(Edge.Top, 1); root_child0_child0_child1_child0.setBorder(Edge.Right, 5); root_child0_child0_child1_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child1_child0.setWidth(100); - root_child0_child0_child1_child0.setHeight(50); + root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setPadding(Edge.Top, 3); + root_child0_child0_child1_child0.setPadding(Edge.Right, 8); + root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child1_child0.setPadding(Edge.Left, 5); root_child0_child0_child1.insertChild(root_child0_child0_child1_child0, 0); const root_child0_child0_child2 = Yoga.Node.create(config); - root_child0_child0_child2.setMargin(Edge.Left, 9); + root_child0_child0_child2.setWidth("10%"); root_child0_child0_child2.setMargin(Edge.Top, 12); root_child0_child0_child2.setMargin(Edge.Right, 4); root_child0_child0_child2.setMargin(Edge.Bottom, 7); - root_child0_child0_child2.setPadding(Edge.Left, 5); - root_child0_child0_child2.setPadding(Edge.Top, 3); - root_child0_child0_child2.setPadding(Edge.Right, 8); - root_child0_child0_child2.setPadding(Edge.Bottom, 10); - root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setMargin(Edge.Left, 9); root_child0_child0_child2.setBorder(Edge.Top, 1); root_child0_child0_child2.setBorder(Edge.Right, 5); root_child0_child0_child2.setBorder(Edge.Bottom, 9); - root_child0_child0_child2.setWidth("10%"); + root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setPadding(Edge.Top, 3); + root_child0_child0_child2.setPadding(Edge.Right, 8); + root_child0_child0_child2.setPadding(Edge.Bottom, 10); + root_child0_child0_child2.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child2, 2); const root_child0_child0_child2_child0 = Yoga.Node.create(config); - root_child0_child0_child2_child0.setMargin(Edge.Left, 9); + root_child0_child0_child2_child0.setWidth(100); + root_child0_child0_child2_child0.setHeight(50); root_child0_child0_child2_child0.setMargin(Edge.Top, 12); root_child0_child0_child2_child0.setMargin(Edge.Right, 4); root_child0_child0_child2_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child2_child0.setPadding(Edge.Left, 5); - root_child0_child0_child2_child0.setPadding(Edge.Top, 3); - root_child0_child0_child2_child0.setPadding(Edge.Right, 8); - root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setMargin(Edge.Left, 9); root_child0_child0_child2_child0.setBorder(Edge.Top, 1); root_child0_child0_child2_child0.setBorder(Edge.Right, 5); root_child0_child0_child2_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child2_child0.setWidth(100); - root_child0_child0_child2_child0.setHeight(50); + root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setPadding(Edge.Top, 3); + root_child0_child0_child2_child0.setPadding(Edge.Right, 8); + root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child2_child0.setPadding(Edge.Left, 5); root_child0_child0_child2.insertChild(root_child0_child0_child2_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4433,135 +4398,135 @@ test('static_position_justify_flex_start_position_set_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); + root_child0_child0_child0.setWidth("21%"); root_child0_child0_child0.setPosition(Edge.Right, 30); - root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("21%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); - root_child0_child0_child1.setMargin(Edge.Left, 9); + root_child0_child0_child1.setWidth("10%"); root_child0_child0_child1.setMargin(Edge.Top, 12); root_child0_child0_child1.setMargin(Edge.Right, 4); root_child0_child0_child1.setMargin(Edge.Bottom, 7); - root_child0_child0_child1.setPadding(Edge.Left, 5); - root_child0_child0_child1.setPadding(Edge.Top, 3); - root_child0_child0_child1.setPadding(Edge.Right, 8); - root_child0_child0_child1.setPadding(Edge.Bottom, 10); - root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setMargin(Edge.Left, 9); root_child0_child0_child1.setBorder(Edge.Top, 1); root_child0_child0_child1.setBorder(Edge.Right, 5); root_child0_child0_child1.setBorder(Edge.Bottom, 9); - root_child0_child0_child1.setWidth("10%"); + root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setPadding(Edge.Top, 3); + root_child0_child0_child1.setPadding(Edge.Right, 8); + root_child0_child0_child1.setPadding(Edge.Bottom, 10); + root_child0_child0_child1.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child1, 1); const root_child0_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child0_child1_child0.setMargin(Edge.Left, 9); + root_child0_child0_child1_child0.setWidth(100); + root_child0_child0_child1_child0.setHeight(50); root_child0_child0_child1_child0.setMargin(Edge.Top, 12); root_child0_child0_child1_child0.setMargin(Edge.Right, 4); root_child0_child0_child1_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child1_child0.setPadding(Edge.Left, 5); - root_child0_child0_child1_child0.setPadding(Edge.Top, 3); - root_child0_child0_child1_child0.setPadding(Edge.Right, 8); - root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setMargin(Edge.Left, 9); root_child0_child0_child1_child0.setBorder(Edge.Top, 1); root_child0_child0_child1_child0.setBorder(Edge.Right, 5); root_child0_child0_child1_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child1_child0.setWidth(100); - root_child0_child0_child1_child0.setHeight(50); + root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setPadding(Edge.Top, 3); + root_child0_child0_child1_child0.setPadding(Edge.Right, 8); + root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child1_child0.setPadding(Edge.Left, 5); root_child0_child0_child1.insertChild(root_child0_child0_child1_child0, 0); const root_child0_child0_child2 = Yoga.Node.create(config); - root_child0_child0_child2.setMargin(Edge.Left, 9); + root_child0_child0_child2.setWidth("10%"); root_child0_child0_child2.setMargin(Edge.Top, 12); root_child0_child0_child2.setMargin(Edge.Right, 4); root_child0_child0_child2.setMargin(Edge.Bottom, 7); - root_child0_child0_child2.setPadding(Edge.Left, 5); - root_child0_child0_child2.setPadding(Edge.Top, 3); - root_child0_child0_child2.setPadding(Edge.Right, 8); - root_child0_child0_child2.setPadding(Edge.Bottom, 10); - root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setMargin(Edge.Left, 9); root_child0_child0_child2.setBorder(Edge.Top, 1); root_child0_child0_child2.setBorder(Edge.Right, 5); root_child0_child0_child2.setBorder(Edge.Bottom, 9); - root_child0_child0_child2.setWidth("10%"); + root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setPadding(Edge.Top, 3); + root_child0_child0_child2.setPadding(Edge.Right, 8); + root_child0_child0_child2.setPadding(Edge.Bottom, 10); + root_child0_child0_child2.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child2, 2); const root_child0_child0_child2_child0 = Yoga.Node.create(config); - root_child0_child0_child2_child0.setMargin(Edge.Left, 9); + root_child0_child0_child2_child0.setWidth(100); + root_child0_child0_child2_child0.setHeight(50); root_child0_child0_child2_child0.setMargin(Edge.Top, 12); root_child0_child0_child2_child0.setMargin(Edge.Right, 4); root_child0_child0_child2_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child2_child0.setPadding(Edge.Left, 5); - root_child0_child0_child2_child0.setPadding(Edge.Top, 3); - root_child0_child0_child2_child0.setPadding(Edge.Right, 8); - root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setMargin(Edge.Left, 9); root_child0_child0_child2_child0.setBorder(Edge.Top, 1); root_child0_child0_child2_child0.setBorder(Edge.Right, 5); root_child0_child0_child2_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child2_child0.setWidth(100); - root_child0_child0_child2_child0.setHeight(50); + root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setPadding(Edge.Top, 3); + root_child0_child0_child2_child0.setPadding(Edge.Right, 8); + root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child2_child0.setPadding(Edge.Left, 5); root_child0_child0_child2.insertChild(root_child0_child0_child2_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4673,68 +4638,68 @@ test('static_position_no_definite_size_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.Left, "23%"); - root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4806,69 +4771,69 @@ test('static_position_both_insets_set_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0_child0.setPosition(Edge.Left, "23%"); root_child0_child0_child0.setPosition(Edge.Right, 13); - root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -4940,135 +4905,135 @@ test('static_position_justify_center_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setJustifyContent(Justify.Center); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); + root_child0_child0.setJustifyContent(Justify.Center); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0.setWidth("21%"); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("21%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); - root_child0_child0_child1.setMargin(Edge.Left, 9); + root_child0_child0_child1.setWidth("10%"); root_child0_child0_child1.setMargin(Edge.Top, 12); root_child0_child0_child1.setMargin(Edge.Right, 4); root_child0_child0_child1.setMargin(Edge.Bottom, 7); - root_child0_child0_child1.setPadding(Edge.Left, 5); - root_child0_child0_child1.setPadding(Edge.Top, 3); - root_child0_child0_child1.setPadding(Edge.Right, 8); - root_child0_child0_child1.setPadding(Edge.Bottom, 10); - root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setMargin(Edge.Left, 9); root_child0_child0_child1.setBorder(Edge.Top, 1); root_child0_child0_child1.setBorder(Edge.Right, 5); root_child0_child0_child1.setBorder(Edge.Bottom, 9); - root_child0_child0_child1.setWidth("10%"); + root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setPadding(Edge.Top, 3); + root_child0_child0_child1.setPadding(Edge.Right, 8); + root_child0_child0_child1.setPadding(Edge.Bottom, 10); + root_child0_child0_child1.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child1, 1); const root_child0_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child0_child1_child0.setMargin(Edge.Left, 9); + root_child0_child0_child1_child0.setWidth(100); + root_child0_child0_child1_child0.setHeight(50); root_child0_child0_child1_child0.setMargin(Edge.Top, 12); root_child0_child0_child1_child0.setMargin(Edge.Right, 4); root_child0_child0_child1_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child1_child0.setPadding(Edge.Left, 5); - root_child0_child0_child1_child0.setPadding(Edge.Top, 3); - root_child0_child0_child1_child0.setPadding(Edge.Right, 8); - root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setMargin(Edge.Left, 9); root_child0_child0_child1_child0.setBorder(Edge.Top, 1); root_child0_child0_child1_child0.setBorder(Edge.Right, 5); root_child0_child0_child1_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child1_child0.setWidth(100); - root_child0_child0_child1_child0.setHeight(50); + root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setPadding(Edge.Top, 3); + root_child0_child0_child1_child0.setPadding(Edge.Right, 8); + root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child1_child0.setPadding(Edge.Left, 5); root_child0_child0_child1.insertChild(root_child0_child0_child1_child0, 0); const root_child0_child0_child2 = Yoga.Node.create(config); - root_child0_child0_child2.setMargin(Edge.Left, 9); + root_child0_child0_child2.setWidth("10%"); root_child0_child0_child2.setMargin(Edge.Top, 12); root_child0_child0_child2.setMargin(Edge.Right, 4); root_child0_child0_child2.setMargin(Edge.Bottom, 7); - root_child0_child0_child2.setPadding(Edge.Left, 5); - root_child0_child0_child2.setPadding(Edge.Top, 3); - root_child0_child0_child2.setPadding(Edge.Right, 8); - root_child0_child0_child2.setPadding(Edge.Bottom, 10); - root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setMargin(Edge.Left, 9); root_child0_child0_child2.setBorder(Edge.Top, 1); root_child0_child0_child2.setBorder(Edge.Right, 5); root_child0_child0_child2.setBorder(Edge.Bottom, 9); - root_child0_child0_child2.setWidth("10%"); + root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setPadding(Edge.Top, 3); + root_child0_child0_child2.setPadding(Edge.Right, 8); + root_child0_child0_child2.setPadding(Edge.Bottom, 10); + root_child0_child0_child2.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child2, 2); const root_child0_child0_child2_child0 = Yoga.Node.create(config); - root_child0_child0_child2_child0.setMargin(Edge.Left, 9); + root_child0_child0_child2_child0.setWidth(100); + root_child0_child0_child2_child0.setHeight(50); root_child0_child0_child2_child0.setMargin(Edge.Top, 12); root_child0_child0_child2_child0.setMargin(Edge.Right, 4); root_child0_child0_child2_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child2_child0.setPadding(Edge.Left, 5); - root_child0_child0_child2_child0.setPadding(Edge.Top, 3); - root_child0_child0_child2_child0.setPadding(Edge.Right, 8); - root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setMargin(Edge.Left, 9); root_child0_child0_child2_child0.setBorder(Edge.Top, 1); root_child0_child0_child2_child0.setBorder(Edge.Right, 5); root_child0_child0_child2_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child2_child0.setWidth(100); - root_child0_child0_child2_child0.setHeight(50); + root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setPadding(Edge.Top, 3); + root_child0_child0_child2_child0.setPadding(Edge.Right, 8); + root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child2_child0.setPadding(Edge.Left, 5); root_child0_child0_child2.insertChild(root_child0_child0_child2_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5180,135 +5145,135 @@ test('static_position_justify_flex_end_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); - root_child0.setMargin(Edge.Right, 9); - root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Right, 9); + root_child0.setMargin(Edge.Bottom, 1); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setJustifyContent(Justify.FlexEnd); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); + root_child0_child0.setJustifyContent(Justify.FlexEnd); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0.setWidth("21%"); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("21%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); - root_child0_child0_child1.setMargin(Edge.Left, 9); + root_child0_child0_child1.setWidth("10%"); root_child0_child0_child1.setMargin(Edge.Top, 12); root_child0_child0_child1.setMargin(Edge.Right, 4); root_child0_child0_child1.setMargin(Edge.Bottom, 7); - root_child0_child0_child1.setPadding(Edge.Left, 5); - root_child0_child0_child1.setPadding(Edge.Top, 3); - root_child0_child0_child1.setPadding(Edge.Right, 8); - root_child0_child0_child1.setPadding(Edge.Bottom, 10); - root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setMargin(Edge.Left, 9); root_child0_child0_child1.setBorder(Edge.Top, 1); root_child0_child0_child1.setBorder(Edge.Right, 5); root_child0_child0_child1.setBorder(Edge.Bottom, 9); - root_child0_child0_child1.setWidth("10%"); + root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setPadding(Edge.Top, 3); + root_child0_child0_child1.setPadding(Edge.Right, 8); + root_child0_child0_child1.setPadding(Edge.Bottom, 10); + root_child0_child0_child1.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child1, 1); const root_child0_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child0_child1_child0.setMargin(Edge.Left, 9); + root_child0_child0_child1_child0.setWidth(100); + root_child0_child0_child1_child0.setHeight(50); root_child0_child0_child1_child0.setMargin(Edge.Top, 12); root_child0_child0_child1_child0.setMargin(Edge.Right, 4); root_child0_child0_child1_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child1_child0.setPadding(Edge.Left, 5); - root_child0_child0_child1_child0.setPadding(Edge.Top, 3); - root_child0_child0_child1_child0.setPadding(Edge.Right, 8); - root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setMargin(Edge.Left, 9); root_child0_child0_child1_child0.setBorder(Edge.Top, 1); root_child0_child0_child1_child0.setBorder(Edge.Right, 5); root_child0_child0_child1_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child1_child0.setWidth(100); - root_child0_child0_child1_child0.setHeight(50); + root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setPadding(Edge.Top, 3); + root_child0_child0_child1_child0.setPadding(Edge.Right, 8); + root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child1_child0.setPadding(Edge.Left, 5); root_child0_child0_child1.insertChild(root_child0_child0_child1_child0, 0); const root_child0_child0_child2 = Yoga.Node.create(config); - root_child0_child0_child2.setMargin(Edge.Left, 9); + root_child0_child0_child2.setWidth("10%"); root_child0_child0_child2.setMargin(Edge.Top, 12); root_child0_child0_child2.setMargin(Edge.Right, 4); root_child0_child0_child2.setMargin(Edge.Bottom, 7); - root_child0_child0_child2.setPadding(Edge.Left, 5); - root_child0_child0_child2.setPadding(Edge.Top, 3); - root_child0_child0_child2.setPadding(Edge.Right, 8); - root_child0_child0_child2.setPadding(Edge.Bottom, 10); - root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setMargin(Edge.Left, 9); root_child0_child0_child2.setBorder(Edge.Top, 1); root_child0_child0_child2.setBorder(Edge.Right, 5); root_child0_child0_child2.setBorder(Edge.Bottom, 9); - root_child0_child0_child2.setWidth("10%"); + root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setPadding(Edge.Top, 3); + root_child0_child0_child2.setPadding(Edge.Right, 8); + root_child0_child0_child2.setPadding(Edge.Bottom, 10); + root_child0_child0_child2.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child2, 2); const root_child0_child0_child2_child0 = Yoga.Node.create(config); - root_child0_child0_child2_child0.setMargin(Edge.Left, 9); + root_child0_child0_child2_child0.setWidth(100); + root_child0_child0_child2_child0.setHeight(50); root_child0_child0_child2_child0.setMargin(Edge.Top, 12); root_child0_child0_child2_child0.setMargin(Edge.Right, 4); root_child0_child0_child2_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child2_child0.setPadding(Edge.Left, 5); - root_child0_child0_child2_child0.setPadding(Edge.Top, 3); - root_child0_child0_child2_child0.setPadding(Edge.Right, 8); - root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setMargin(Edge.Left, 9); root_child0_child0_child2_child0.setBorder(Edge.Top, 1); root_child0_child0_child2_child0.setBorder(Edge.Right, 5); root_child0_child0_child2_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child2_child0.setWidth(100); - root_child0_child0_child2_child0.setHeight(50); + root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setPadding(Edge.Top, 3); + root_child0_child0_child2_child0.setPadding(Edge.Right, 8); + root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child2_child0.setPadding(Edge.Left, 5); root_child0_child0_child2.insertChild(root_child0_child0_child2_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5420,135 +5385,135 @@ test('static_position_align_flex_start_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setAlignItems(Align.FlexStart); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); + root_child0_child0.setAlignItems(Align.FlexStart); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0.setWidth("21%"); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("21%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); - root_child0_child0_child1.setMargin(Edge.Left, 9); + root_child0_child0_child1.setWidth("10%"); root_child0_child0_child1.setMargin(Edge.Top, 12); root_child0_child0_child1.setMargin(Edge.Right, 4); root_child0_child0_child1.setMargin(Edge.Bottom, 7); - root_child0_child0_child1.setPadding(Edge.Left, 5); - root_child0_child0_child1.setPadding(Edge.Top, 3); - root_child0_child0_child1.setPadding(Edge.Right, 8); - root_child0_child0_child1.setPadding(Edge.Bottom, 10); - root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setMargin(Edge.Left, 9); root_child0_child0_child1.setBorder(Edge.Top, 1); root_child0_child0_child1.setBorder(Edge.Right, 5); root_child0_child0_child1.setBorder(Edge.Bottom, 9); - root_child0_child0_child1.setWidth("10%"); + root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setPadding(Edge.Top, 3); + root_child0_child0_child1.setPadding(Edge.Right, 8); + root_child0_child0_child1.setPadding(Edge.Bottom, 10); + root_child0_child0_child1.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child1, 1); const root_child0_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child0_child1_child0.setMargin(Edge.Left, 9); + root_child0_child0_child1_child0.setWidth(100); + root_child0_child0_child1_child0.setHeight(50); root_child0_child0_child1_child0.setMargin(Edge.Top, 12); root_child0_child0_child1_child0.setMargin(Edge.Right, 4); root_child0_child0_child1_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child1_child0.setPadding(Edge.Left, 5); - root_child0_child0_child1_child0.setPadding(Edge.Top, 3); - root_child0_child0_child1_child0.setPadding(Edge.Right, 8); - root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setMargin(Edge.Left, 9); root_child0_child0_child1_child0.setBorder(Edge.Top, 1); root_child0_child0_child1_child0.setBorder(Edge.Right, 5); root_child0_child0_child1_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child1_child0.setWidth(100); - root_child0_child0_child1_child0.setHeight(50); + root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setPadding(Edge.Top, 3); + root_child0_child0_child1_child0.setPadding(Edge.Right, 8); + root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child1_child0.setPadding(Edge.Left, 5); root_child0_child0_child1.insertChild(root_child0_child0_child1_child0, 0); const root_child0_child0_child2 = Yoga.Node.create(config); - root_child0_child0_child2.setMargin(Edge.Left, 9); + root_child0_child0_child2.setWidth("10%"); root_child0_child0_child2.setMargin(Edge.Top, 12); root_child0_child0_child2.setMargin(Edge.Right, 4); root_child0_child0_child2.setMargin(Edge.Bottom, 7); - root_child0_child0_child2.setPadding(Edge.Left, 5); - root_child0_child0_child2.setPadding(Edge.Top, 3); - root_child0_child0_child2.setPadding(Edge.Right, 8); - root_child0_child0_child2.setPadding(Edge.Bottom, 10); - root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setMargin(Edge.Left, 9); root_child0_child0_child2.setBorder(Edge.Top, 1); root_child0_child0_child2.setBorder(Edge.Right, 5); root_child0_child0_child2.setBorder(Edge.Bottom, 9); - root_child0_child0_child2.setWidth("10%"); + root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setPadding(Edge.Top, 3); + root_child0_child0_child2.setPadding(Edge.Right, 8); + root_child0_child0_child2.setPadding(Edge.Bottom, 10); + root_child0_child0_child2.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child2, 2); const root_child0_child0_child2_child0 = Yoga.Node.create(config); - root_child0_child0_child2_child0.setMargin(Edge.Left, 9); + root_child0_child0_child2_child0.setWidth(100); + root_child0_child0_child2_child0.setHeight(50); root_child0_child0_child2_child0.setMargin(Edge.Top, 12); root_child0_child0_child2_child0.setMargin(Edge.Right, 4); root_child0_child0_child2_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child2_child0.setPadding(Edge.Left, 5); - root_child0_child0_child2_child0.setPadding(Edge.Top, 3); - root_child0_child0_child2_child0.setPadding(Edge.Right, 8); - root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setMargin(Edge.Left, 9); root_child0_child0_child2_child0.setBorder(Edge.Top, 1); root_child0_child0_child2_child0.setBorder(Edge.Right, 5); root_child0_child0_child2_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child2_child0.setWidth(100); - root_child0_child0_child2_child0.setHeight(50); + root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setPadding(Edge.Top, 3); + root_child0_child0_child2_child0.setPadding(Edge.Right, 8); + root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child2_child0.setPadding(Edge.Left, 5); root_child0_child0_child2.insertChild(root_child0_child0_child2_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5660,135 +5625,135 @@ test('static_position_align_center_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setAlignItems(Align.Center); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); + root_child0_child0.setAlignItems(Align.Center); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0.setWidth("21%"); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("21%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); - root_child0_child0_child1.setMargin(Edge.Left, 9); + root_child0_child0_child1.setWidth("10%"); root_child0_child0_child1.setMargin(Edge.Top, 12); root_child0_child0_child1.setMargin(Edge.Right, 4); root_child0_child0_child1.setMargin(Edge.Bottom, 7); - root_child0_child0_child1.setPadding(Edge.Left, 5); - root_child0_child0_child1.setPadding(Edge.Top, 3); - root_child0_child0_child1.setPadding(Edge.Right, 8); - root_child0_child0_child1.setPadding(Edge.Bottom, 10); - root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setMargin(Edge.Left, 9); root_child0_child0_child1.setBorder(Edge.Top, 1); root_child0_child0_child1.setBorder(Edge.Right, 5); root_child0_child0_child1.setBorder(Edge.Bottom, 9); - root_child0_child0_child1.setWidth("10%"); + root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setPadding(Edge.Top, 3); + root_child0_child0_child1.setPadding(Edge.Right, 8); + root_child0_child0_child1.setPadding(Edge.Bottom, 10); + root_child0_child0_child1.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child1, 1); const root_child0_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child0_child1_child0.setMargin(Edge.Left, 9); + root_child0_child0_child1_child0.setWidth(100); + root_child0_child0_child1_child0.setHeight(50); root_child0_child0_child1_child0.setMargin(Edge.Top, 12); root_child0_child0_child1_child0.setMargin(Edge.Right, 4); root_child0_child0_child1_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child1_child0.setPadding(Edge.Left, 5); - root_child0_child0_child1_child0.setPadding(Edge.Top, 3); - root_child0_child0_child1_child0.setPadding(Edge.Right, 8); - root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setMargin(Edge.Left, 9); root_child0_child0_child1_child0.setBorder(Edge.Top, 1); root_child0_child0_child1_child0.setBorder(Edge.Right, 5); root_child0_child0_child1_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child1_child0.setWidth(100); - root_child0_child0_child1_child0.setHeight(50); + root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setPadding(Edge.Top, 3); + root_child0_child0_child1_child0.setPadding(Edge.Right, 8); + root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child1_child0.setPadding(Edge.Left, 5); root_child0_child0_child1.insertChild(root_child0_child0_child1_child0, 0); const root_child0_child0_child2 = Yoga.Node.create(config); - root_child0_child0_child2.setMargin(Edge.Left, 9); + root_child0_child0_child2.setWidth("10%"); root_child0_child0_child2.setMargin(Edge.Top, 12); root_child0_child0_child2.setMargin(Edge.Right, 4); root_child0_child0_child2.setMargin(Edge.Bottom, 7); - root_child0_child0_child2.setPadding(Edge.Left, 5); - root_child0_child0_child2.setPadding(Edge.Top, 3); - root_child0_child0_child2.setPadding(Edge.Right, 8); - root_child0_child0_child2.setPadding(Edge.Bottom, 10); - root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setMargin(Edge.Left, 9); root_child0_child0_child2.setBorder(Edge.Top, 1); root_child0_child0_child2.setBorder(Edge.Right, 5); root_child0_child0_child2.setBorder(Edge.Bottom, 9); - root_child0_child0_child2.setWidth("10%"); + root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setPadding(Edge.Top, 3); + root_child0_child0_child2.setPadding(Edge.Right, 8); + root_child0_child0_child2.setPadding(Edge.Bottom, 10); + root_child0_child0_child2.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child2, 2); const root_child0_child0_child2_child0 = Yoga.Node.create(config); - root_child0_child0_child2_child0.setMargin(Edge.Left, 9); + root_child0_child0_child2_child0.setWidth(100); + root_child0_child0_child2_child0.setHeight(50); root_child0_child0_child2_child0.setMargin(Edge.Top, 12); root_child0_child0_child2_child0.setMargin(Edge.Right, 4); root_child0_child0_child2_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child2_child0.setPadding(Edge.Left, 5); - root_child0_child0_child2_child0.setPadding(Edge.Top, 3); - root_child0_child0_child2_child0.setPadding(Edge.Right, 8); - root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setMargin(Edge.Left, 9); root_child0_child0_child2_child0.setBorder(Edge.Top, 1); root_child0_child0_child2_child0.setBorder(Edge.Right, 5); root_child0_child0_child2_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child2_child0.setWidth(100); - root_child0_child0_child2_child0.setHeight(50); + root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setPadding(Edge.Top, 3); + root_child0_child0_child2_child0.setPadding(Edge.Right, 8); + root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child2_child0.setPadding(Edge.Left, 5); root_child0_child0_child2.insertChild(root_child0_child0_child2_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -5900,135 +5865,135 @@ test('static_position_align_flex_end_amalgamation', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setMargin(Edge.Left, 4); root_child0.setMargin(Edge.Top, 5); root_child0.setMargin(Edge.Right, 9); root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 2); - root_child0.setPadding(Edge.Top, 9); - root_child0.setPadding(Edge.Right, 11); - root_child0.setPadding(Edge.Bottom, 13); - root_child0.setBorder(Edge.Left, 5); + root_child0.setMargin(Edge.Left, 4); root_child0.setBorder(Edge.Top, 6); root_child0.setBorder(Edge.Right, 7); root_child0.setBorder(Edge.Bottom, 8); + root_child0.setBorder(Edge.Left, 5); + root_child0.setPadding(Edge.Top, 9); + root_child0.setPadding(Edge.Right, 11); + root_child0.setPadding(Edge.Bottom, 13); + root_child0.setPadding(Edge.Left, 2); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setAlignItems(Align.FlexEnd); root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setMargin(Edge.Top, 6); root_child0_child0.setMargin(Edge.Right, 3); root_child0_child0.setMargin(Edge.Bottom, 9); - root_child0_child0.setPadding(Edge.Left, 1); - root_child0_child0.setPadding(Edge.Top, 7); - root_child0_child0.setPadding(Edge.Right, 9); - root_child0_child0.setPadding(Edge.Bottom, 4); - root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setMargin(Edge.Left, 8); root_child0_child0.setBorder(Edge.Top, 10); root_child0_child0.setBorder(Edge.Right, 2); root_child0_child0.setBorder(Edge.Bottom, 1); + root_child0_child0.setBorder(Edge.Left, 8); + root_child0_child0.setPadding(Edge.Top, 7); + root_child0_child0.setPadding(Edge.Right, 9); + root_child0_child0.setPadding(Edge.Bottom, 4); + root_child0_child0.setPadding(Edge.Left, 1); + root_child0_child0.setAlignItems(Align.FlexEnd); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0.setWidth("21%"); root_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0.setWidth("21%"); + root_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0_child0.setMargin(Edge.Left, 9); + root_child0_child0_child0_child0.setWidth(100); + root_child0_child0_child0_child0.setHeight(50); root_child0_child0_child0_child0.setMargin(Edge.Top, 12); root_child0_child0_child0_child0.setMargin(Edge.Right, 4); root_child0_child0_child0_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child0_child0.setPadding(Edge.Left, 5); - root_child0_child0_child0_child0.setPadding(Edge.Top, 3); - root_child0_child0_child0_child0.setPadding(Edge.Right, 8); - root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setMargin(Edge.Left, 9); root_child0_child0_child0_child0.setBorder(Edge.Top, 1); root_child0_child0_child0_child0.setBorder(Edge.Right, 5); root_child0_child0_child0_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child0_child0.setWidth(100); - root_child0_child0_child0_child0.setHeight(50); + root_child0_child0_child0_child0.setBorder(Edge.Left, 2); + root_child0_child0_child0_child0.setPadding(Edge.Top, 3); + root_child0_child0_child0_child0.setPadding(Edge.Right, 8); + root_child0_child0_child0_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child0_child0.setPadding(Edge.Left, 5); root_child0_child0_child0.insertChild(root_child0_child0_child0_child0, 0); const root_child0_child0_child1 = Yoga.Node.create(config); - root_child0_child0_child1.setMargin(Edge.Left, 9); + root_child0_child0_child1.setWidth("10%"); root_child0_child0_child1.setMargin(Edge.Top, 12); root_child0_child0_child1.setMargin(Edge.Right, 4); root_child0_child0_child1.setMargin(Edge.Bottom, 7); - root_child0_child0_child1.setPadding(Edge.Left, 5); - root_child0_child0_child1.setPadding(Edge.Top, 3); - root_child0_child0_child1.setPadding(Edge.Right, 8); - root_child0_child0_child1.setPadding(Edge.Bottom, 10); - root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setMargin(Edge.Left, 9); root_child0_child0_child1.setBorder(Edge.Top, 1); root_child0_child0_child1.setBorder(Edge.Right, 5); root_child0_child0_child1.setBorder(Edge.Bottom, 9); - root_child0_child0_child1.setWidth("10%"); + root_child0_child0_child1.setBorder(Edge.Left, 2); + root_child0_child0_child1.setPadding(Edge.Top, 3); + root_child0_child0_child1.setPadding(Edge.Right, 8); + root_child0_child0_child1.setPadding(Edge.Bottom, 10); + root_child0_child0_child1.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child1, 1); const root_child0_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child0_child1_child0.setMargin(Edge.Left, 9); + root_child0_child0_child1_child0.setWidth(100); + root_child0_child0_child1_child0.setHeight(50); root_child0_child0_child1_child0.setMargin(Edge.Top, 12); root_child0_child0_child1_child0.setMargin(Edge.Right, 4); root_child0_child0_child1_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child1_child0.setPadding(Edge.Left, 5); - root_child0_child0_child1_child0.setPadding(Edge.Top, 3); - root_child0_child0_child1_child0.setPadding(Edge.Right, 8); - root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setMargin(Edge.Left, 9); root_child0_child0_child1_child0.setBorder(Edge.Top, 1); root_child0_child0_child1_child0.setBorder(Edge.Right, 5); root_child0_child0_child1_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child1_child0.setWidth(100); - root_child0_child0_child1_child0.setHeight(50); + root_child0_child0_child1_child0.setBorder(Edge.Left, 2); + root_child0_child0_child1_child0.setPadding(Edge.Top, 3); + root_child0_child0_child1_child0.setPadding(Edge.Right, 8); + root_child0_child0_child1_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child1_child0.setPadding(Edge.Left, 5); root_child0_child0_child1.insertChild(root_child0_child0_child1_child0, 0); const root_child0_child0_child2 = Yoga.Node.create(config); - root_child0_child0_child2.setMargin(Edge.Left, 9); + root_child0_child0_child2.setWidth("10%"); root_child0_child0_child2.setMargin(Edge.Top, 12); root_child0_child0_child2.setMargin(Edge.Right, 4); root_child0_child0_child2.setMargin(Edge.Bottom, 7); - root_child0_child0_child2.setPadding(Edge.Left, 5); - root_child0_child0_child2.setPadding(Edge.Top, 3); - root_child0_child0_child2.setPadding(Edge.Right, 8); - root_child0_child0_child2.setPadding(Edge.Bottom, 10); - root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setMargin(Edge.Left, 9); root_child0_child0_child2.setBorder(Edge.Top, 1); root_child0_child0_child2.setBorder(Edge.Right, 5); root_child0_child0_child2.setBorder(Edge.Bottom, 9); - root_child0_child0_child2.setWidth("10%"); + root_child0_child0_child2.setBorder(Edge.Left, 2); + root_child0_child0_child2.setPadding(Edge.Top, 3); + root_child0_child0_child2.setPadding(Edge.Right, 8); + root_child0_child0_child2.setPadding(Edge.Bottom, 10); + root_child0_child0_child2.setPadding(Edge.Left, 5); root_child0_child0.insertChild(root_child0_child0_child2, 2); const root_child0_child0_child2_child0 = Yoga.Node.create(config); - root_child0_child0_child2_child0.setMargin(Edge.Left, 9); + root_child0_child0_child2_child0.setWidth(100); + root_child0_child0_child2_child0.setHeight(50); root_child0_child0_child2_child0.setMargin(Edge.Top, 12); root_child0_child0_child2_child0.setMargin(Edge.Right, 4); root_child0_child0_child2_child0.setMargin(Edge.Bottom, 7); - root_child0_child0_child2_child0.setPadding(Edge.Left, 5); - root_child0_child0_child2_child0.setPadding(Edge.Top, 3); - root_child0_child0_child2_child0.setPadding(Edge.Right, 8); - root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); - root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setMargin(Edge.Left, 9); root_child0_child0_child2_child0.setBorder(Edge.Top, 1); root_child0_child0_child2_child0.setBorder(Edge.Right, 5); root_child0_child0_child2_child0.setBorder(Edge.Bottom, 9); - root_child0_child0_child2_child0.setWidth(100); - root_child0_child0_child2_child0.setHeight(50); + root_child0_child0_child2_child0.setBorder(Edge.Left, 2); + root_child0_child0_child2_child0.setPadding(Edge.Top, 3); + root_child0_child0_child2_child0.setPadding(Edge.Right, 8); + root_child0_child0_child2_child0.setPadding(Edge.Bottom, 10); + root_child0_child0_child2_child0.setPadding(Edge.Left, 5); root_child0_child0_child2.insertChild(root_child0_child0_child2_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -6137,30 +6102,30 @@ test('static_position_static_root', () => { try { root = Yoga.Node.create(config); + root.setHeight(200); + root.setWidth(100); root.setPositionType(PositionType.Static); - root.setPadding(Edge.Left, 6); root.setPadding(Edge.Top, 1); root.setPadding(Edge.Right, 11); root.setPadding(Edge.Bottom, 4); - root.setWidth(100); - root.setHeight(200); + root.setPadding(Edge.Left, 6); const root_child0 = Yoga.Node.create(config); + root_child0.setHeight("50%"); + root_child0.setWidth("50%"); root_child0.setPositionType(PositionType.Absolute); - root_child0.setMargin(Edge.Left, 12); - root_child0.setMargin(Edge.Top, 11); - root_child0.setMargin(Edge.Right, 15); - root_child0.setMargin(Edge.Bottom, 1); - root_child0.setPadding(Edge.Left, 3); - root_child0.setPadding(Edge.Top, 7); - root_child0.setPadding(Edge.Right, 5); - root_child0.setPadding(Edge.Bottom, 4); - root_child0.setBorder(Edge.Left, 4); root_child0.setBorder(Edge.Top, 3); root_child0.setBorder(Edge.Right, 2); root_child0.setBorder(Edge.Bottom, 1); - root_child0.setWidth("50%"); - root_child0.setHeight("50%"); + root_child0.setBorder(Edge.Left, 4); + root_child0.setPadding(Edge.Top, 7); + root_child0.setPadding(Edge.Right, 5); + root_child0.setPadding(Edge.Bottom, 4); + root_child0.setPadding(Edge.Left, 3); + root_child0.setMargin(Edge.Top, 11); + root_child0.setMargin(Edge.Right, 15); + root_child0.setMargin(Edge.Bottom, 1); + root_child0.setMargin(Edge.Left, 12); root.insertChild(root_child0, 0); root.calculateLayout(undefined, undefined, Direction.LTR); @@ -6202,48 +6167,45 @@ test('static_position_absolute_child_multiple', () => { root.setPositionType(PositionType.Absolute); const root_child0 = Yoga.Node.create(config); - root_child0.setPadding(Edge.Left, 100); - root_child0.setPadding(Edge.Top, 100); - root_child0.setPadding(Edge.Right, 100); - root_child0.setPadding(Edge.Bottom, 100); root_child0.setWidth(400); root_child0.setHeight(400); + root_child0.setPadding(Edge.All, 100); root.insertChild(root_child0, 0); const root_child0_child0 = Yoga.Node.create(config); - root_child0_child0.setPositionType(PositionType.Static); - root_child0_child0.setWidth(100); root_child0_child0.setHeight(100); + root_child0_child0.setWidth(100); + root_child0_child0.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child0, 0); const root_child0_child0_child0 = Yoga.Node.create(config); - root_child0_child0_child0.setPositionType(PositionType.Absolute); - root_child0_child0_child0.setWidth("10%"); root_child0_child0_child0.setHeight(50); + root_child0_child0_child0.setWidth("10%"); + root_child0_child0_child0.setPositionType(PositionType.Absolute); root_child0_child0.insertChild(root_child0_child0_child0, 0); const root_child0_child1 = Yoga.Node.create(config); - root_child0_child1.setPositionType(PositionType.Static); - root_child0_child1.setWidth(100); root_child0_child1.setHeight(100); + root_child0_child1.setWidth(100); + root_child0_child1.setPositionType(PositionType.Static); root_child0.insertChild(root_child0_child1, 1); const root_child0_child1_child0 = Yoga.Node.create(config); - root_child0_child1_child0.setPositionType(PositionType.Absolute); - root_child0_child1_child0.setWidth("50%"); root_child0_child1_child0.setHeight(50); + root_child0_child1_child0.setWidth("50%"); + root_child0_child1_child0.setPositionType(PositionType.Absolute); root_child0_child1.insertChild(root_child0_child1_child0, 0); const root_child0_child1_child1 = Yoga.Node.create(config); - root_child0_child1_child1.setPositionType(PositionType.Absolute); - root_child0_child1_child1.setWidth("50%"); root_child0_child1_child1.setHeight(50); + root_child0_child1_child1.setWidth("50%"); + root_child0_child1_child1.setPositionType(PositionType.Absolute); root_child0_child1.insertChild(root_child0_child1_child1, 1); const root_child0_child2 = Yoga.Node.create(config); - root_child0_child2.setPositionType(PositionType.Absolute); - root_child0_child2.setWidth(25); root_child0_child2.setHeight(50); + root_child0_child2.setWidth(25); + root_child0_child2.setPositionType(PositionType.Absolute); root_child0.insertChild(root_child0_child2, 2); root.calculateLayout(undefined, undefined, Direction.LTR); diff --git a/tests/YGAlignBaselineTest.cpp b/tests/YGAlignBaselineTest.cpp index e8c896ce39..e210ba8dc1 100644 --- a/tests/YGAlignBaselineTest.cpp +++ b/tests/YGAlignBaselineTest.cpp @@ -6,6 +6,7 @@ */ #include +#include #include static float _baselineFunc( @@ -835,3 +836,169 @@ TEST( YGConfigFree(config); } + +TEST(YogaTest, grid_align_baseline_with_margin) { + YGConfigRef config = YGConfigNew(); + + YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + auto root_gridTemplateColumns = YGGridTrackListCreate(); + YGGridTrackListAddTrack(root_gridTemplateColumns, YGPoints(100)); + YGGridTrackListAddTrack(root_gridTemplateColumns, YGPoints(100)); + YGGridTrackListAddTrack(root_gridTemplateColumns, YGPoints(100)); + YGNodeStyleSetGridTemplateColumns(root, root_gridTemplateColumns); + YGGridTrackListFree(root_gridTemplateColumns); + + YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetHeight(root_child0, 50); + YGNodeSetBaselineFunc(root_child0, _baselineFunc); + YGNodeInsertChild(root, root_child0, 0); + // child0 marginTop (10) + baseline (25) = 35 + + YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child1, 100); + YGNodeStyleSetHeight(root_child1, 30); + YGNodeSetBaselineFunc(root_child1, _baselineFunc); + YGNodeInsertChild(root, root_child1, 1); + // child1 baseline (15) + // child1 baselineShim = 35 - 15 = 20 + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(300, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(60, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(10, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(50, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child1)); + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetTop(root_child1)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child1)); + ASSERT_FLOAT_EQ(30, YGNodeLayoutGetHeight(root_child1)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, grid_align_baseline_with_padding) { + YGConfigRef config = YGConfigNew(); + + YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root, YGEdgeTop, 20); + YGNodeStyleSetPadding(root, YGEdgeBottom, 20); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + auto root_gridTemplateColumns = YGGridTrackListCreate(); + YGGridTrackListAddTrack(root_gridTemplateColumns, YGPoints(100)); + YGGridTrackListAddTrack(root_gridTemplateColumns, YGPoints(100)); + YGNodeStyleSetGridTemplateColumns(root, root_gridTemplateColumns); + YGGridTrackListFree(root_gridTemplateColumns); + + YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetHeight(root_child0, 60); + YGNodeSetBaselineFunc(root_child0, _baselineFunc); + YGNodeInsertChild(root, root_child0, 0); + // child0 baseline (30) + + YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child1, 100); + YGNodeStyleSetHeight(root_child1, 40); + YGNodeSetBaselineFunc(root_child1, _baselineFunc); + YGNodeInsertChild(root, root_child1, 1); + // child1 baseline (20) + // child1 baselineShim = 30 - 20 = 10 + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + // container padding (20) + child0 baseline (0) = 20 + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(60, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child1)); + // container padding (20) + child1 baselineShim (10) = 30 + ASSERT_FLOAT_EQ(30, YGNodeLayoutGetTop(root_child1)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child1)); + ASSERT_FLOAT_EQ(40, YGNodeLayoutGetHeight(root_child1)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} + +TEST(YogaTest, grid_align_baseline_nested_child) { + YGConfigRef config = YGConfigNew(); + + YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + auto root_gridTemplateColumns = YGGridTrackListCreate(); + YGGridTrackListAddTrack(root_gridTemplateColumns, YGPoints(100)); + YGGridTrackListAddTrack(root_gridTemplateColumns, YGPoints(100)); + YGNodeStyleSetGridTemplateColumns(root, root_gridTemplateColumns); + YGGridTrackListFree(root_gridTemplateColumns); + + YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); + YGNodeInsertChild(root, root_child0, 0); + + YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0, 80); + YGNodeStyleSetHeight(root_child0_child0, 60); + YGNodeSetBaselineFunc(root_child0_child0, _baselineFunc); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + // child0 baseline (30) + marginTop (10) = 40 + + YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child1, 100); + YGNodeStyleSetHeight(root_child1, 20); + YGNodeSetBaselineFunc(root_child1, _baselineFunc); + YGNodeInsertChild(root, root_child1, 1); + // child1 baseline (10) + // child1 baselineShim = 40 - 10 = 30 + + YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); + ASSERT_FLOAT_EQ(200, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(70, YGNodeLayoutGetHeight(root)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(10, YGNodeLayoutGetTop(root_child0)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child0)); + ASSERT_FLOAT_EQ(60, YGNodeLayoutGetHeight(root_child0)); + + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0_child0)); + ASSERT_FLOAT_EQ(80, YGNodeLayoutGetWidth(root_child0_child0)); + ASSERT_FLOAT_EQ(60, YGNodeLayoutGetHeight(root_child0_child0)); + + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetLeft(root_child1)); + // baselineShim (30) + ASSERT_FLOAT_EQ(30, YGNodeLayoutGetTop(root_child1)); + ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root_child1)); + ASSERT_FLOAT_EQ(20, YGNodeLayoutGetHeight(root_child1)); + + YGNodeFreeRecursive(root); + + YGConfigFree(config); +} diff --git a/tests/YGHadOverflowTest.cpp b/tests/YGHadOverflowTest.cpp index bbeefe7ee4..aed6f58277 100644 --- a/tests/YGHadOverflowTest.cpp +++ b/tests/YGHadOverflowTest.cpp @@ -133,3 +133,29 @@ TEST_F(YogaTest_HadOverflowTests, spacing_overflow_in_nested_nodes) { ASSERT_TRUE(YGNodeLayoutGetHadOverflow(root)); } + +TEST(YogaTest, grid_hadoverflow_when_content_exceeds_container) { + YGConfigRef config = YGConfigNew(); + + YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetDisplay(root, YGDisplayGrid); + YGNodeStyleSetWidth(root, 200); + YGNodeStyleSetHeight(root, 100); + + YGNodeRef child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(child0, 150); + YGNodeStyleSetHeight(child0, 80); + YGNodeInsertChild(root, child0, 0); + + YGNodeRef child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(child1, 150); + YGNodeStyleSetHeight(child1, 80); + YGNodeInsertChild(root, child1, 1); + + YGNodeCalculateLayout(root, 200, 100, YGDirectionLTR); + + ASSERT_TRUE(YGNodeLayoutGetHadOverflow(root)); + + YGNodeFreeRecursive(root); + YGConfigFree(config); +} diff --git a/tests/generated/YGAbsolutePositionTest.cpp b/tests/generated/YGAbsolutePositionTest.cpp index c3d5302927..e17b1bea89 100644 --- a/tests/generated/YGAbsolutePositionTest.cpp +++ b/tests/generated/YGAbsolutePositionTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<499316b3f7b7ec5c406abf5ac77837f1>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAbsolutePositionTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAbsolutePositionTest.html */ #include @@ -22,11 +22,11 @@ TEST(YogaTest, absolute_layout_width_height_start_top) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0, YGEdgeStart, 10); YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10); - YGNodeStyleSetWidth(root_child0, 10); - YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -66,11 +66,11 @@ TEST(YogaTest, absolute_layout_width_height_left_auto_right) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetPositionAuto(root_child0, YGEdgeLeft); YGNodeStyleSetPosition(root_child0, YGEdgeRight, 10); - YGNodeStyleSetWidth(root_child0, 10); - YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -110,11 +110,11 @@ TEST(YogaTest, absolute_layout_width_height_left_right_auto) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 10); YGNodeStyleSetPositionAuto(root_child0, YGEdgeRight); - YGNodeStyleSetWidth(root_child0, 10); - YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -154,11 +154,11 @@ TEST(YogaTest, absolute_layout_width_height_left_auto_right_auto) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetPositionAuto(root_child0, YGEdgeLeft); YGNodeStyleSetPositionAuto(root_child0, YGEdgeRight); - YGNodeStyleSetWidth(root_child0, 10); - YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -198,11 +198,11 @@ TEST(YogaTest, absolute_layout_width_height_end_bottom) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0, YGEdgeEnd, 10); YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 10); - YGNodeStyleSetWidth(root_child0, 10); - YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -286,13 +286,13 @@ TEST(YogaTest, absolute_layout_width_height_start_top_end_bottom) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetHeight(root_child0, 10); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0, YGEdgeStart, 10); YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10); YGNodeStyleSetPosition(root_child0, YGEdgeEnd, 10); YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 10); - YGNodeStyleSetWidth(root_child0, 10); - YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -327,11 +327,11 @@ TEST(YogaTest, do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hi YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetOverflow(root, YGOverflowHidden); - YGNodeStyleSetWidth(root, 50); YGNodeStyleSetHeight(root, 50); + YGNodeStyleSetWidth(root, 50); + YGNodeStyleSetOverflow(root, YGOverflowHidden); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -387,59 +387,44 @@ TEST(YogaTest, absolute_layout_within_border) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root, YGEdgeTop, 10); - YGNodeStyleSetMargin(root, YGEdgeRight, 10); - YGNodeStyleSetMargin(root, YGEdgeBottom, 10); - YGNodeStyleSetPadding(root, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetPadding(root, YGEdgeRight, 10); - YGNodeStyleSetPadding(root, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); + YGNodeStyleSetMargin(root, YGEdgeAll, 10); + YGNodeStyleSetPadding(root, YGEdgeAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 0); - YGNodeStyleSetPosition(root_child0, YGEdgeTop, 0); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 0); + YGNodeStyleSetPosition(root_child0, YGEdgeTop, 0); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child1, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child1, YGEdgeRight, 0); - YGNodeStyleSetPosition(root_child1, YGEdgeBottom, 0); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); + YGNodeStyleSetPosition(root_child1, YGEdgeRight, 0); + YGNodeStyleSetPosition(root_child1, YGEdgeBottom, 0); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child2, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child2, YGEdgeLeft, 0); - YGNodeStyleSetPosition(root_child2, YGEdgeTop, 0); - YGNodeStyleSetMargin(root_child2, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child2, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child2, YGEdgeRight, 10); - YGNodeStyleSetMargin(root_child2, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetPosition(root_child2, YGEdgeLeft, 0); + YGNodeStyleSetPosition(root_child2, YGEdgeTop, 0); + YGNodeStyleSetMargin(root_child2, YGEdgeAll, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child3, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child3, YGEdgeRight, 0); - YGNodeStyleSetPosition(root_child3, YGEdgeBottom, 0); - YGNodeStyleSetMargin(root_child3, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child3, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child3, YGEdgeRight, 10); - YGNodeStyleSetMargin(root_child3, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetHeight(root_child3, 50); + YGNodeStyleSetPosition(root_child3, YGEdgeRight, 0); + YGNodeStyleSetPosition(root_child3, YGEdgeBottom, 0); + YGNodeStyleSetMargin(root_child3, YGEdgeAll, 10); YGNodeInsertChild(root, root_child3, 3); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -504,12 +489,12 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); - YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 110); + YGNodeStyleSetFlexGrow(root, 1); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -549,12 +534,12 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); - YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); - YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 110); + YGNodeStyleSetFlexGrow(root, 1); + YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); + YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -594,11 +579,11 @@ TEST(YogaTest, absolute_layout_justify_content_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); - YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 110); + YGNodeStyleSetFlexGrow(root, 1); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -638,11 +623,11 @@ TEST(YogaTest, absolute_layout_align_items_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); - YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 110); + YGNodeStyleSetFlexGrow(root, 1); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -683,15 +668,15 @@ TEST(YogaTest, absolute_layout_align_items_center_on_child_only) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); - YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 110); + YGNodeStyleSetFlexGrow(root, 1); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignCenter); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0, 60); YGNodeStyleSetHeight(root_child0, 40); + YGNodeStyleSetAlignSelf(root_child0, YGAlignCenter); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -726,18 +711,18 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_top_po YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); - YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 110); + YGNodeStyleSetFlexGrow(root, 1); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10); YGNodeStyleSetWidth(root_child0, 60); YGNodeStyleSetHeight(root_child0, 40); + YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -772,18 +757,18 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_bottom YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); - YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 110); + YGNodeStyleSetFlexGrow(root, 1); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0, 60); YGNodeStyleSetHeight(root_child0, 40); + YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -818,18 +803,18 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_left_p YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); - YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 110); + YGNodeStyleSetFlexGrow(root, 1); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 5); YGNodeStyleSetWidth(root_child0, 60); YGNodeStyleSetHeight(root_child0, 40); + YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 5); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -864,18 +849,18 @@ TEST(YogaTest, absolute_layout_align_items_and_justify_content_center_and_right_ YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); - YGNodeStyleSetWidth(root, 110); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 110); + YGNodeStyleSetFlexGrow(root, 1); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0, YGEdgeRight, 5); YGNodeStyleSetWidth(root_child0, 60); YGNodeStyleSetHeight(root_child0, 40); + YGNodeStyleSetPosition(root_child0, YGEdgeRight, 5); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -911,9 +896,9 @@ TEST(YogaTest, position_root_with_rtl_should_position_withoutdirection) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root, YGEdgeLeft, 72); - YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); + YGNodeStyleSetWidth(root, 52); + YGNodeStyleSetPosition(root, YGEdgeLeft, 72); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(72, YGNodeLayoutGetLeft(root)); @@ -958,8 +943,8 @@ TEST(YogaTest, absolute_layout_percentage_bottom_based_on_parent_height) { YGNodeRef root_child2 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child2, YGPositionTypeAbsolute); YGNodeStyleSetPositionPercent(root_child2, YGEdgeTop, 10); - YGNodeStyleSetPositionPercent(root_child2, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child2, 10); + YGNodeStyleSetPositionPercent(root_child2, YGEdgeBottom, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1015,14 +1000,14 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_column_container) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1057,16 +1042,16 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_row_container) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1102,15 +1087,15 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_column_container_flex_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); + YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1145,17 +1130,17 @@ TEST(YogaTest, absolute_layout_in_wrap_reverse_row_container_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); + YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1198,11 +1183,11 @@ TEST(YogaTest, percent_absolute_position_infinite_height) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child1, YGPositionTypeAbsolute); - YGNodeStyleSetPositionPercent(root_child1, YGEdgeLeft, 20); - YGNodeStyleSetPositionPercent(root_child1, YGEdgeTop, 20); YGNodeStyleSetWidthPercent(root_child1, 20); YGNodeStyleSetHeightPercent(root_child1, 20); + YGNodeStyleSetPositionPercent(root_child1, YGEdgeLeft, 20); + YGNodeStyleSetPositionPercent(root_child1, YGEdgeTop, 20); + YGNodeStyleSetPositionType(root_child1, YGPositionTypeAbsolute); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1248,15 +1233,15 @@ TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeTop, 10); + YGNodeStyleSetBorder(root, YGEdgeTop, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeightPercent(root_child0, 50); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1291,12 +1276,12 @@ TEST(YogaTest, absolute_layout_percentage_height_based_on_padded_parent_and_alig YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignItems(root, YGAlignCenter); - YGNodeStyleSetPadding(root, YGEdgeTop, 20); - YGNodeStyleSetPadding(root, YGEdgeBottom, 20); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeTop, 20); + YGNodeStyleSetPadding(root, YGEdgeBottom, 20); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -1337,9 +1322,9 @@ TEST(YogaTest, absolute_layout_padding_left) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 100); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetPadding(root, YGEdgeLeft, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -1380,9 +1365,9 @@ TEST(YogaTest, absolute_layout_padding_right) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeRight, 100); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetPadding(root, YGEdgeRight, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -1423,9 +1408,9 @@ TEST(YogaTest, absolute_layout_padding_top) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeTop, 100); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetPadding(root, YGEdgeTop, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -1466,9 +1451,9 @@ TEST(YogaTest, absolute_layout_padding_bottom) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeBottom, 100); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetPadding(root, YGEdgeBottom, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); @@ -1511,22 +1496,16 @@ TEST(YogaTest, absolute_layout_padding) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0, 200); YGNodeStyleSetHeight(root_child0, 200); + YGNodeStyleSetMargin(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 50); YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeAll, 50); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); @@ -1590,22 +1569,16 @@ TEST(YogaTest, absolute_layout_border) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0, 200); YGNodeStyleSetHeight(root_child0, 200); + YGNodeStyleSetMargin(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 10); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeAll, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); @@ -1666,21 +1639,21 @@ TEST(YogaTest, absolute_layout_column_reverse_margin_border) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidth(root_child0, 50); + YGNodeStyleSetHeight(root_child0, 50); YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 5); YGNodeStyleSetPosition(root_child0, YGEdgeRight, 3); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 3); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 4); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 1); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 3); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); - YGNodeStyleSetWidth(root_child0, 50); - YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGAlignContentTest.cpp b/tests/generated/YGAlignContentTest.cpp index b47741344e..07f8f9d45c 100644 --- a/tests/generated/YGAlignContentTest.cpp +++ b/tests/generated/YGAlignContentTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignContentTest.html + * @generated SignedSource<<786bcbb40ccb0969c2cd0efbba698d7b>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAlignContentTest.html */ #include @@ -17,10 +17,10 @@ TEST(YogaTest, align_content_flex_start_nowrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -74,11 +74,11 @@ TEST(YogaTest, align_content_flex_start_wrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -177,11 +177,11 @@ TEST(YogaTest, align_content_flex_start_wrap_singleline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -236,17 +236,14 @@ TEST(YogaTest, align_content_flex_start_wrapped_negative_space) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -328,20 +325,16 @@ TEST(YogaTest, align_content_flex_start_wrapped_negative_space_gap) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); - YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); - YGNodeStyleSetGap(root_child0, YGGutterRow, 10); + YGNodeStyleSetGap(root_child0, YGGutterAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -422,9 +415,9 @@ TEST(YogaTest, align_content_flex_start_without_height_on_children) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -521,20 +514,20 @@ TEST(YogaTest, align_content_flex_start_with_flex) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); - YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); - YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 10); YGNodeInsertChild(root, root_child1, 1); @@ -543,10 +536,10 @@ TEST(YogaTest, align_content_flex_start_with_flex) { YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeStyleSetFlexShrink(root_child3, 1); YGNodeStyleSetFlexBasisPercent(root_child3, 0); - YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); @@ -625,11 +618,11 @@ TEST(YogaTest, align_content_flex_end_nowrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -683,12 +676,12 @@ TEST(YogaTest, align_content_flex_end_wrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -787,12 +780,12 @@ TEST(YogaTest, align_content_flex_end_wrap_singleline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -847,18 +840,15 @@ TEST(YogaTest, align_content_flex_end_wrapped_negative_space) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignFlexEnd); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignFlexEnd); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -940,21 +930,17 @@ TEST(YogaTest, align_content_flex_end_wrapped_negative_space_gap) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignFlexEnd); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignFlexEnd); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); - YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); - YGNodeStyleSetGap(root_child0, YGGutterRow, 10); + YGNodeStyleSetGap(root_child0, YGGutterAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1034,11 +1020,11 @@ TEST(YogaTest, align_content_center_nowrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1092,12 +1078,12 @@ TEST(YogaTest, align_content_center_wrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1196,12 +1182,12 @@ TEST(YogaTest, align_content_center_wrap_singleline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1256,18 +1242,15 @@ TEST(YogaTest, align_content_center_wrapped_negative_space) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignCenter); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignCenter); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -1349,21 +1332,17 @@ TEST(YogaTest, align_content_center_wrapped_negative_space_gap) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignCenter); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignCenter); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); - YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); - YGNodeStyleSetGap(root_child0, YGGutterRow, 10); + YGNodeStyleSetGap(root_child0, YGGutterAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1443,11 +1422,11 @@ TEST(YogaTest, align_content_space_between_nowrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1501,12 +1480,12 @@ TEST(YogaTest, align_content_space_between_wrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1605,12 +1584,12 @@ TEST(YogaTest, align_content_space_between_wrap_singleline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1665,18 +1644,15 @@ TEST(YogaTest, align_content_space_between_wrapped_negative_space) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceBetween); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceBetween); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -1758,18 +1734,15 @@ TEST(YogaTest, align_content_space_between_wrapped_negative_space_row_reverse) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceBetween); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceBetween); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -1851,21 +1824,17 @@ TEST(YogaTest, align_content_space_between_wrapped_negative_space_gap) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceBetween); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceBetween); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); - YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); - YGNodeStyleSetGap(root_child0, YGGutterRow, 10); + YGNodeStyleSetGap(root_child0, YGGutterAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1945,11 +1914,11 @@ TEST(YogaTest, align_content_space_around_nowrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -2003,12 +1972,12 @@ TEST(YogaTest, align_content_space_around_wrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -2107,12 +2076,12 @@ TEST(YogaTest, align_content_space_around_wrap_singleline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -2167,18 +2136,15 @@ TEST(YogaTest, align_content_space_around_wrapped_negative_space) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceAround); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceAround); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -2260,18 +2226,15 @@ TEST(YogaTest, align_content_space_around_wrapped_negative_space_row_reverse) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceAround); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceAround); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -2353,21 +2316,17 @@ TEST(YogaTest, align_content_space_around_wrapped_negative_space_gap) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceAround); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceAround); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); - YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); - YGNodeStyleSetGap(root_child0, YGGutterRow, 10); + YGNodeStyleSetGap(root_child0, YGGutterAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2447,11 +2406,11 @@ TEST(YogaTest, align_content_space_evenly_nowrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -2505,12 +2464,12 @@ TEST(YogaTest, align_content_space_evenly_wrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -2609,12 +2568,12 @@ TEST(YogaTest, align_content_space_evenly_wrap_singleline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 140); YGNodeStyleSetHeight(root, 120); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -2669,18 +2628,15 @@ TEST(YogaTest, align_content_space_evenly_wrapped_negative_space) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceEvenly); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceEvenly); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -2762,21 +2718,17 @@ TEST(YogaTest, align_content_space_evenly_wrapped_negative_space_gap) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 60); - YGNodeStyleSetBorder(root, YGEdgeTop, 60); - YGNodeStyleSetBorder(root, YGEdgeRight, 60); - YGNodeStyleSetBorder(root, YGEdgeBottom, 60); YGNodeStyleSetWidth(root, 320); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetBorder(root, YGEdgeAll, 60); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); - YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceEvenly); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); + YGNodeStyleSetAlignContent(root_child0, YGAlignSpaceEvenly); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetHeight(root_child0, 10); - YGNodeStyleSetGap(root_child0, YGGutterColumn, 10); - YGNodeStyleSetGap(root_child0, YGGutterRow, 10); + YGNodeStyleSetGap(root_child0, YGGutterAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2856,11 +2808,11 @@ TEST(YogaTest, align_content_stretch) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -2954,12 +2906,12 @@ TEST(YogaTest, align_content_stretch_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -3053,12 +3005,12 @@ TEST(YogaTest, align_content_stretch_row_with_children) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -3168,22 +3120,22 @@ TEST(YogaTest, align_content_stretch_row_with_flex) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); - YGNodeStyleSetWidth(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -3191,10 +3143,10 @@ TEST(YogaTest, align_content_stretch_row_with_flex) { YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeStyleSetFlexShrink(root_child3, 1); YGNodeStyleSetFlexBasisPercent(root_child3, 0); - YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); @@ -3273,22 +3225,22 @@ TEST(YogaTest, align_content_stretch_row_with_flex_no_shrink) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); - YGNodeStyleSetWidth(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -3296,9 +3248,9 @@ TEST(YogaTest, align_content_stretch_row_with_flex_no_shrink) { YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child3, 50); YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeStyleSetFlexBasisPercent(root_child3, 0); - YGNodeStyleSetWidth(root_child3, 50); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); @@ -3377,23 +3329,20 @@ TEST(YogaTest, align_content_stretch_row_with_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child1, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child1, YGEdgeRight, 10); - YGNodeStyleSetMargin(root_child1, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child1, 50); + YGNodeStyleSetMargin(root_child1, YGEdgeAll, 10); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -3401,11 +3350,8 @@ TEST(YogaTest, align_content_stretch_row_with_margin) { YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child3, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child3, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child3, YGEdgeRight, 10); - YGNodeStyleSetMargin(root_child3, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child3, 50); + YGNodeStyleSetMargin(root_child3, YGEdgeAll, 10); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); @@ -3484,23 +3430,20 @@ TEST(YogaTest, align_content_stretch_row_with_padding) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child1, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child1, 50); + YGNodeStyleSetPadding(root_child1, YGEdgeAll, 10); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -3508,11 +3451,8 @@ TEST(YogaTest, align_content_stretch_row_with_padding) { YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child3, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child3, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child3, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child3, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child3, 50); + YGNodeStyleSetPadding(root_child3, YGEdgeAll, 10); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); @@ -3591,12 +3531,12 @@ TEST(YogaTest, align_content_stretch_row_with_single_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -3648,12 +3588,12 @@ TEST(YogaTest, align_content_stretch_row_with_fixed_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -3748,12 +3688,12 @@ TEST(YogaTest, align_content_stretch_row_with_max_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -3848,12 +3788,12 @@ TEST(YogaTest, align_content_stretch_row_with_min_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -3948,11 +3888,11 @@ TEST(YogaTest, align_content_stretch_column) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 150); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 50); @@ -3965,10 +3905,10 @@ TEST(YogaTest, align_content_stretch_column) { YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child1, 50); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); - YGNodeStyleSetHeight(root_child1, 50); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -4065,21 +4005,21 @@ TEST(YogaTest, align_content_stretch_is_not_overriding_align_items) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root_child0, YGAlignStretch); - YGNodeStyleSetAlignItems(root_child0, YGAlignCenter); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetAlignItems(root_child0, YGAlignCenter); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetAlignContent(root_child0, YGAlignStretch); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch); - YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetWidth(root_child0_child0, 10); + YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4124,12 +4064,12 @@ TEST(YogaTest, align_content_stretch_with_min_cross_axis) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetMinHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 400); @@ -4183,12 +4123,12 @@ TEST(YogaTest, align_content_stretch_with_max_cross_axis) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetMaxHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 400); @@ -4242,20 +4182,14 @@ TEST(YogaTest, align_content_stretch_with_max_cross_axis_and_border_padding) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetPadding(root, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root, YGEdgeTop, 2); - YGNodeStyleSetPadding(root, YGEdgeRight, 2); - YGNodeStyleSetPadding(root, YGEdgeBottom, 2); - YGNodeStyleSetBorder(root, YGEdgeLeft, 5); - YGNodeStyleSetBorder(root, YGEdgeTop, 5); - YGNodeStyleSetBorder(root, YGEdgeRight, 5); - YGNodeStyleSetBorder(root, YGEdgeBottom, 5); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetMaxHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetBorder(root, YGEdgeAll, 5); + YGNodeStyleSetPadding(root, YGEdgeAll, 2); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 400); @@ -4309,12 +4243,12 @@ TEST(YogaTest, align_content_space_evenly_with_min_cross_axis) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetMinHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 400); @@ -4368,12 +4302,12 @@ TEST(YogaTest, align_content_space_evenly_with_max_cross_axis) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetMaxHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 400); @@ -4427,12 +4361,12 @@ TEST(YogaTest, align_content_space_evenly_with_max_cross_axis_violated) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetMaxHeight(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 400); @@ -4486,20 +4420,14 @@ TEST(YogaTest, align_content_space_evenly_with_max_cross_axis_violated_padding_a YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetPadding(root, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root, YGEdgeTop, 2); - YGNodeStyleSetPadding(root, YGEdgeRight, 2); - YGNodeStyleSetPadding(root, YGEdgeBottom, 2); - YGNodeStyleSetBorder(root, YGEdgeLeft, 5); - YGNodeStyleSetBorder(root, YGEdgeTop, 5); - YGNodeStyleSetBorder(root, YGEdgeRight, 5); - YGNodeStyleSetBorder(root, YGEdgeBottom, 5); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetMaxHeight(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignSpaceEvenly); + YGNodeStyleSetBorder(root, YGEdgeAll, 5); + YGNodeStyleSetPadding(root, YGEdgeAll, 2); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 400); @@ -4553,27 +4481,27 @@ TEST(YogaTest, align_content_space_around_and_align_items_flex_end_with_flex_wra YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); - YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); + YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 150); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetWidth(root_child0, 150); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 120); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetWidth(root_child1, 120); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 120); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 120); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4628,27 +4556,27 @@ TEST(YogaTest, align_content_space_around_and_align_items_center_with_flex_wrap) YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 150); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetWidth(root_child0, 150); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 120); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetWidth(root_child1, 120); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 120); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 120); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4703,27 +4631,27 @@ TEST(YogaTest, align_content_space_around_and_align_items_flex_start_with_flex_w YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 150); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetWidth(root_child0, 150); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 120); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetWidth(root_child1, 120); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 120); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 120); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4778,61 +4706,61 @@ TEST(YogaTest, align_content_flex_start_stretch_doesnt_influence_line_box_dim) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 20); + YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPadding(root, YGEdgeTop, 20); - YGNodeStyleSetPadding(root, YGEdgeRight, 20); YGNodeStyleSetPadding(root, YGEdgeBottom, 20); - YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetPadding(root, YGEdgeLeft, 20); + YGNodeStyleSetPadding(root, YGEdgeRight, 20); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetMargin(root_child0, YGEdgeRight, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child0, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child0, 30); YGNodeStyleSetHeight(root_child1_child0, 30); + YGNodeStyleSetWidth(root_child1_child0, 30); + YGNodeStyleSetMargin(root_child1_child0, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child0, 0); YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child1, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child1, 30); YGNodeStyleSetHeight(root_child1_child1, 30); + YGNodeStyleSetWidth(root_child1_child1, 30); + YGNodeStyleSetMargin(root_child1_child1, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child1, 1); YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child2, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child2, 30); YGNodeStyleSetHeight(root_child1_child2, 30); + YGNodeStyleSetWidth(root_child1_child2, 30); + YGNodeStyleSetMargin(root_child1_child2, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child2, 2); YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child3, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child3, 30); YGNodeStyleSetHeight(root_child1_child3, 30); + YGNodeStyleSetWidth(root_child1_child3, 30); + YGNodeStyleSetMargin(root_child1_child3, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child3, 3); YGNodeRef root_child1_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child4, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child4, 30); YGNodeStyleSetHeight(root_child1_child4, 30); + YGNodeStyleSetWidth(root_child1_child4, 30); + YGNodeStyleSetMargin(root_child1_child4, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child4, 4); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child2, YGEdgeLeft, 20); - YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 50); + YGNodeStyleSetMargin(root_child2, YGEdgeLeft, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4937,62 +4865,62 @@ TEST(YogaTest, align_content_stretch_stretch_does_influence_line_box_dim) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 20); + YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPadding(root, YGEdgeTop, 20); - YGNodeStyleSetPadding(root, YGEdgeRight, 20); YGNodeStyleSetPadding(root, YGEdgeBottom, 20); - YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetPadding(root, YGEdgeLeft, 20); + YGNodeStyleSetPadding(root, YGEdgeRight, 20); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetMargin(root_child0, YGEdgeRight, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root_child1, YGAlignStretch); YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); + YGNodeStyleSetFlexGrow(root_child1, 1); + YGNodeStyleSetAlignContent(root_child1, YGAlignStretch); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child0, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child0, 30); YGNodeStyleSetHeight(root_child1_child0, 30); + YGNodeStyleSetWidth(root_child1_child0, 30); + YGNodeStyleSetMargin(root_child1_child0, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child0, 0); YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child1, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child1, 30); YGNodeStyleSetHeight(root_child1_child1, 30); + YGNodeStyleSetWidth(root_child1_child1, 30); + YGNodeStyleSetMargin(root_child1_child1, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child1, 1); YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child2, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child2, 30); YGNodeStyleSetHeight(root_child1_child2, 30); + YGNodeStyleSetWidth(root_child1_child2, 30); + YGNodeStyleSetMargin(root_child1_child2, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child2, 2); YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child3, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child3, 30); YGNodeStyleSetHeight(root_child1_child3, 30); + YGNodeStyleSetWidth(root_child1_child3, 30); + YGNodeStyleSetMargin(root_child1_child3, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child3, 3); YGNodeRef root_child1_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child4, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child4, 30); YGNodeStyleSetHeight(root_child1_child4, 30); + YGNodeStyleSetWidth(root_child1_child4, 30); + YGNodeStyleSetMargin(root_child1_child4, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child4, 4); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child2, YGEdgeLeft, 20); - YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 50); + YGNodeStyleSetMargin(root_child2, YGEdgeLeft, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5097,62 +5025,62 @@ TEST(YogaTest, align_content_space_evenly_stretch_does_influence_line_box_dim) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 20); + YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPadding(root, YGEdgeTop, 20); - YGNodeStyleSetPadding(root, YGEdgeRight, 20); YGNodeStyleSetPadding(root, YGEdgeBottom, 20); - YGNodeStyleSetWidth(root, 400); + YGNodeStyleSetPadding(root, YGEdgeLeft, 20); + YGNodeStyleSetPadding(root, YGEdgeRight, 20); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetMargin(root_child0, YGEdgeRight, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root_child1, YGAlignStretch); YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); + YGNodeStyleSetFlexGrow(root_child1, 1); + YGNodeStyleSetAlignContent(root_child1, YGAlignStretch); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child0, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child0, 30); YGNodeStyleSetHeight(root_child1_child0, 30); + YGNodeStyleSetWidth(root_child1_child0, 30); + YGNodeStyleSetMargin(root_child1_child0, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child0, 0); YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child1, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child1, 30); YGNodeStyleSetHeight(root_child1_child1, 30); + YGNodeStyleSetWidth(root_child1_child1, 30); + YGNodeStyleSetMargin(root_child1_child1, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child1, 1); YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child2, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child2, 30); YGNodeStyleSetHeight(root_child1_child2, 30); + YGNodeStyleSetWidth(root_child1_child2, 30); + YGNodeStyleSetMargin(root_child1_child2, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child2, 2); YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child3, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child3, 30); YGNodeStyleSetHeight(root_child1_child3, 30); + YGNodeStyleSetWidth(root_child1_child3, 30); + YGNodeStyleSetMargin(root_child1_child3, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child3, 3); YGNodeRef root_child1_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child4, YGEdgeRight, 20); - YGNodeStyleSetWidth(root_child1_child4, 30); YGNodeStyleSetHeight(root_child1_child4, 30); + YGNodeStyleSetWidth(root_child1_child4, 30); + YGNodeStyleSetMargin(root_child1_child4, YGEdgeRight, 20); YGNodeInsertChild(root_child1, root_child1_child4, 4); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child2, YGEdgeLeft, 20); - YGNodeStyleSetWidth(root_child2, 50); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 50); + YGNodeStyleSetMargin(root_child2, YGEdgeLeft, 20); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5257,28 +5185,28 @@ TEST(YogaTest, align_content_stretch_and_align_items_flex_end_with_flex_wrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); - YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexStart); - YGNodeStyleSetWidth(root_child0, 150); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetWidth(root_child0, 150); + YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexStart); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 120); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetWidth(root_child1, 120); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 120); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 120); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5333,28 +5261,28 @@ TEST(YogaTest, align_content_stretch_and_align_items_flex_start_with_flex_wrap) YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); - YGNodeStyleSetWidth(root_child0, 150); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetWidth(root_child0, 150); + YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 120); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetWidth(root_child1, 120); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 120); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 120); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5409,28 +5337,28 @@ TEST(YogaTest, align_content_stretch_and_align_items_center_with_flex_wrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignStretch); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); - YGNodeStyleSetWidth(root_child0, 150); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetWidth(root_child0, 150); + YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 120); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetWidth(root_child1, 120); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 120); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 120); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5485,27 +5413,27 @@ TEST(YogaTest, align_content_stretch_and_align_items_stretch_with_flex_wrap) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); - YGNodeStyleSetWidth(root_child0, 150); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetWidth(root_child0, 150); + YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 120); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetWidth(root_child1, 120); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 120); YGNodeStyleSetHeight(root_child2, 50); + YGNodeStyleSetWidth(root_child2, 120); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGAlignItemsTest.cpp b/tests/generated/YGAlignItemsTest.cpp index e64d68e4f2..d9d16eef85 100644 --- a/tests/generated/YGAlignItemsTest.cpp +++ b/tests/generated/YGAlignItemsTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<1db57b05babb408c08efcec7dbdf16fb>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignItemsTest.html + * @generated SignedSource<<40cc61a8728b4532578e77a95e67d785>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAlignItemsTest.html */ #include @@ -57,14 +57,14 @@ TEST(YogaTest, align_items_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -99,14 +99,14 @@ TEST(YogaTest, align_items_flex_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -141,14 +141,14 @@ TEST(YogaTest, align_items_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -183,11 +183,11 @@ TEST(YogaTest, align_baseline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -241,11 +241,11 @@ TEST(YogaTest, align_baseline_child) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -314,11 +314,11 @@ TEST(YogaTest, align_baseline_child_multiline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -326,10 +326,10 @@ TEST(YogaTest, align_baseline_child_multiline) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 25); + YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); + YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); @@ -434,11 +434,11 @@ TEST(YogaTest, align_baseline_child_multiline_override) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -446,10 +446,10 @@ TEST(YogaTest, align_baseline_child_multiline_override) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 25); + YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); + YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); @@ -458,9 +458,9 @@ TEST(YogaTest, align_baseline_child_multiline_override) { YGNodeInsertChild(root_child1, root_child1_child0, 0); YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child1_child1, YGAlignBaseline); YGNodeStyleSetWidth(root_child1_child1, 25); YGNodeStyleSetHeight(root_child1_child1, 10); + YGNodeStyleSetAlignSelf(root_child1_child1, YGAlignBaseline); YGNodeInsertChild(root_child1, root_child1_child1, 1); YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config); @@ -469,9 +469,9 @@ TEST(YogaTest, align_baseline_child_multiline_override) { YGNodeInsertChild(root_child1, root_child1_child2, 2); YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child1_child3, YGAlignBaseline); YGNodeStyleSetWidth(root_child1_child3, 25); YGNodeStyleSetHeight(root_child1_child3, 10); + YGNodeStyleSetAlignSelf(root_child1_child3, YGAlignBaseline); YGNodeInsertChild(root_child1, root_child1_child3, 3); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -556,11 +556,11 @@ TEST(YogaTest, align_baseline_child_multiline_no_override_on_secondline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -568,10 +568,10 @@ TEST(YogaTest, align_baseline_child_multiline_no_override_on_secondline) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 25); + YGNodeStyleSetFlexWrap(root_child1, YGWrapWrap); + YGNodeStyleSetFlexDirection(root_child1, YGFlexDirectionRow); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); @@ -590,9 +590,9 @@ TEST(YogaTest, align_baseline_child_multiline_no_override_on_secondline) { YGNodeInsertChild(root_child1, root_child1_child2, 2); YGNodeRef root_child1_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child1_child3, YGAlignBaseline); YGNodeStyleSetWidth(root_child1_child3, 25); YGNodeStyleSetHeight(root_child1_child3, 10); + YGNodeStyleSetAlignSelf(root_child1_child3, YGAlignBaseline); YGNodeInsertChild(root_child1, root_child1_child3, 3); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -677,16 +677,16 @@ TEST(YogaTest, align_baseline_child_top) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -751,11 +751,11 @@ TEST(YogaTest, align_baseline_child_top2) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -763,9 +763,9 @@ TEST(YogaTest, align_baseline_child_top2) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetPosition(root_child1, YGEdgeTop, 5); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetPosition(root_child1, YGEdgeTop, 5); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); @@ -825,11 +825,11 @@ TEST(YogaTest, align_baseline_double_nested_child) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -913,10 +913,10 @@ TEST(YogaTest, align_baseline_column) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -970,19 +970,16 @@ TEST(YogaTest, align_baseline_child_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 5); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMargin(root_child0, YGEdgeAll, 5); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -991,12 +988,9 @@ TEST(YogaTest, align_baseline_child_margin) { YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1_child0, YGEdgeLeft, 1); - YGNodeStyleSetMargin(root_child1_child0, YGEdgeTop, 1); - YGNodeStyleSetMargin(root_child1_child0, YGEdgeRight, 1); - YGNodeStyleSetMargin(root_child1_child0, YGEdgeBottom, 1); YGNodeStyleSetWidth(root_child1_child0, 50); YGNodeStyleSetHeight(root_child1_child0, 10); + YGNodeStyleSetMargin(root_child1_child0, YGEdgeAll, 1); YGNodeInsertChild(root_child1, root_child1_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1051,15 +1045,12 @@ TEST(YogaTest, align_baseline_child_padding) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root, YGEdgeTop, 5); - YGNodeStyleSetPadding(root, YGEdgeRight, 5); - YGNodeStyleSetPadding(root, YGEdgeBottom, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 5); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1067,12 +1058,9 @@ TEST(YogaTest, align_baseline_child_padding) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child1, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child1, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child1, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child1, YGEdgeBottom, 5); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetPadding(root_child1, YGEdgeAll, 5); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); @@ -1132,12 +1120,12 @@ TEST(YogaTest, align_baseline_multiline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1253,11 +1241,11 @@ TEST(YogaTest, align_baseline_multiline_column) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1373,11 +1361,11 @@ TEST(YogaTest, align_baseline_multiline_column2) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1491,12 +1479,12 @@ TEST(YogaTest, align_baseline_multiline_row_and_column) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignBaseline); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignBaseline); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1610,21 +1598,21 @@ TEST(YogaTest, align_items_center_child_with_margin_bigger_than_parent) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); + YGNodeStyleSetWidth(root, 52); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignCenter); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0_child0, 52); YGNodeStyleSetHeight(root_child0_child0, 52); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1669,21 +1657,21 @@ TEST(YogaTest, align_items_flex_end_child_with_margin_bigger_than_parent) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); + YGNodeStyleSetWidth(root, 52); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignFlexEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0_child0, 52); YGNodeStyleSetHeight(root_child0_child0, 52); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1728,11 +1716,11 @@ TEST(YogaTest, align_items_center_child_without_margin_bigger_than_parent) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); + YGNodeStyleSetWidth(root, 52); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignCenter); @@ -1785,11 +1773,11 @@ TEST(YogaTest, align_items_flex_end_child_without_margin_bigger_than_parent) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); + YGNodeStyleSetWidth(root, 52); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignFlexEnd); @@ -1842,15 +1830,15 @@ TEST(YogaTest, align_center_should_size_based_on_content) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeTop, 20); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetMargin(root, YGEdgeTop, 20); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetFlexShrink(root_child0, 1); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1916,13 +1904,13 @@ TEST(YogaTest, align_stretch_should_size_based_on_parent) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeTop, 20); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetMargin(root, YGEdgeTop, 20); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeStyleSetFlexShrink(root_child0, 1); + YGNodeStyleSetJustifyContent(root_child0, YGJustifyCenter); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1988,8 +1976,8 @@ TEST(YogaTest, align_flex_start_with_shrinking_children) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetWidth(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignFlexStart); @@ -2058,8 +2046,8 @@ TEST(YogaTest, align_flex_start_with_stretching_children) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetWidth(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeInsertChild(root, root_child0, 0); @@ -2127,8 +2115,8 @@ TEST(YogaTest, align_flex_start_with_shrinking_children_with_stretch) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetWidth(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetAlignItems(root_child0, YGAlignFlexStart); @@ -2196,17 +2184,17 @@ TEST(YogaTest, align_flex_end_with_row_reverse) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 75); + YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 3); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 3); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -2257,15 +2245,15 @@ TEST(YogaTest, align_stretch_with_row_reverse) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 75); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 3); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 3); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -2331,6 +2319,7 @@ TEST(YogaTest, align_items_non_stretch_s526008) { YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 0); YGNodeStyleSetHeight(root_child0_child0_child0_child0, 10); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGAlignSelfTest.cpp b/tests/generated/YGAlignSelfTest.cpp index 81da59d6f9..ef85561e24 100644 --- a/tests/generated/YGAlignSelfTest.cpp +++ b/tests/generated/YGAlignSelfTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<43d956746b16865dfacb7b25e8fe367f>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAlignSelfTest.html + * @generated SignedSource<<11f5304e4f2c4a549b491291c3ddf72d>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAlignSelfTest.html */ #include @@ -22,9 +22,9 @@ TEST(YogaTest, align_self_center) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignCenter); - YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetAlignSelf(root_child0, YGAlignCenter); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -64,9 +64,9 @@ TEST(YogaTest, align_self_flex_end) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); - YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -106,9 +106,9 @@ TEST(YogaTest, align_self_flex_start) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexStart); - YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexStart); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -143,15 +143,15 @@ TEST(YogaTest, align_self_flex_end_override_flex_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); - YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetAlignSelf(root_child0, YGAlignFlexEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -186,21 +186,21 @@ TEST(YogaTest, align_self_baseline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child0, YGAlignBaseline); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetAlignSelf(root_child0, YGAlignBaseline); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignSelf(root_child1, YGAlignBaseline); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetAlignSelf(root_child1, YGAlignBaseline); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); diff --git a/tests/generated/YGAndroidNewsFeed.cpp b/tests/generated/YGAndroidNewsFeed.cpp index ce21b45a61..e8e4b7a3a3 100644 --- a/tests/generated/YGAndroidNewsFeed.cpp +++ b/tests/generated/YGAndroidNewsFeed.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<98875d3d64ab8d1a568e81773281be5c>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAndroidNewsFeed.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAndroidNewsFeed.html */ #include @@ -17,8 +17,8 @@ TEST(YogaTest, android_news_feed) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetWidth(root, 1080); YGNodeRef root_child0 = YGNodeNewWithConfig(config); @@ -34,10 +34,10 @@ TEST(YogaTest, android_news_feed) { YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child0_child0, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root_child0_child0_child0_child0, YGAlignStretch); YGNodeStyleSetAlignItems(root_child0_child0_child0_child0, YGAlignFlexStart); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeStart, 36); + YGNodeStyleSetAlignContent(root_child0_child0_child0_child0, YGAlignStretch); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 24); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeStart, 36); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config); @@ -78,10 +78,10 @@ TEST(YogaTest, android_news_feed) { YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0_child0_child1_child0, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root_child0_child0_child1_child0, YGAlignStretch); YGNodeStyleSetAlignItems(root_child0_child0_child1_child0, YGAlignFlexStart); - YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeStart, 174); + YGNodeStyleSetAlignContent(root_child0_child0_child1_child0, YGAlignStretch); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 24); + YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeStart, 174); YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0); YGNodeRef root_child0_child0_child1_child0_child0 = YGNodeNewWithConfig(config); diff --git a/tests/generated/YGAspectRatioTest.cpp b/tests/generated/YGAspectRatioTest.cpp index b4f879c993..16d35edf96 100644 --- a/tests/generated/YGAspectRatioTest.cpp +++ b/tests/generated/YGAspectRatioTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<0894aa78d01d5194e4c042491128cd1c>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAspectRatioTest.html + * @generated SignedSource<<5bcb67ab8942663d22e1cd5f7b5be0fe>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAspectRatioTest.html */ #include @@ -24,10 +24,10 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { YGNodeStyleSetHeight(root, 300); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetOverflow(root_child0, YGOverflowScroll); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); + YGNodeStyleSetOverflow(root_child0, YGOverflowScroll); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -38,7 +38,7 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { YGNodeStyleSetFlexGrow(root_child0_child0_child0, 2); YGNodeStyleSetFlexShrink(root_child0_child0_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0_child0_child0, 0); - YGNodeStyleSetAspectRatio(root_child0_child0_child0, 1 / 1); + YGNodeStyleSetAspectRatio(root_child0_child0_child0, 1); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); @@ -55,7 +55,7 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { YGNodeStyleSetFlexGrow(root_child0_child0_child2_child0, 1); YGNodeStyleSetFlexShrink(root_child0_child0_child2_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0_child0_child2_child0, 0); - YGNodeStyleSetAspectRatio(root_child0_child0_child2_child0, 1 / 1); + YGNodeStyleSetAspectRatio(root_child0_child0_child2_child0, 1); YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0); YGNodeRef root_child0_child0_child2_child0_child0 = YGNodeNewWithConfig(config); @@ -66,7 +66,7 @@ TEST(YogaTest, aspect_ratio_does_not_stretch_cross_axis_dim) { YGNodeStyleSetFlexGrow(root_child0_child0_child2_child0_child1, 1); YGNodeStyleSetFlexShrink(root_child0_child0_child2_child0_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child0_child0_child2_child0_child1, 0); - YGNodeStyleSetAspectRatio(root_child0_child0_child2_child0_child1, 1 / 1); + YGNodeStyleSetAspectRatio(root_child0_child0_child2_child0_child1, 1); YGNodeInsertChild(root_child0_child0_child2_child0, root_child0_child0_child2_child0_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -176,8 +176,8 @@ TEST(YogaTest, zero_aspect_ratio_behaves_like_auto) { YGNodeStyleSetHeight(root, 300); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetAspectRatio(root_child0, 0); YGNodeStyleSetWidth(root_child0, 50); - YGNodeStyleSetAspectRatio(root_child0, 0 / 1); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGAutoTest.cpp b/tests/generated/YGAutoTest.cpp index e1426a7c92..cf51d40960 100644 --- a/tests/generated/YGAutoTest.cpp +++ b/tests/generated/YGAutoTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<00e4ee58a2a66a3fcd064d3c517d8330>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGAutoTest.html + * @generated SignedSource<<5b67093f679c81d5effe513ecda452c3>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAutoTest.html */ #include @@ -17,10 +17,10 @@ TEST(YogaTest, auto_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidthAuto(root); YGNodeStyleSetHeight(root, 50); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -162,6 +162,7 @@ TEST(YogaTest, auto_flex_basis) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 50); + YGNodeStyleSetFlexBasisAuto(root); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -235,9 +236,9 @@ TEST(YogaTest, auto_position) { YGNodeStyleSetHeight(root, 50); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 25); YGNodeStyleSetHeight(root_child0, 25); + YGNodeStyleSetPositionAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -277,9 +278,9 @@ TEST(YogaTest, auto_margin) { YGNodeStyleSetHeight(root, 50); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetWidth(root_child0, 25); YGNodeStyleSetHeight(root_child0, 25); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGBorderTest.cpp b/tests/generated/YGBorderTest.cpp index b775e8af89..bf5399d311 100644 --- a/tests/generated/YGBorderTest.cpp +++ b/tests/generated/YGBorderTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<6b9e472d3a0bac5e3a5501788c9971c6>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGBorderTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGBorderTest.html */ #include @@ -18,10 +18,7 @@ TEST(YogaTest, border_no_size) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -46,10 +43,7 @@ TEST(YogaTest, border_container_match_child) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -89,16 +83,13 @@ TEST(YogaTest, border_flex_child) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -134,12 +125,9 @@ TEST(YogaTest, border_stretch_child) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -177,18 +165,18 @@ TEST(YogaTest, border_center_child) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetHeight(root, 100); YGNodeStyleSetBorder(root, YGEdgeStart, 10); YGNodeStyleSetBorder(root, YGEdgeEnd, 20); YGNodeStyleSetBorder(root, YGEdgeBottom, 20); - YGNodeStyleSetWidth(root, 100); - YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGBoxSizingTest.cpp b/tests/generated/YGBoxSizingTest.cpp index e7ee6643f4..0420f1af1d 100644 --- a/tests/generated/YGBoxSizingTest.cpp +++ b/tests/generated/YGBoxSizingTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<24bf988fec7e7f72a8f46ba74df63399>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGBoxSizingTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGBoxSizingTest.html */ #include @@ -18,16 +18,10 @@ TEST(YogaTest, box_sizing_content_box_simple) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root, YGEdgeTop, 5); - YGNodeStyleSetPadding(root, YGEdgeRight, 5); - YGNodeStyleSetPadding(root, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 5); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -53,16 +47,10 @@ TEST(YogaTest, box_sizing_border_box_simple) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root, YGEdgeTop, 5); - YGNodeStyleSetPadding(root, YGEdgeRight, 5); - YGNodeStyleSetPadding(root, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 5); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -91,16 +79,10 @@ TEST(YogaTest, box_sizing_content_box_percent) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 4); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 4); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 4); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 16); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 16); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 16); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 16); YGNodeStyleSetWidthPercent(root_child0, 50); YGNodeStyleSetHeightPercent(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 4); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 16); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -141,16 +123,10 @@ TEST(YogaTest, box_sizing_border_box_percent) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 4); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 4); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 4); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 16); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 16); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 16); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 16); YGNodeStyleSetWidthPercent(root_child0, 50); YGNodeStyleSetHeightPercent(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 4); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 16); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -190,17 +166,11 @@ TEST(YogaTest, box_sizing_content_box_absolute) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 12); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 12); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 12); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 12); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 8); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 8); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 8); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); YGNodeStyleSetHeightPercent(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 12); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 8); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -240,16 +210,10 @@ TEST(YogaTest, box_sizing_border_box_absolute) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 12); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 12); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 12); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 12); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 8); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 8); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 8); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); YGNodeStyleSetHeightPercent(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 12); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 8); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -285,16 +249,10 @@ TEST(YogaTest, box_sizing_content_box_comtaining_block) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 12); - YGNodeStyleSetPadding(root, YGEdgeTop, 12); - YGNodeStyleSetPadding(root, YGEdgeRight, 12); - YGNodeStyleSetPadding(root, YGEdgeBottom, 12); - YGNodeStyleSetBorder(root, YGEdgeLeft, 8); - YGNodeStyleSetBorder(root, YGEdgeTop, 8); - YGNodeStyleSetBorder(root, YGEdgeRight, 8); - YGNodeStyleSetBorder(root, YGEdgeBottom, 8); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 12); + YGNodeStyleSetBorder(root, YGEdgeAll, 8); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); YGNodeRef root_child0 = YGNodeNewWithConfig(config); @@ -302,9 +260,9 @@ TEST(YogaTest, box_sizing_content_box_comtaining_block) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0_child0, 50); YGNodeStyleSetHeightPercent(root_child0_child0, 25); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -350,25 +308,19 @@ TEST(YogaTest, box_sizing_border_box_comtaining_block) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 12); - YGNodeStyleSetPadding(root, YGEdgeTop, 12); - YGNodeStyleSetPadding(root, YGEdgeRight, 12); - YGNodeStyleSetPadding(root, YGEdgeBottom, 12); - YGNodeStyleSetBorder(root, YGEdgeLeft, 8); - YGNodeStyleSetBorder(root, YGEdgeTop, 8); - YGNodeStyleSetBorder(root, YGEdgeRight, 8); - YGNodeStyleSetBorder(root, YGEdgeBottom, 8); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 12); + YGNodeStyleSetBorder(root, YGEdgeAll, 8); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeStatic); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0_child0, 50); YGNodeStyleSetHeightPercent(root_child0_child0, 25); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -414,12 +366,9 @@ TEST(YogaTest, box_sizing_content_box_padding_only) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root, YGEdgeTop, 5); - YGNodeStyleSetPadding(root, YGEdgeRight, 5); - YGNodeStyleSetPadding(root, YGEdgeBottom, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 5); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -449,12 +398,9 @@ TEST(YogaTest, box_sizing_content_box_padding_only_percent) { YGNodeStyleSetHeight(root, 150); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeTop, 10); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeRight, 10); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 75); + YGNodeStyleSetPaddingPercent(root_child0, YGEdgeAll, 10); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -491,12 +437,9 @@ TEST(YogaTest, box_sizing_border_box_padding_only) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root, YGEdgeTop, 5); - YGNodeStyleSetPadding(root, YGEdgeRight, 5); - YGNodeStyleSetPadding(root, YGEdgeBottom, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 5); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -525,12 +468,9 @@ TEST(YogaTest, box_sizing_border_box_padding_only_percent) { YGNodeStyleSetHeight(root, 150); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeTop, 10); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeRight, 10); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 75); + YGNodeStyleSetPaddingPercent(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -566,12 +506,9 @@ TEST(YogaTest, box_sizing_content_box_border_only) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -638,12 +575,9 @@ TEST(YogaTest, box_sizing_border_box_border_only) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -761,16 +695,10 @@ TEST(YogaTest, box_sizing_content_box_children) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root, YGEdgeTop, 5); - YGNodeStyleSetPadding(root, YGEdgeRight, 5); - YGNodeStyleSetPadding(root, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 5); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); YGNodeRef root_child0 = YGNodeNewWithConfig(config); @@ -856,16 +784,10 @@ TEST(YogaTest, box_sizing_border_box_children) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root, YGEdgeTop, 5); - YGNodeStyleSetPadding(root, YGEdgeRight, 5); - YGNodeStyleSetPadding(root, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root, YGEdgeTop, 10); - YGNodeStyleSetBorder(root, YGEdgeRight, 10); - YGNodeStyleSetBorder(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 5); + YGNodeStyleSetBorder(root, YGEdgeAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 25); @@ -959,17 +881,11 @@ TEST(YogaTest, box_sizing_content_box_siblings) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child1, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child1, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root_child1, YGEdgeTop, 10); - YGNodeStyleSetBorder(root_child1, YGEdgeRight, 10); - YGNodeStyleSetBorder(root_child1, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child1, 25); YGNodeStyleSetHeight(root_child1, 25); YGNodeStyleSetBoxSizing(root_child1, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child1, YGEdgeAll, 10); + YGNodeStyleSetBorder(root_child1, YGEdgeAll, 10); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -1054,16 +970,10 @@ TEST(YogaTest, box_sizing_border_box_siblings) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child1, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child1, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root_child1, YGEdgeTop, 10); - YGNodeStyleSetBorder(root_child1, YGEdgeRight, 10); - YGNodeStyleSetBorder(root_child1, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child1, 25); YGNodeStyleSetHeight(root_child1, 25); + YGNodeStyleSetPadding(root_child1, YGEdgeAll, 10); + YGNodeStyleSetBorder(root_child1, YGEdgeAll, 10); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -1143,17 +1053,11 @@ TEST(YogaTest, box_sizing_content_box_max_width) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 15); YGNodeStyleSetMaxWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 25); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 15); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1208,16 +1112,10 @@ TEST(YogaTest, box_sizing_border_box_max_width) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 15); YGNodeStyleSetMaxWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 15); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1272,17 +1170,11 @@ TEST(YogaTest, box_sizing_content_box_max_height) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 15); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetMaxHeight(root_child0, 50); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 15); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1337,16 +1229,10 @@ TEST(YogaTest, box_sizing_border_box_max_height) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 15); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetMaxHeight(root_child0, 50); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 15); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1401,17 +1287,11 @@ TEST(YogaTest, box_sizing_content_box_min_width) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 15); YGNodeStyleSetMinWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 25); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 15); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1466,16 +1346,10 @@ TEST(YogaTest, box_sizing_border_box_min_width) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 15); YGNodeStyleSetMinWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 15); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1530,17 +1404,11 @@ TEST(YogaTest, box_sizing_content_box_min_height) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 15); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetMinHeight(root_child0, 50); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 15); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1595,16 +1463,10 @@ TEST(YogaTest, box_sizing_border_box_min_height) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 15); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 15); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetMinHeight(root_child0, 50); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 15); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1659,15 +1521,9 @@ TEST(YogaTest, box_sizing_content_box_no_height_no_width) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 7); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 2); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 7); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1707,14 +1563,8 @@ TEST(YogaTest, box_sizing_border_box_no_height_no_width) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 7); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 2); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 7); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1750,44 +1600,26 @@ TEST(YogaTest, box_sizing_content_box_nested) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 15); - YGNodeStyleSetPadding(root, YGEdgeTop, 15); - YGNodeStyleSetPadding(root, YGEdgeRight, 15); - YGNodeStyleSetPadding(root, YGEdgeBottom, 15); - YGNodeStyleSetBorder(root, YGEdgeLeft, 3); - YGNodeStyleSetBorder(root, YGEdgeTop, 3); - YGNodeStyleSetBorder(root, YGEdgeRight, 3); - YGNodeStyleSetBorder(root, YGEdgeBottom, 3); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root, YGEdgeAll, 15); + YGNodeStyleSetBorder(root, YGEdgeAll, 3); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 7); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 2); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 7); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 1); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 2); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 2); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 2); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 5); YGNodeStyleSetBoxSizing(root_child0_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeAll, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeAll, 2); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1833,41 +1665,23 @@ TEST(YogaTest, box_sizing_border_box_nested) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 15); - YGNodeStyleSetPadding(root, YGEdgeTop, 15); - YGNodeStyleSetPadding(root, YGEdgeRight, 15); - YGNodeStyleSetPadding(root, YGEdgeBottom, 15); - YGNodeStyleSetBorder(root, YGEdgeLeft, 3); - YGNodeStyleSetBorder(root, YGEdgeTop, 3); - YGNodeStyleSetBorder(root, YGEdgeRight, 3); - YGNodeStyleSetBorder(root, YGEdgeBottom, 3); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 15); + YGNodeStyleSetBorder(root, YGEdgeAll, 3); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 7); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 2); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 7); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 1); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 2); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 2); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 2); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 5); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeAll, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeAll, 2); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1913,56 +1727,32 @@ TEST(YogaTest, box_sizing_content_box_nested_alternating) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 3); - YGNodeStyleSetPadding(root, YGEdgeTop, 3); - YGNodeStyleSetPadding(root, YGEdgeRight, 3); - YGNodeStyleSetPadding(root, YGEdgeBottom, 3); - YGNodeStyleSetBorder(root, YGEdgeLeft, 2); - YGNodeStyleSetBorder(root, YGEdgeTop, 2); - YGNodeStyleSetBorder(root, YGEdgeRight, 2); - YGNodeStyleSetBorder(root, YGEdgeBottom, 2); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root, YGEdgeAll, 3); + YGNodeStyleSetBorder(root, YGEdgeAll, 2); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 8); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 8); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 8); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 2); YGNodeStyleSetWidth(root_child0, 40); YGNodeStyleSetHeight(root_child0, 40); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 3); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 3); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 3); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 6); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 6); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 6); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 6); YGNodeStyleSetWidth(root_child0_child0, 20); YGNodeStyleSetHeight(root_child0_child0, 25); YGNodeStyleSetBoxSizing(root_child0_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeAll, 3); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeAll, 6); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 1); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 1); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 1); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 1); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 1); YGNodeStyleSetWidth(root_child0_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0_child0, 5); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeAll, 1); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeAll, 1); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2018,56 +1808,32 @@ TEST(YogaTest, box_sizing_border_box_nested_alternating) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 3); - YGNodeStyleSetPadding(root, YGEdgeTop, 3); - YGNodeStyleSetPadding(root, YGEdgeRight, 3); - YGNodeStyleSetPadding(root, YGEdgeBottom, 3); - YGNodeStyleSetBorder(root, YGEdgeLeft, 2); - YGNodeStyleSetBorder(root, YGEdgeTop, 2); - YGNodeStyleSetBorder(root, YGEdgeRight, 2); - YGNodeStyleSetBorder(root, YGEdgeBottom, 2); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 3); + YGNodeStyleSetBorder(root, YGEdgeAll, 2); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 8); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 8); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 8); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 2); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 2); YGNodeStyleSetWidth(root_child0, 40); YGNodeStyleSetHeight(root_child0, 40); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 3); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 3); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 3); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 6); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 6); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 6); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 6); YGNodeStyleSetWidth(root_child0_child0, 20); YGNodeStyleSetHeight(root_child0_child0, 25); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeAll, 3); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeAll, 6); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 1); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 1); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 1); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 1); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 1); YGNodeStyleSetWidth(root_child0_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0_child0, 5); YGNodeStyleSetBoxSizing(root_child0_child0_child0, YGBoxSizingContentBox); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeAll, 1); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeAll, 1); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2124,22 +1890,16 @@ TEST(YogaTest, box_sizing_content_box_flex_basis_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 10); YGNodeStyleSetHeight(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 10); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2175,22 +1935,16 @@ TEST(YogaTest, box_sizing_border_box_flex_basis_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 10); YGNodeStyleSetHeight(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2233,15 +1987,9 @@ TEST(YogaTest, box_sizing_content_box_flex_basis_column) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 10); YGNodeStyleSetHeight(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 10); YGNodeStyleSetBoxSizing(root_child0, YGBoxSizingContentBox); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2283,15 +2031,9 @@ TEST(YogaTest, box_sizing_border_box_flex_basis_column) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeTop, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeRight, 10); - YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 10); YGNodeStyleSetHeight(root_child0, 25); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 5); + YGNodeStyleSetBorder(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2327,9 +2069,9 @@ TEST(YogaTest, box_sizing_content_box_padding_start) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeStart, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeStart, 5); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2355,9 +2097,9 @@ TEST(YogaTest, box_sizing_border_box_padding_start) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeStart, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeStart, 5); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -2382,9 +2124,9 @@ TEST(YogaTest, box_sizing_content_box_padding_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeEnd, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeEnd, 5); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2410,9 +2152,9 @@ TEST(YogaTest, box_sizing_border_box_padding_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeEnd, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeEnd, 5); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -2437,9 +2179,9 @@ TEST(YogaTest, box_sizing_content_box_border_start) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeStart, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetBorder(root, YGEdgeStart, 5); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2465,9 +2207,9 @@ TEST(YogaTest, box_sizing_border_box_border_start) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeStart, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetBorder(root, YGEdgeStart, 5); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -2492,9 +2234,9 @@ TEST(YogaTest, box_sizing_content_box_border_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeEnd, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetBorder(root, YGEdgeEnd, 5); YGNodeStyleSetBoxSizing(root, YGBoxSizingContentBox); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2520,9 +2262,9 @@ TEST(YogaTest, box_sizing_border_box_border_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeEnd, 5); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetBorder(root, YGEdgeEnd, 5); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); diff --git a/tests/generated/YGDimensionTest.cpp b/tests/generated/YGDimensionTest.cpp index 829f2b6a80..a95434d1b3 100644 --- a/tests/generated/YGDimensionTest.cpp +++ b/tests/generated/YGDimensionTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<029b6e60daca98deb68e91f06cbd8c76>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGDimensionTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGDimensionTest.html */ #include diff --git a/tests/generated/YGDisplayTest.cpp b/tests/generated/YGDisplayTest.cpp index ec6f805ed1..1430566614 100644 --- a/tests/generated/YGDisplayTest.cpp +++ b/tests/generated/YGDisplayTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGDisplayTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGDisplayTest.html */ #include @@ -17,10 +17,10 @@ TEST(YogaTest, display_none) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -73,10 +73,10 @@ TEST(YogaTest, display_none_fixed_size) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -130,19 +130,16 @@ TEST(YogaTest, display_none_with_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeStyleSetDisplay(root_child0, YGDisplayNone); + YGNodeStyleSetMargin(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -191,10 +188,10 @@ TEST(YogaTest, display_none_with_child) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -284,10 +281,10 @@ TEST(YogaTest, display_none_with_position) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -295,8 +292,8 @@ TEST(YogaTest, display_none_with_position) { YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child1, 1); - YGNodeStyleSetPosition(root_child1, YGEdgeTop, 10); YGNodeStyleSetDisplay(root_child1, YGDisplayNone); + YGNodeStyleSetPosition(root_child1, YGEdgeTop, 10); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -346,10 +343,10 @@ TEST(YogaTest, display_none_with_position_absolute) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetDisplay(root_child0, YGDisplayNone); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); - YGNodeStyleSetDisplay(root_child0, YGDisplayNone); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -384,10 +381,10 @@ TEST(YogaTest, display_contents) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetDisplay(root_child0, YGDisplayContents); @@ -459,15 +456,15 @@ TEST(YogaTest, display_contents_fixed_size) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetDisplay(root_child0, YGDisplayContents); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); - YGNodeStyleSetDisplay(root_child0, YGDisplayContents); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -536,19 +533,16 @@ TEST(YogaTest, display_contents_with_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); YGNodeStyleSetDisplay(root_child0, YGDisplayContents); + YGNodeStyleSetMargin(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -597,17 +591,14 @@ TEST(YogaTest, display_contents_with_padding) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 10); YGNodeStyleSetDisplay(root_child0, YGDisplayContents); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -676,14 +667,14 @@ TEST(YogaTest, display_contents_with_position) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10); YGNodeStyleSetDisplay(root_child0, YGDisplayContents); + YGNodeStyleSetPosition(root_child0, YGEdgeTop, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -752,16 +743,16 @@ TEST(YogaTest, display_contents_with_position_absolute) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetDisplay(root_child0, YGDisplayContents); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); - YGNodeStyleSetDisplay(root_child0, YGDisplayContents); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -830,10 +821,10 @@ TEST(YogaTest, display_contents_nested) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetDisplay(root_child0, YGDisplayContents); @@ -919,10 +910,10 @@ TEST(YogaTest, display_contents_with_siblings) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); diff --git a/tests/generated/YGFlexDirectionTest.cpp b/tests/generated/YGFlexDirectionTest.cpp index d7b249dede..ba3646cbb0 100644 --- a/tests/generated/YGFlexDirectionTest.cpp +++ b/tests/generated/YGFlexDirectionTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<52e047e144a63ab101701faf9b0cf06d>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexDirectionTest.html + * @generated SignedSource<<72067070240f28a88e61f4a8e539a1d6>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGFlexDirectionTest.html */ #include @@ -84,9 +84,9 @@ TEST(YogaTest, flex_direction_row_no_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -153,8 +153,8 @@ TEST(YogaTest, flex_direction_column) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -220,10 +220,10 @@ TEST(YogaTest, flex_direction_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -289,10 +289,10 @@ TEST(YogaTest, flex_direction_column_reverse) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -358,10 +358,10 @@ TEST(YogaTest, flex_direction_row_reverse) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -427,11 +427,11 @@ TEST(YogaTest, flex_direction_row_reverse_margin_left) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeLeft, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetMargin(root, YGEdgeLeft, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -497,11 +497,11 @@ TEST(YogaTest, flex_direction_row_reverse_margin_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeStart, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetMargin(root, YGEdgeStart, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -567,11 +567,11 @@ TEST(YogaTest, flex_direction_row_reverse_margin_right) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeRight, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetMargin(root, YGEdgeRight, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -637,11 +637,11 @@ TEST(YogaTest, flex_direction_row_reverse_margin_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeEnd, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetMargin(root, YGEdgeEnd, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -707,11 +707,11 @@ TEST(YogaTest, flex_direction_column_reverse_margin_top) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeTop, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetMargin(root, YGEdgeTop, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -777,11 +777,11 @@ TEST(YogaTest, flex_direction_column_reverse_margin_bottom) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeBottom, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetMargin(root, YGEdgeBottom, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -847,11 +847,11 @@ TEST(YogaTest, flex_direction_row_reverse_padding_left) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPadding(root, YGEdgeLeft, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -917,11 +917,11 @@ TEST(YogaTest, flex_direction_row_reverse_padding_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeStart, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPadding(root, YGEdgeStart, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -987,11 +987,11 @@ TEST(YogaTest, flex_direction_row_reverse_padding_right) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeRight, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPadding(root, YGEdgeRight, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1057,11 +1057,11 @@ TEST(YogaTest, flex_direction_row_reverse_padding_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeEnd, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetPadding(root, YGEdgeEnd, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1127,11 +1127,11 @@ TEST(YogaTest, flex_direction_column_reverse_padding_top) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeTop, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetPadding(root, YGEdgeTop, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1197,11 +1197,11 @@ TEST(YogaTest, flex_direction_column_reverse_padding_bottom) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeBottom, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetPadding(root, YGEdgeBottom, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1267,11 +1267,11 @@ TEST(YogaTest, flex_direction_row_reverse_border_left) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeLeft, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetBorder(root, YGEdgeLeft, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1337,11 +1337,11 @@ TEST(YogaTest, flex_direction_row_reverse_border_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeStart, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetBorder(root, YGEdgeStart, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1407,11 +1407,11 @@ TEST(YogaTest, flex_direction_row_reverse_border_right) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeRight, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetBorder(root, YGEdgeRight, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1477,11 +1477,11 @@ TEST(YogaTest, flex_direction_row_reverse_border_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeEnd, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetBorder(root, YGEdgeEnd, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1547,11 +1547,11 @@ TEST(YogaTest, flex_direction_column_reverse_border_top) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeTop, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetBorder(root, YGEdgeTop, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1617,11 +1617,11 @@ TEST(YogaTest, flex_direction_column_reverse_border_bottom) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root, YGEdgeBottom, 100); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionColumnReverse); + YGNodeStyleSetBorder(root, YGEdgeBottom, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -1688,14 +1688,14 @@ TEST(YogaTest, flex_direction_row_reverse_pos_left) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 100); - YGNodeStyleSetWidth(root_child0, 100); - YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1773,14 +1773,14 @@ TEST(YogaTest, flex_direction_row_reverse_pos_start) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeStyleSetPosition(root_child0, YGEdgeStart, 100); - YGNodeStyleSetWidth(root_child0, 100); - YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1858,14 +1858,14 @@ TEST(YogaTest, flex_direction_row_reverse_pos_right) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeStyleSetPosition(root_child0, YGEdgeRight, 100); - YGNodeStyleSetWidth(root_child0, 100); - YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1943,14 +1943,14 @@ TEST(YogaTest, flex_direction_row_reverse_pos_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeStyleSetPosition(root_child0, YGEdgeEnd, 100); - YGNodeStyleSetWidth(root_child0, 100); - YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2028,14 +2028,14 @@ TEST(YogaTest, flex_direction_column_reverse_pos_top) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeStyleSetPosition(root_child0, YGEdgeTop, 100); - YGNodeStyleSetWidth(root_child0, 100); - YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2113,14 +2113,14 @@ TEST(YogaTest, flex_direction_column_reverse_pos_bottom) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 100); - YGNodeStyleSetWidth(root_child0, 100); - YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2198,20 +2198,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_pos_left) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0, YGEdgeLeft, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPosition(root_child0_child0, YGEdgeLeft, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -2285,20 +2285,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_pos_right) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPosition(root_child0_child0, YGEdgeRight, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -2372,20 +2372,20 @@ TEST(YogaTest, flex_direction_col_reverse_inner_pos_top) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPosition(root_child0_child0, YGEdgeTop, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -2459,20 +2459,20 @@ TEST(YogaTest, flex_direction_col_reverse_inner_pos_bottom) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPosition(root_child0_child0, YGEdgeBottom, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -2548,20 +2548,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_pos_start) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0, YGEdgeStart, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPosition(root_child0_child0, YGEdgeStart, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -2637,20 +2637,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_pos_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0, YGEdgeEnd, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPosition(root_child0_child0, YGEdgeEnd, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -2724,20 +2724,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_margin_left) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -2811,20 +2811,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_margin_right) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -2898,20 +2898,20 @@ TEST(YogaTest, flex_direction_col_reverse_inner_margin_top) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -2985,20 +2985,20 @@ TEST(YogaTest, flex_direction_col_reverse_inner_margin_bottom) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3072,20 +3072,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_marign_start) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeStart, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeStart, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3159,20 +3159,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_margin_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeEnd, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeEnd, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3246,20 +3246,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_border_left) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3333,20 +3333,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_border_right) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3420,20 +3420,20 @@ TEST(YogaTest, flex_direction_col_reverse_inner_border_top) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3507,20 +3507,20 @@ TEST(YogaTest, flex_direction_col_reverse_inner_border_bottom) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3594,20 +3594,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_border_start) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeStart, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3681,20 +3681,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_border_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeEnd, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3768,20 +3768,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_padding_left) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3855,20 +3855,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_padding_right) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -3942,20 +3942,20 @@ TEST(YogaTest, flex_direction_col_reverse_inner_padding_top) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -4029,20 +4029,20 @@ TEST(YogaTest, flex_direction_col_reverse_inner_padding_bottom) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -4116,20 +4116,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_padding_start) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeStart, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeStart, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -4203,20 +4203,20 @@ TEST(YogaTest, flex_direction_row_reverse_inner_padding_end) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeEnd, 10); YGNodeStyleSetWidth(root_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeEnd, 10); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -4290,15 +4290,15 @@ TEST(YogaTest, flex_direction_alternating_with_percent) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 300); + YGNodeStyleSetWidth(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetHeightPercent(root_child0, 50); + YGNodeStyleSetWidthPercent(root_child0, 50); YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 10); YGNodeStyleSetPositionPercent(root_child0, YGEdgeTop, 10); - YGNodeStyleSetWidthPercent(root_child0, 50); - YGNodeStyleSetHeightPercent(root_child0, 50); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGFlexTest.cpp b/tests/generated/YGFlexTest.cpp index 965b31453e..1bef802400 100644 --- a/tests/generated/YGFlexTest.cpp +++ b/tests/generated/YGFlexTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<66f3152eedefd8718b50d16ea931e255>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGFlexTest.html */ #include @@ -22,8 +22,8 @@ TEST(YogaTest, flex_basis_flex_grow_column) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -72,21 +72,21 @@ TEST(YogaTest, flex_shrink_flex_grow_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetWidth(root_child0, 500); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetWidth(root_child1, 500); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -131,22 +131,22 @@ TEST(YogaTest, flex_shrink_flex_grow_child_flex_shrink_other_child) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetWidth(root_child0, 500); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); - YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetWidth(root_child1, 500); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetFlexGrow(root_child1, 1); + YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -191,14 +191,14 @@ TEST(YogaTest, flex_basis_flex_grow_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -252,8 +252,8 @@ TEST(YogaTest, flex_basis_flex_shrink_column) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 100); + YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -302,14 +302,14 @@ TEST(YogaTest, flex_basis_flex_shrink_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 100); + YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -367,9 +367,9 @@ TEST(YogaTest, flex_shrink_to_zero) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); + YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -430,23 +430,23 @@ TEST(YogaTest, flex_basis_overrides_main_size) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 20); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -502,8 +502,8 @@ TEST(YogaTest, flex_grow_shrink_at_most) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeInsertChild(root, root_child0, 0); @@ -556,8 +556,8 @@ TEST(YogaTest, flex_grow_less_than_factor_one) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetWidth(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 0.2f); diff --git a/tests/generated/YGFlexWrapTest.cpp b/tests/generated/YGFlexWrapTest.cpp index 3c08361fa7..c6300d06d8 100644 --- a/tests/generated/YGFlexWrapTest.cpp +++ b/tests/generated/YGFlexWrapTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<736016d0832b2cf628b204cca95e0141>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGFlexWrapTest.html + * @generated SignedSource<<6df462978f414977308bd5684b3db30a>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGFlexWrapTest.html */ #include @@ -14,37 +14,39 @@ #include "../util/TestUtil.h" TEST(YogaTest, wrap_column) { + GTEST_SKIP(); + YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 30); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 30); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 30); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); - ASSERT_FLOAT_EQ(60, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(30, YGNodeLayoutGetWidth(root)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); @@ -71,25 +73,25 @@ TEST(YogaTest, wrap_column) { ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); - ASSERT_FLOAT_EQ(60, YGNodeLayoutGetWidth(root)); + ASSERT_FLOAT_EQ(30, YGNodeLayoutGetWidth(root)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); - ASSERT_FLOAT_EQ(30, YGNodeLayoutGetLeft(root_child0)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child0)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child0)); ASSERT_FLOAT_EQ(30, YGNodeLayoutGetWidth(root_child0)); ASSERT_FLOAT_EQ(30, YGNodeLayoutGetHeight(root_child0)); - ASSERT_FLOAT_EQ(30, YGNodeLayoutGetLeft(root_child1)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child1)); ASSERT_FLOAT_EQ(30, YGNodeLayoutGetTop(root_child1)); ASSERT_FLOAT_EQ(30, YGNodeLayoutGetWidth(root_child1)); ASSERT_FLOAT_EQ(30, YGNodeLayoutGetHeight(root_child1)); - ASSERT_FLOAT_EQ(30, YGNodeLayoutGetLeft(root_child2)); + ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child2)); ASSERT_FLOAT_EQ(60, YGNodeLayoutGetTop(root_child2)); ASSERT_FLOAT_EQ(30, YGNodeLayoutGetWidth(root_child2)); ASSERT_FLOAT_EQ(30, YGNodeLayoutGetHeight(root_child2)); - ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root_child3)); + ASSERT_FLOAT_EQ(-30, YGNodeLayoutGetLeft(root_child3)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root_child3)); ASSERT_FLOAT_EQ(30, YGNodeLayoutGetWidth(root_child3)); ASSERT_FLOAT_EQ(30, YGNodeLayoutGetHeight(root_child3)); @@ -103,29 +105,29 @@ TEST(YogaTest, wrap_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 30); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 30); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 30); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -190,30 +192,30 @@ TEST(YogaTest, wrap_row_align_items_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 30); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -278,30 +280,30 @@ TEST(YogaTest, wrap_row_align_items_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 30); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -366,21 +368,21 @@ TEST(YogaTest, flex_wrap_children_with_min_main_overriding_flex_basis) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetMinWidth(root_child0, 55); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMinWidth(root_child0, 55); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexBasis(root_child1, 50); - YGNodeStyleSetMinWidth(root_child1, 55); YGNodeStyleSetHeight(root_child1, 50); + YGNodeStyleSetMinWidth(root_child1, 55); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -438,8 +440,8 @@ TEST(YogaTest, flex_wrap_wrap_to_child_height) { YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0_child0, 100); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -509,11 +511,11 @@ TEST(YogaTest, flex_wrap_align_stretch_fits_one_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 150); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -565,34 +567,34 @@ TEST(YogaTest, wrap_reverse_row_align_content_flex_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); + YGNodeStyleSetWidth(root_child4, 30); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -667,35 +669,35 @@ TEST(YogaTest, wrap_reverse_row_align_content_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); + YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); + YGNodeStyleSetWidth(root_child4, 30); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -770,34 +772,34 @@ TEST(YogaTest, wrap_reverse_row_single_line_different_size) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 300); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); + YGNodeStyleSetWidth(root_child4, 30); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -872,35 +874,35 @@ TEST(YogaTest, wrap_reverse_row_align_content_stretch) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); + YGNodeStyleSetWidth(root_child4, 30); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -975,35 +977,35 @@ TEST(YogaTest, wrap_reverse_row_align_content_space_around) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); + YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); + YGNodeStyleSetWidth(root_child4, 30); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1078,35 +1080,35 @@ TEST(YogaTest, wrap_reverse_column_fixed_size) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrapReverse); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 30); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 30); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child1, 30); YGNodeStyleSetHeight(root_child1, 20); + YGNodeStyleSetWidth(root_child1, 30); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child2, 30); YGNodeStyleSetHeight(root_child2, 30); + YGNodeStyleSetWidth(root_child2, 30); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child3, 30); YGNodeStyleSetHeight(root_child3, 40); + YGNodeStyleSetWidth(root_child3, 30); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child4, 30); YGNodeStyleSetHeight(root_child4, 50); + YGNodeStyleSetWidth(root_child4, 30); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1181,10 +1183,10 @@ TEST(YogaTest, wrapped_row_within_align_items_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -1253,10 +1255,10 @@ TEST(YogaTest, wrapped_row_within_align_items_flex_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -1325,10 +1327,10 @@ TEST(YogaTest, wrapped_row_within_align_items_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -1397,13 +1399,13 @@ TEST(YogaTest, wrapped_column_max_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetWidth(root, 700); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignContent(root, YGAlignCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); - YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetWidth(root, 700); - YGNodeStyleSetHeight(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 100); @@ -1412,12 +1414,9 @@ TEST(YogaTest, wrapped_column_max_height) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1, YGEdgeLeft, 20); - YGNodeStyleSetMargin(root_child1, YGEdgeTop, 20); - YGNodeStyleSetMargin(root_child1, YGEdgeRight, 20); - YGNodeStyleSetMargin(root_child1, YGEdgeBottom, 20); YGNodeStyleSetWidth(root_child1, 200); YGNodeStyleSetHeight(root_child1, 200); + YGNodeStyleSetMargin(root_child1, YGEdgeAll, 20); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -1477,33 +1476,30 @@ TEST(YogaTest, wrapped_column_max_height_flex) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetWidth(root, 700); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetAlignContent(root, YGAlignCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); - YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetWidth(root, 700); - YGNodeStyleSetHeight(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); - YGNodeStyleSetFlexShrink(root_child0, 1); - YGNodeStyleSetFlexBasisPercent(root_child0, 0); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 500); YGNodeStyleSetMaxHeight(root_child0, 200); + YGNodeStyleSetFlexGrow(root_child0, 1); + YGNodeStyleSetFlexShrink(root_child0, 1); + YGNodeStyleSetFlexBasisPercent(root_child0, 0); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetWidth(root_child1, 200); + YGNodeStyleSetHeight(root_child1, 200); + YGNodeStyleSetMargin(root_child1, YGEdgeAll, 20); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); - YGNodeStyleSetMargin(root_child1, YGEdgeLeft, 20); - YGNodeStyleSetMargin(root_child1, YGEdgeTop, 20); - YGNodeStyleSetMargin(root_child1, YGEdgeRight, 20); - YGNodeStyleSetMargin(root_child1, YGEdgeBottom, 20); - YGNodeStyleSetWidth(root_child1, 200); - YGNodeStyleSetHeight(root_child1, 200); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -1577,8 +1573,8 @@ TEST(YogaTest, wrap_nodes_with_content_sizing_overflowing_margin) { YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0_child0_child0, 40); YGNodeStyleSetHeight(root_child0_child0_child0, 40); + YGNodeStyleSetWidth(root_child0_child0_child0, 40); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -1586,8 +1582,8 @@ TEST(YogaTest, wrap_nodes_with_content_sizing_overflowing_margin) { YGNodeInsertChild(root_child0, root_child0_child1, 1); YGNodeRef root_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0_child1_child0, 40); YGNodeStyleSetHeight(root_child0_child1_child0, 40); + YGNodeStyleSetWidth(root_child0_child1_child0, 40); YGNodeInsertChild(root_child0_child1, root_child0_child1_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1676,8 +1672,8 @@ TEST(YogaTest, wrap_nodes_with_content_sizing_margin_cross) { YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0_child0_child0, 40); YGNodeStyleSetHeight(root_child0_child0_child0, 40); + YGNodeStyleSetWidth(root_child0_child0_child0, 40); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -1685,8 +1681,8 @@ TEST(YogaTest, wrap_nodes_with_content_sizing_margin_cross) { YGNodeInsertChild(root_child0, root_child0_child1, 1); YGNodeRef root_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0_child1_child0, 40); YGNodeStyleSetHeight(root_child0_child1_child0, 40); + YGNodeStyleSetWidth(root_child0_child1_child0, 40); YGNodeInsertChild(root_child0_child1, root_child0_child1_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1761,11 +1757,11 @@ TEST(YogaTest, wrap_with_min_cross_axis) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetMinHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 400); @@ -1819,11 +1815,11 @@ TEST(YogaTest, wrap_with_max_cross_axis) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetMaxHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 400); @@ -1877,9 +1873,9 @@ TEST(YogaTest, nowrap_expands_flexline_box_to_min_cross) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinHeight(root, 400); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -1919,10 +1915,10 @@ TEST(YogaTest, wrap_does_not_impose_min_cross_onto_single_flexline) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetMinHeight(root, 400); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); diff --git a/tests/generated/YGGapTest.cpp b/tests/generated/YGGapTest.cpp index e459a40325..9e4cd069be 100644 --- a/tests/generated/YGGapTest.cpp +++ b/tests/generated/YGGapTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGGapTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGGapTest.html */ #include @@ -17,8 +17,8 @@ TEST(YogaTest, column_gap_flexible) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -94,8 +94,8 @@ TEST(YogaTest, column_gap_inflexible) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -164,8 +164,8 @@ TEST(YogaTest, column_gap_mixed_flexible) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -236,8 +236,8 @@ TEST(YogaTest, column_gap_child_margins) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -246,24 +246,21 @@ TEST(YogaTest, column_gap_child_margins) { YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 2); + YGNodeStyleSetMargin(root_child0, YGEdgeHorizontal, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); - YGNodeStyleSetMargin(root_child1, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root_child1, YGEdgeRight, 10); + YGNodeStyleSetMargin(root_child1, YGEdgeHorizontal, 10); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetFlexShrink(root_child2, 1); YGNodeStyleSetFlexBasisPercent(root_child2, 0); - YGNodeStyleSetMargin(root_child2, YGEdgeLeft, 15); - YGNodeStyleSetMargin(root_child2, YGEdgeRight, 15); + YGNodeStyleSetMargin(root_child2, YGEdgeHorizontal, 15); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -318,8 +315,8 @@ TEST(YogaTest, column_row_gap_wrapping) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -482,17 +479,17 @@ TEST(YogaTest, column_gap_start_index) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 80); YGNodeStyleSetGap(root, YGGutterColumn, 10); YGNodeStyleSetGap(root, YGGutterRow, 20); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -572,8 +569,8 @@ TEST(YogaTest, column_gap_justify_flex_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -642,9 +639,9 @@ TEST(YogaTest, column_gap_justify_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -713,9 +710,9 @@ TEST(YogaTest, column_gap_justify_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); - YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -784,9 +781,9 @@ TEST(YogaTest, column_gap_justify_space_between) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); - YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -855,9 +852,9 @@ TEST(YogaTest, column_gap_justify_space_around) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); - YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -926,9 +923,9 @@ TEST(YogaTest, column_gap_justify_space_evenly) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); - YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -997,8 +994,8 @@ TEST(YogaTest, column_gap_wrap_align_flex_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); @@ -1117,10 +1114,10 @@ TEST(YogaTest, column_gap_wrap_align_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignCenter); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -1238,10 +1235,10 @@ TEST(YogaTest, column_gap_wrap_align_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignFlexEnd); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -1359,10 +1356,10 @@ TEST(YogaTest, column_gap_wrap_align_space_between) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignSpaceBetween); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -1480,10 +1477,10 @@ TEST(YogaTest, column_gap_wrap_align_space_around) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetAlignContent(root, YGAlignSpaceAround); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -1601,37 +1598,37 @@ TEST(YogaTest, column_gap_wrap_align_stretch) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); YGNodeStyleSetGap(root, YGGutterColumn, 5); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMinWidth(root_child0, 60); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetMinWidth(root_child1, 60); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetMinWidth(root_child2, 60); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeStyleSetMinWidth(root_child3, 60); + YGNodeStyleSetFlexGrow(root_child3, 1); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child4, 1); YGNodeStyleSetMinWidth(root_child4, 60); + YGNodeStyleSetFlexGrow(root_child4, 1); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1706,8 +1703,8 @@ TEST(YogaTest, column_gap_determines_parent_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetGap(root, YGGutterColumn, 10); @@ -1775,14 +1772,14 @@ TEST(YogaTest, row_gap_align_items_stretch) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 200); YGNodeStyleSetGap(root, YGGutterColumn, 10); YGNodeStyleSetGap(root, YGGutterRow, 20); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 20); @@ -1890,14 +1887,14 @@ TEST(YogaTest, row_gap_align_items_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 200); YGNodeStyleSetGap(root, YGGutterColumn, 10); YGNodeStyleSetGap(root, YGGutterRow, 20); + YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 20); @@ -2014,24 +2011,21 @@ TEST(YogaTest, row_gap_column_child_margins) { YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 0); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 2); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 2); + YGNodeStyleSetMargin(root_child0, YGEdgeVertical, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexShrink(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 0); - YGNodeStyleSetMargin(root_child1, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child1, YGEdgeBottom, 10); + YGNodeStyleSetMargin(root_child1, YGEdgeVertical, 10); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetFlexShrink(root_child2, 1); YGNodeStyleSetFlexBasisPercent(root_child2, 0); - YGNodeStyleSetMargin(root_child2, YGEdgeTop, 15); - YGNodeStyleSetMargin(root_child2, YGEdgeBottom, 15); + YGNodeStyleSetMargin(root_child2, YGEdgeVertical, 15); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2086,29 +2080,26 @@ TEST(YogaTest, row_gap_row_wrap_child_margins) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 200); YGNodeStyleSetGap(root, YGGutterRow, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 2); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 2); YGNodeStyleSetWidth(root_child0, 60); + YGNodeStyleSetMargin(root_child0, YGEdgeVertical, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child1, YGEdgeTop, 10); - YGNodeStyleSetMargin(root_child1, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child1, 60); + YGNodeStyleSetMargin(root_child1, YGEdgeVertical, 10); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child2, YGEdgeTop, 15); - YGNodeStyleSetMargin(root_child2, YGEdgeBottom, 15); YGNodeStyleSetWidth(root_child2, 60); + YGNodeStyleSetMargin(root_child2, YGEdgeVertical, 15); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2231,17 +2222,13 @@ TEST(YogaTest, row_gap_percent_wrapping) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetPadding(root, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetPadding(root, YGEdgeRight, 10); - YGNodeStyleSetPadding(root, YGEdgeBottom, 10); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 700); - YGNodeStyleSetGapPercent(root, YGGutterColumn, 10); - YGNodeStyleSetGapPercent(root, YGGutterRow, 10); + YGNodeStyleSetPadding(root, YGEdgeAll, 10); + YGNodeStyleSetGapPercent(root, YGGutterAll, 10); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 100); @@ -2340,12 +2327,11 @@ TEST(YogaTest, row_gap_percent_determines_parent_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 300); - YGNodeStyleSetGapPercent(root, YGGutterColumn, 10); - YGNodeStyleSetGapPercent(root, YGGutterRow, 10); + YGNodeStyleSetGapPercent(root, YGGutterAll, 10); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 100); @@ -2444,61 +2430,42 @@ TEST(YogaTest, row_gap_percent_wrapping_with_both_content_padding_and_item_paddi YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetPadding(root, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetPadding(root, YGEdgeRight, 10); - YGNodeStyleSetPadding(root, YGEdgeBottom, 10); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 700); - YGNodeStyleSetGapPercent(root, YGGutterColumn, 10); - YGNodeStyleSetGapPercent(root, YGGutterRow, 10); + YGNodeStyleSetPadding(root, YGEdgeAll, 10); + YGNodeStyleSetGapPercent(root, YGGutterAll, 10); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child1, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child1, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child1, 100); YGNodeStyleSetHeight(root_child1, 100); + YGNodeStyleSetPadding(root_child1, YGEdgeAll, 10); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child2, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child2, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child2, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child2, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child2, 100); YGNodeStyleSetHeight(root_child2, 100); + YGNodeStyleSetPadding(root_child2, YGEdgeAll, 10); YGNodeInsertChild(root, root_child2, 2); YGNodeRef root_child3 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child3, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child3, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child3, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child3, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child3, 100); YGNodeStyleSetHeight(root_child3, 100); + YGNodeStyleSetPadding(root_child3, YGEdgeAll, 10); YGNodeInsertChild(root, root_child3, 3); YGNodeRef root_child4 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child4, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root_child4, YGEdgeTop, 10); - YGNodeStyleSetPadding(root_child4, YGEdgeRight, 10); - YGNodeStyleSetPadding(root_child4, YGEdgeBottom, 10); YGNodeStyleSetWidth(root_child4, 100); YGNodeStyleSetHeight(root_child4, 100); + YGNodeStyleSetPadding(root_child4, YGEdgeAll, 10); YGNodeInsertChild(root, root_child4, 4); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2573,17 +2540,13 @@ TEST(YogaTest, row_gap_percent_wrapping_with_both_content_padding) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetPadding(root, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetPadding(root, YGEdgeRight, 10); - YGNodeStyleSetPadding(root, YGEdgeBottom, 10); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 700); - YGNodeStyleSetGapPercent(root, YGGutterColumn, 10); - YGNodeStyleSetGapPercent(root, YGGutterRow, 10); + YGNodeStyleSetPadding(root, YGEdgeAll, 10); + YGNodeStyleSetGapPercent(root, YGGutterAll, 10); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 100); @@ -2682,17 +2645,13 @@ TEST(YogaTest, row_gap_percent_wrapping_with_content_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetMargin(root, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root, YGEdgeTop, 10); - YGNodeStyleSetMargin(root, YGEdgeRight, 10); - YGNodeStyleSetMargin(root, YGEdgeBottom, 10); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 700); - YGNodeStyleSetGapPercent(root, YGGutterColumn, 10); - YGNodeStyleSetGapPercent(root, YGGutterRow, 10); + YGNodeStyleSetMargin(root, YGEdgeAll, 10); + YGNodeStyleSetGapPercent(root, YGGutterAll, 10); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 100); @@ -2791,21 +2750,14 @@ TEST(YogaTest, row_gap_percent_wrapping_with_content_margin_and_padding) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetMargin(root, YGEdgeLeft, 10); - YGNodeStyleSetMargin(root, YGEdgeTop, 10); - YGNodeStyleSetMargin(root, YGEdgeRight, 10); - YGNodeStyleSetMargin(root, YGEdgeBottom, 10); - YGNodeStyleSetPadding(root, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetPadding(root, YGEdgeRight, 10); - YGNodeStyleSetPadding(root, YGEdgeBottom, 10); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 700); - YGNodeStyleSetGapPercent(root, YGGutterColumn, 10); - YGNodeStyleSetGapPercent(root, YGGutterRow, 10); + YGNodeStyleSetMargin(root, YGEdgeAll, 10); + YGNodeStyleSetPadding(root, YGEdgeAll, 10); + YGNodeStyleSetGapPercent(root, YGGutterAll, 10); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 100); @@ -2904,12 +2856,11 @@ TEST(YogaTest, row_gap_percent_wrapping_with_flexible_content) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); - YGNodeStyleSetGapPercent(root, YGGutterColumn, 10); - YGNodeStyleSetGapPercent(root, YGGutterRow, 10); + YGNodeStyleSetGapPercent(root, YGGutterAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -2981,12 +2932,11 @@ TEST(YogaTest, row_gap_percent_wrapping_with_mixed_flexible_content) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 300); YGNodeStyleSetHeight(root, 300); - YGNodeStyleSetGapPercent(root, YGGutterColumn, 10); - YGNodeStyleSetGapPercent(root, YGGutterRow, 10); + YGNodeStyleSetGapPercent(root, YGGutterAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -3056,12 +3006,11 @@ TEST(YogaTest, row_gap_percent_wrapping_with_min_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetMinWidth(root, 300); - YGNodeStyleSetGapPercent(root, YGGutterColumn, 10); - YGNodeStyleSetGapPercent(root, YGGutterRow, 10); + YGNodeStyleSetGapPercent(root, YGGutterAll, 10); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 100); diff --git a/tests/generated/YGIntrinsicSizeTest.cpp b/tests/generated/YGIntrinsicSizeTest.cpp index 7a9ebb7a0a..7822e4018a 100644 --- a/tests/generated/YGIntrinsicSizeTest.cpp +++ b/tests/generated/YGIntrinsicSizeTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<2829dc62309945a6659caa578d8351c8>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGIntrinsicSizeTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGIntrinsicSizeTest.html */ #include @@ -17,10 +17,10 @@ TEST(YogaTest, contains_inner_text_long_word) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -60,10 +60,10 @@ TEST(YogaTest, contains_inner_text_no_width_no_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -103,10 +103,10 @@ TEST(YogaTest, contains_inner_text_no_width_no_height_long_word_in_paragraph) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -146,10 +146,10 @@ TEST(YogaTest, contains_inner_text_fixed_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -190,10 +190,10 @@ TEST(YogaTest, contains_inner_text_no_width_fixed_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -234,10 +234,10 @@ TEST(YogaTest, contains_inner_text_fixed_width_fixed_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -279,10 +279,10 @@ TEST(YogaTest, contains_inner_text_max_width_max_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -324,9 +324,9 @@ TEST(YogaTest, contains_inner_text_max_width_max_height_column) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetMaxWidth(root_child0, 50); @@ -366,10 +366,10 @@ TEST(YogaTest, contains_inner_text_max_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -410,10 +410,10 @@ TEST(YogaTest, contains_inner_text_fixed_width_shorter_text) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -454,10 +454,10 @@ TEST(YogaTest, contains_inner_text_fixed_height_shorter_text) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -498,10 +498,10 @@ TEST(YogaTest, contains_inner_text_max_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 2000); YGNodeStyleSetHeight(root, 2000); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -542,10 +542,10 @@ TEST(YogaTest, max_content_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidthMaxContent(root); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -621,8 +621,8 @@ TEST(YogaTest, fit_content_width) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetWidthFitContent(root_child0); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -707,8 +707,8 @@ TEST(YogaTest, stretch_width) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetWidthStretch(root_child0); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -789,8 +789,8 @@ TEST(YogaTest, max_content_height) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetHeightMaxContent(root); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -865,8 +865,8 @@ TEST(YogaTest, fit_content_height) { YGNodeStyleSetHeight(root, 90); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeightFitContent(root_child0); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -952,8 +952,8 @@ TEST(YogaTest, stretch_height) { YGNodeStyleSetHeight(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeightStretch(root_child0); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1034,8 +1034,8 @@ TEST(YogaTest, max_content_flex_basis_column) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeStyleSetFlexBasisMaxContent(root); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1110,8 +1110,8 @@ TEST(YogaTest, fit_content_flex_basis_column) { YGNodeStyleSetHeight(root, 90); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetFlexBasisFitContent(root_child0); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1195,6 +1195,7 @@ TEST(YogaTest, stretch_flex_basis_column) { YGNodeStyleSetHeight(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetFlexBasisStretch(root_child0); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); @@ -1277,10 +1278,10 @@ TEST(YogaTest, max_content_flex_basis_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetFlexBasisMaxContent(root); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1356,8 +1357,8 @@ TEST(YogaTest, fit_content_flex_basis_row) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetFlexBasisFitContent(root_child0); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1444,6 +1445,7 @@ TEST(YogaTest, stretch_flex_basis_row) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); + YGNodeStyleSetFlexBasisStretch(root_child0); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); @@ -1526,11 +1528,11 @@ TEST(YogaTest, max_content_max_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetWidth(root, 200); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetMaxWidthMaxContent(root); + YGNodeStyleSetWidth(root, 200); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1606,9 +1608,9 @@ TEST(YogaTest, fit_content_max_width) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); - YGNodeStyleSetWidth(root_child0, 110); YGNodeStyleSetMaxWidthFitContent(root_child0); + YGNodeStyleSetWidth(root_child0, 110); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1695,9 +1697,9 @@ TEST(YogaTest, stretch_max_width) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); - YGNodeStyleSetWidth(root_child0, 600); YGNodeStyleSetMaxWidthStretch(root_child0); + YGNodeStyleSetWidth(root_child0, 600); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1779,11 +1781,11 @@ TEST(YogaTest, max_content_min_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetMinWidthMaxContent(root); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -1859,9 +1861,9 @@ TEST(YogaTest, fit_content_min_width) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); - YGNodeStyleSetWidth(root_child0, 90); YGNodeStyleSetMinWidthFitContent(root_child0); + YGNodeStyleSetWidth(root_child0, 90); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1948,9 +1950,9 @@ TEST(YogaTest, stretch_min_width) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); - YGNodeStyleSetWidth(root_child0, 400); YGNodeStyleSetMinWidthStretch(root_child0); + YGNodeStyleSetWidth(root_child0, 400); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2033,9 +2035,9 @@ TEST(YogaTest, max_content_max_height) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetHeight(root, 200); YGNodeStyleSetMaxHeightMaxContent(root); + YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -2110,9 +2112,9 @@ TEST(YogaTest, fit_content_max_height) { YGNodeStyleSetHeight(root, 90); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); - YGNodeStyleSetHeight(root_child0, 110); YGNodeStyleSetMaxHeightFitContent(root_child0); + YGNodeStyleSetHeight(root_child0, 110); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2198,9 +2200,9 @@ TEST(YogaTest, stretch_max_height) { YGNodeStyleSetHeight(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMaxHeightStretch(root_child0); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 600); - YGNodeStyleSetMaxHeightStretch(root_child0); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2283,9 +2285,9 @@ TEST(YogaTest, max_content_min_height) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexWrap(root, YGWrapWrap); - YGNodeStyleSetHeight(root, 100); YGNodeStyleSetMinHeightMaxContent(root); + YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexWrap(root, YGWrapWrap); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -2360,9 +2362,9 @@ TEST(YogaTest, fit_content_min_height) { YGNodeStyleSetHeight(root, 90); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); - YGNodeStyleSetHeight(root_child0, 90); YGNodeStyleSetMinHeightFitContent(root_child0); + YGNodeStyleSetHeight(root_child0, 90); + YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2448,9 +2450,9 @@ TEST(YogaTest, stretch_min_height) { YGNodeStyleSetHeight(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMinHeightStretch(root_child0); YGNodeStyleSetFlexWrap(root_child0, YGWrapWrap); YGNodeStyleSetHeight(root_child0, 400); - YGNodeStyleSetMinHeightStretch(root_child0); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2707,8 +2709,8 @@ TEST(YogaTest, text_max_content_min_width) { YGNodeStyleSetWidth(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 200); YGNodeStyleSetMinWidthMaxContent(root_child0); + YGNodeStyleSetWidth(root_child0, 200); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2765,8 +2767,8 @@ TEST(YogaTest, text_stretch_min_width) { YGNodeStyleSetWidth(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetMinWidthStretch(root_child0); + YGNodeStyleSetWidth(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2823,8 +2825,8 @@ TEST(YogaTest, text_fit_content_min_width) { YGNodeStyleSetWidth(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 300); YGNodeStyleSetMinWidthFitContent(root_child0); + YGNodeStyleSetWidth(root_child0, 300); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2881,8 +2883,8 @@ TEST(YogaTest, text_max_content_max_width) { YGNodeStyleSetWidth(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 2000); YGNodeStyleSetMaxWidthMaxContent(root_child0); + YGNodeStyleSetWidth(root_child0, 2000); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2939,8 +2941,8 @@ TEST(YogaTest, text_stretch_max_width) { YGNodeStyleSetWidth(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 300); YGNodeStyleSetMaxWidthStretch(root_child0); + YGNodeStyleSetWidth(root_child0, 300); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -2997,8 +2999,8 @@ TEST(YogaTest, text_fit_content_max_width) { YGNodeStyleSetWidth(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 1000); YGNodeStyleSetMaxWidthFitContent(root_child0); + YGNodeStyleSetWidth(root_child0, 1000); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); diff --git a/tests/generated/YGJustifyContentTest.cpp b/tests/generated/YGJustifyContentTest.cpp index 6f4443227c..3a0ab78664 100644 --- a/tests/generated/YGJustifyContentTest.cpp +++ b/tests/generated/YGJustifyContentTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<07092062f14f233462a4678c392df76a>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGJustifyContentTest.html + * @generated SignedSource<<04bd6ff3556f7ed9137e715a47483341>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGJustifyContentTest.html */ #include @@ -17,10 +17,10 @@ TEST(YogaTest, justify_content_row_flex_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -86,11 +86,11 @@ TEST(YogaTest, justify_content_row_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -156,11 +156,11 @@ TEST(YogaTest, justify_content_row_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -226,11 +226,11 @@ TEST(YogaTest, justify_content_row_space_between) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -296,11 +296,11 @@ TEST(YogaTest, justify_content_row_space_around) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -434,10 +434,10 @@ TEST(YogaTest, justify_content_column_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -503,10 +503,10 @@ TEST(YogaTest, justify_content_column_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -572,10 +572,10 @@ TEST(YogaTest, justify_content_column_space_between) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -641,10 +641,10 @@ TEST(YogaTest, justify_content_column_space_around) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -710,15 +710,15 @@ TEST(YogaTest, justify_content_row_min_width_and_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeLeft, 100); YGNodeStyleSetMinWidth(root, 50); + YGNodeStyleSetMargin(root, YGEdgeLeft, 100); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -753,16 +753,16 @@ TEST(YogaTest, justify_content_row_max_width_and_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeLeft, 100); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMaxWidth(root, 80); + YGNodeStyleSetMargin(root, YGEdgeLeft, 100); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -797,14 +797,14 @@ TEST(YogaTest, justify_content_column_min_height_and_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeTop, 100); YGNodeStyleSetMinHeight(root, 50); + YGNodeStyleSetMargin(root, YGEdgeTop, 100); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -839,15 +839,15 @@ TEST(YogaTest, justify_content_column_max_height_and_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root, YGEdgeTop, 100); YGNodeStyleSetHeight(root, 100); YGNodeStyleSetMaxHeight(root, 80); + YGNodeStyleSetMargin(root, YGEdgeTop, 100); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 20); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetWidth(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -882,10 +882,10 @@ TEST(YogaTest, justify_content_column_space_evenly) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -951,11 +951,11 @@ TEST(YogaTest, justify_content_row_space_evenly) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -1021,10 +1021,10 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_greater_than_p YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 1000); YGNodeStyleSetHeight(root, 1584); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -1035,16 +1035,16 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_greater_than_p YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch); + YGNodeStyleSetMinWidth(root_child0_child0, 400); YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 100); YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 100); - YGNodeStyleSetMinWidth(root_child0_child0, 400); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0_child0_child0, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch); - YGNodeStyleSetWidth(root_child0_child0_child0, 300); YGNodeStyleSetHeight(root_child0_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0_child0, 300); + YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch); + YGNodeStyleSetFlexDirection(root_child0_child0_child0, YGFlexDirectionRow); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1099,10 +1099,10 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_lower_than_par YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 1080); YGNodeStyleSetHeight(root, 1584); + YGNodeStyleSetAlignContent(root, YGAlignStretch); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -1113,16 +1113,16 @@ TEST(YogaTest, justify_content_min_width_with_padding_child_width_lower_than_par YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRow); YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter); YGNodeStyleSetAlignContent(root_child0_child0, YGAlignStretch); + YGNodeStyleSetMinWidth(root_child0_child0, 400); YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 100); YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 100); - YGNodeStyleSetMinWidth(root_child0_child0, 400); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0_child0_child0, YGFlexDirectionRow); - YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch); - YGNodeStyleSetWidth(root_child0_child0_child0, 199); YGNodeStyleSetHeight(root_child0_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0_child0, 199); + YGNodeStyleSetAlignContent(root_child0_child0_child0, YGAlignStretch); + YGNodeStyleSetFlexDirection(root_child0_child0_child0, YGFlexDirectionRow); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1177,14 +1177,14 @@ TEST(YogaTest, justify_content_space_between_indefinite_container_dim_with_free_ YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 300); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root_child0, YGJustifySpaceBetween); YGNodeStyleSetMinWidth(root_child0, 200); + YGNodeStyleSetJustifyContent(root_child0, YGJustifySpaceBetween); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1249,10 +1249,10 @@ TEST(YogaTest, justify_content_flex_start_row_reverse) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 20); @@ -1318,10 +1318,10 @@ TEST(YogaTest, justify_content_flex_end_row_reverse) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 20); @@ -1387,10 +1387,10 @@ TEST(YogaTest, justify_content_overflow_row_flex_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 40); @@ -1456,11 +1456,11 @@ TEST(YogaTest, justify_content_overflow_row_flex_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 40); @@ -1526,11 +1526,11 @@ TEST(YogaTest, justify_content_overflow_row_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 40); @@ -1596,11 +1596,11 @@ TEST(YogaTest, justify_content_overflow_row_space_between) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceBetween); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 40); @@ -1666,11 +1666,11 @@ TEST(YogaTest, justify_content_overflow_row_space_around) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 40); @@ -1736,11 +1736,11 @@ TEST(YogaTest, justify_content_overflow_row_space_evenly) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 40); @@ -1808,11 +1808,11 @@ TEST(YogaTest, justify_content_overflow_row_reverse_space_around) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceAround); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 40); @@ -1880,11 +1880,11 @@ TEST(YogaTest, justify_content_overflow_row_reverse_space_evenly) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRowReverse); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 40); @@ -1950,15 +1950,15 @@ TEST(YogaTest, justify_content_overflow_row_space_evenly_auto_margin) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 102); YGNodeStyleSetHeight(root, 102); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifySpaceEvenly); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 40); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); diff --git a/tests/generated/YGMarginTest.cpp b/tests/generated/YGMarginTest.cpp index f9b5093795..866d68839b 100644 --- a/tests/generated/YGMarginTest.cpp +++ b/tests/generated/YGMarginTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGMarginTest.html + * @generated SignedSource<<00156c80767d1d30c9fee15bc8f4c502>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGMarginTest.html */ #include @@ -17,14 +17,14 @@ TEST(YogaTest, margin_start) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10); YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -64,8 +64,8 @@ TEST(YogaTest, margin_top) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -100,15 +100,15 @@ TEST(YogaTest, margin_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10); YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -143,14 +143,14 @@ TEST(YogaTest, margin_bottom) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -185,15 +185,15 @@ TEST(YogaTest, margin_and_flex_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10); YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -233,9 +233,9 @@ TEST(YogaTest, margin_and_flex_column) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -270,15 +270,15 @@ TEST(YogaTest, margin_and_stretch_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 10); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -318,9 +318,9 @@ TEST(YogaTest, margin_and_stretch_column) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeStart, 10); YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -355,14 +355,14 @@ TEST(YogaTest, margin_with_sibling_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeEnd, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -416,8 +416,8 @@ TEST(YogaTest, margin_with_sibling_column) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -466,15 +466,15 @@ TEST(YogaTest, margin_auto_bottom) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -524,15 +524,15 @@ TEST(YogaTest, margin_auto_top) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -582,16 +582,16 @@ TEST(YogaTest, margin_auto_bottom_and_top) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -641,16 +641,16 @@ TEST(YogaTest, margin_auto_bottom_and_top_justify_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -700,21 +700,21 @@ TEST(YogaTest, margin_auto_multiple_children_column) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child1, YGEdgeTop); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); + YGNodeStyleSetMarginAuto(root_child1, YGEdgeTop); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -774,22 +774,22 @@ TEST(YogaTest, margin_auto_multiple_children_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child1, YGEdgeRight); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 50); + YGNodeStyleSetMarginAuto(root_child1, YGEdgeRight); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); @@ -849,17 +849,17 @@ TEST(YogaTest, margin_auto_left_and_right_column) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -914,10 +914,10 @@ TEST(YogaTest, margin_auto_left_and_right) { YGNodeStyleSetHeight(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -967,17 +967,17 @@ TEST(YogaTest, margin_auto_start_and_end_column) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeStart); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeEnd); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeStart); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1032,10 +1032,10 @@ TEST(YogaTest, margin_auto_start_and_end) { YGNodeStyleSetHeight(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeStart); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeEnd); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeStart); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeEnd); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1085,16 +1085,16 @@ TEST(YogaTest, margin_auto_left_and_right_column_and_center) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1144,15 +1144,15 @@ TEST(YogaTest, margin_auto_left) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1202,15 +1202,15 @@ TEST(YogaTest, margin_auto_right) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1260,16 +1260,16 @@ TEST(YogaTest, margin_auto_left_and_right_stretch) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1324,10 +1324,10 @@ TEST(YogaTest, margin_auto_top_and_bottom_stretch) { YGNodeStyleSetHeight(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeTop); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -1382,10 +1382,10 @@ TEST(YogaTest, margin_should_not_be_part_of_max_height) { YGNodeStyleSetHeight(root, 250); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 20); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); YGNodeStyleSetMaxHeight(root_child0, 100); + YGNodeStyleSetMargin(root_child0, YGEdgeTop, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1425,10 +1425,10 @@ TEST(YogaTest, margin_should_not_be_part_of_max_width) { YGNodeStyleSetHeight(root, 250); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 20); YGNodeStyleSetWidth(root_child0, 100); - YGNodeStyleSetMaxWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetMaxWidth(root_child0, 100); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1463,16 +1463,16 @@ TEST(YogaTest, margin_auto_left_right_child_bigger_than_parent) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); + YGNodeStyleSetWidth(root, 52); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 72); YGNodeStyleSetHeight(root_child0, 72); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1507,15 +1507,15 @@ TEST(YogaTest, margin_auto_left_child_bigger_than_parent) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); + YGNodeStyleSetWidth(root, 52); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeStyleSetWidth(root_child0, 72); YGNodeStyleSetHeight(root_child0, 72); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1550,16 +1550,16 @@ TEST(YogaTest, margin_fix_left_auto_right_child_bigger_than_parent) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); + YGNodeStyleSetWidth(root, 52); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeStyleSetWidth(root_child0, 72); YGNodeStyleSetHeight(root_child0, 72); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 10); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeRight); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1594,16 +1594,16 @@ TEST(YogaTest, margin_auto_left_fix_right_child_bigger_than_parent) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 52); YGNodeStyleSetHeight(root, 52); + YGNodeStyleSetWidth(root, 52); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10); YGNodeStyleSetWidth(root_child0, 72); YGNodeStyleSetHeight(root_child0, 72); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeLeft); + YGNodeStyleSetMargin(root_child0, YGEdgeRight, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1638,10 +1638,10 @@ TEST(YogaTest, margin_auto_top_stretching_child) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -1697,10 +1697,10 @@ TEST(YogaTest, margin_auto_left_stretching_child) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -1756,15 +1756,15 @@ TEST(YogaTest, margin_auto_overflowing_container) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 150); + YGNodeStyleSetMarginAuto(root_child0, YGEdgeBottom); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); diff --git a/tests/generated/YGMinMaxDimensionTest.cpp b/tests/generated/YGMinMaxDimensionTest.cpp index bbb4b40a92..2b7afc5c36 100644 --- a/tests/generated/YGMinMaxDimensionTest.cpp +++ b/tests/generated/YGMinMaxDimensionTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<0054f2d41727e7a0707701c6d7640cb6>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGMinMaxDimensionTest.html + * @generated SignedSource<<1be305ae7864e14b13059dc384b0e7ad>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGMinMaxDimensionTest.html */ #include @@ -22,8 +22,8 @@ TEST(YogaTest, max_width) { YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMaxWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetMaxWidth(root_child0, 50); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -58,10 +58,10 @@ TEST(YogaTest, max_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -159,10 +159,10 @@ TEST(YogaTest, min_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -215,11 +215,11 @@ TEST(YogaTest, justify_content_min_max) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); - YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 200); + YGNodeStyleSetMinHeight(root, 100); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 60); @@ -258,11 +258,11 @@ TEST(YogaTest, align_items_min_max) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetMinWidth(root, 100); YGNodeStyleSetMaxWidth(root, 200); + YGNodeStyleSetMinWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 60); @@ -301,10 +301,10 @@ TEST(YogaTest, justify_content_overflow_min_max) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 110); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 50); @@ -374,9 +374,9 @@ TEST(YogaTest, flex_grow_to_min) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 500); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -429,11 +429,11 @@ TEST(YogaTest, flex_grow_in_at_most_container) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); @@ -486,13 +486,13 @@ TEST(YogaTest, flex_grow_child) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 100); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 0); - YGNodeStyleSetHeight(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -591,8 +591,8 @@ TEST(YogaTest, flex_grow_within_max_width) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetHeight(root_child0_child0, 20); + YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -647,8 +647,8 @@ TEST(YogaTest, flex_grow_within_constrained_max_width) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetHeight(root_child0_child0, 20); + YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -694,14 +694,14 @@ TEST(YogaTest, flex_root_ignored) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetFlexGrow(root, 1); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMinHeight(root, 100); YGNodeStyleSetMaxHeight(root, 500); + YGNodeStyleSetFlexGrow(root, 1); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 200); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -756,14 +756,14 @@ TEST(YogaTest, flex_grow_root_minimized) { YGNodeStyleSetMaxHeight(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMinHeight(root_child0, 100); YGNodeStyleSetMaxHeight(root_child0, 500); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexBasis(root_child0_child0, 200); + YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -827,14 +827,14 @@ TEST(YogaTest, flex_grow_height_maximized) { YGNodeStyleSetHeight(root, 500); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetMinHeight(root_child0, 100); YGNodeStyleSetMaxHeight(root_child0, 500); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeStyleSetFlexBasis(root_child0_child0, 200); + YGNodeStyleSetFlexGrow(root_child0_child0, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); @@ -893,10 +893,10 @@ TEST(YogaTest, flex_grow_within_constrained_min_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -1005,9 +1005,9 @@ TEST(YogaTest, flex_grow_within_constrained_max_row) { YGNodeStyleSetWidth(root, 200); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetMaxWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetMaxWidth(root_child0, 100); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1072,8 +1072,8 @@ TEST(YogaTest, flex_grow_within_constrained_max_column) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetMaxHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexShrink(root_child0, 1); @@ -1126,21 +1126,21 @@ TEST(YogaTest, child_min_max_width_flexing) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 120); YGNodeStyleSetHeight(root, 50); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetMinWidth(root_child0, 60); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 0); - YGNodeStyleSetMinWidth(root_child0, 60); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); + YGNodeStyleSetMaxWidth(root_child1, 20); YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetFlexBasisPercent(root_child1, 50); - YGNodeStyleSetMaxWidth(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1186,8 +1186,8 @@ TEST(YogaTest, min_width_overrides_width) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 50); YGNodeStyleSetMinWidth(root, 100); + YGNodeStyleSetWidth(root, 50); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -1212,8 +1212,8 @@ TEST(YogaTest, max_width_overrides_width) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 200); YGNodeStyleSetMaxWidth(root, 100); + YGNodeStyleSetWidth(root, 200); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -1238,8 +1238,8 @@ TEST(YogaTest, min_height_overrides_height) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetHeight(root, 50); YGNodeStyleSetMinHeight(root, 100); + YGNodeStyleSetHeight(root, 50); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -1264,8 +1264,8 @@ TEST(YogaTest, max_height_overrides_height) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetHeight(root, 200); YGNodeStyleSetMaxHeight(root, 100); + YGNodeStyleSetHeight(root, 200); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -1289,10 +1289,10 @@ TEST(YogaTest, min_max_percent_no_width_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetMinWidthPercent(root_child0, 10); diff --git a/tests/generated/YGPaddingTest.cpp b/tests/generated/YGPaddingTest.cpp index 30365c061a..f1c0159435 100644 --- a/tests/generated/YGPaddingTest.cpp +++ b/tests/generated/YGPaddingTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<6b47783e0e0befdd02efbfa83da49403>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGPaddingTest.html + * @generated SignedSource<<083fc403229eea6402f9859930e468fb>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGPaddingTest.html */ #include @@ -18,10 +18,7 @@ TEST(YogaTest, padding_no_size) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetPadding(root, YGEdgeRight, 10); - YGNodeStyleSetPadding(root, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root, YGEdgeAll, 10); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); @@ -46,10 +43,7 @@ TEST(YogaTest, padding_container_match_child) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetPadding(root, YGEdgeRight, 10); - YGNodeStyleSetPadding(root, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root, YGEdgeAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidth(root_child0, 10); @@ -89,16 +83,13 @@ TEST(YogaTest, padding_flex_child) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetPadding(root, YGEdgeRight, 10); - YGNodeStyleSetPadding(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -134,12 +125,9 @@ TEST(YogaTest, padding_stretch_child) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 10); - YGNodeStyleSetPadding(root, YGEdgeTop, 10); - YGNodeStyleSetPadding(root, YGEdgeRight, 10); - YGNodeStyleSetPadding(root, YGEdgeBottom, 10); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetPadding(root, YGEdgeAll, 10); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetHeight(root_child0, 10); @@ -177,18 +165,18 @@ TEST(YogaTest, padding_center_child) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetWidth(root, 100); + YGNodeStyleSetHeight(root, 100); YGNodeStyleSetPadding(root, YGEdgeStart, 10); YGNodeStyleSetPadding(root, YGEdgeEnd, 20); YGNodeStyleSetPadding(root, YGEdgeBottom, 20); - YGNodeStyleSetWidth(root, 100); - YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetAlignItems(root, YGAlignCenter); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetWidth(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -223,19 +211,16 @@ TEST(YogaTest, child_with_padding_align_end) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); - YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetJustifyContent(root, YGJustifyFlexEnd); + YGNodeStyleSetAlignItems(root, YGAlignFlexEnd); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 20); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 20); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 20); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 20); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -271,10 +256,10 @@ TEST(YogaTest, physical_and_relative_edge_defined) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetPadding(root, YGEdgeLeft, 20); - YGNodeStyleSetPadding(root, YGEdgeEnd, 50); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetPadding(root, YGEdgeLeft, 20); + YGNodeStyleSetPadding(root, YGEdgeEnd, 50); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidthPercent(root_child0, 100); diff --git a/tests/generated/YGPercentageTest.cpp b/tests/generated/YGPercentageTest.cpp index a8262f4169..dde8a816d6 100644 --- a/tests/generated/YGPercentageTest.cpp +++ b/tests/generated/YGPercentageTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<6b01edcfd82ee39d61cfcadd0b312a36>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGPercentageTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGPercentageTest.html */ #include @@ -17,10 +17,10 @@ TEST(YogaTest, percentage_width_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidthPercent(root_child0, 30); @@ -59,16 +59,16 @@ TEST(YogaTest, percentage_position_left_top) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 400); YGNodeStyleSetHeight(root, 400); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetPositionPercent(root_child0, YGEdgeTop, 20); YGNodeStyleSetWidthPercent(root_child0, 45); YGNodeStyleSetHeightPercent(root_child0, 55); + YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 10); + YGNodeStyleSetPositionPercent(root_child0, YGEdgeTop, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -103,16 +103,16 @@ TEST(YogaTest, percentage_position_bottom_right) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 500); YGNodeStyleSetHeight(root, 500); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionPercent(root_child0, YGEdgeRight, 20); - YGNodeStyleSetPositionPercent(root_child0, YGEdgeBottom, 10); YGNodeStyleSetWidthPercent(root_child0, 55); YGNodeStyleSetHeightPercent(root_child0, 15); + YGNodeStyleSetPositionPercent(root_child0, YGEdgeBottom, 10); + YGNodeStyleSetPositionPercent(root_child0, YGEdgeRight, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -147,10 +147,10 @@ TEST(YogaTest, percentage_flex_basis) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -318,10 +318,10 @@ TEST(YogaTest, percentage_flex_basis_main_max_height) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -435,10 +435,10 @@ TEST(YogaTest, percentage_flex_basis_main_max_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -552,10 +552,10 @@ TEST(YogaTest, percentage_flex_basis_main_min_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -676,39 +676,21 @@ TEST(YogaTest, percentage_multiple_nested_with_padding_margin_and_percentage_val YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasisPercent(root_child0, 10); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 5); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 5); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 3); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 3); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 3); YGNodeStyleSetMinWidthPercent(root_child0, 60); + YGNodeStyleSetMargin(root_child0, YGEdgeAll, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 3); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 5); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 5); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 5); - YGNodeStyleSetPaddingPercent(root_child0_child0, YGEdgeLeft, 3); - YGNodeStyleSetPaddingPercent(root_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPaddingPercent(root_child0_child0, YGEdgeRight, 3); - YGNodeStyleSetPaddingPercent(root_child0_child0, YGEdgeBottom, 3); YGNodeStyleSetWidthPercent(root_child0_child0, 50); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeAll, 5); + YGNodeStyleSetPaddingPercent(root_child0_child0, YGEdgeAll, 3); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeTop, 5); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeRight, 5); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeBottom, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 3); YGNodeStyleSetWidthPercent(root_child0_child0_child0, 45); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeAll, 5); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeAll, 3); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -785,10 +767,7 @@ TEST(YogaTest, percentage_margin_should_calculate_based_only_on_width) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); - YGNodeStyleSetMarginPercent(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetMarginPercent(root_child0, YGEdgeTop, 10); - YGNodeStyleSetMarginPercent(root_child0, YGEdgeRight, 10); - YGNodeStyleSetMarginPercent(root_child0, YGEdgeBottom, 10); + YGNodeStyleSetMarginPercent(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -844,10 +823,7 @@ TEST(YogaTest, percentage_padding_should_calculate_based_only_on_width) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeLeft, 10); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeTop, 10); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeRight, 10); - YGNodeStyleSetPaddingPercent(root_child0, YGEdgeBottom, 10); + YGNodeStyleSetPaddingPercent(root_child0, YGEdgeAll, 10); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -903,8 +879,8 @@ TEST(YogaTest, percentage_absolute_position) { YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 30); YGNodeStyleSetPositionPercent(root_child0, YGEdgeTop, 10); + YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 30); YGNodeStyleSetWidth(root_child0, 10); YGNodeStyleSetHeight(root_child0, 10); YGNodeInsertChild(root, root_child0, 0); @@ -980,8 +956,8 @@ TEST(YogaTest, percent_within_flex_grow) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetWidth(root, 350); YGNodeStyleSetHeight(root, 100); @@ -1063,11 +1039,11 @@ TEST(YogaTest, percentage_container_in_wrapping_container) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root, YGJustifyCenter); - YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetAlignItems(root, YGAlignCenter); YGNodeStyleSetWidth(root, 200); YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetJustifyContent(root, YGJustifyCenter); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeInsertChild(root, root_child0, 0); @@ -1155,11 +1131,11 @@ TEST(YogaTest, percent_absolute_position) { YGNodeStyleSetHeight(root, 50); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 50); - YGNodeStyleSetWidthPercent(root_child0, 100); YGNodeStyleSetHeight(root_child0, 50); + YGNodeStyleSetWidthPercent(root_child0, 100); + YGNodeStyleSetPositionPercent(root_child0, YGEdgeLeft, 50); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); @@ -1222,8 +1198,8 @@ TEST(YogaTest, percent_of_minmax_main) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetMinWidth(root, 60); YGNodeStyleSetMaxWidth(root, 60); YGNodeStyleSetHeight(root, 50); @@ -1267,8 +1243,8 @@ TEST(YogaTest, percent_of_min_main) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetMinWidth(root, 60); YGNodeStyleSetHeight(root, 50); @@ -1311,8 +1287,8 @@ TEST(YogaTest, percent_of_min_main_multiple) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetMinWidth(root, 60); YGNodeStyleSetHeight(root, 50); @@ -1385,8 +1361,8 @@ TEST(YogaTest, percent_of_max_main) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetMaxWidth(root, 60); YGNodeStyleSetHeight(root, 50); @@ -1475,9 +1451,9 @@ TEST(YogaTest, percent_absolute_of_minmax_cross_stretched) { YGNodeStyleSetHeight(root, 50); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeStyleSetWidthPercent(root_child0, 50); YGNodeStyleSetHeight(root_child0, 20); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1512,11 +1488,11 @@ TEST(YogaTest, percent_of_minmax_cross_unstretched) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinWidth(root, 60); YGNodeStyleSetMaxWidth(root, 60); YGNodeStyleSetHeight(root, 50); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidthPercent(root_child0, 50); @@ -1557,10 +1533,10 @@ TEST(YogaTest, percent_of_min_cross_unstretched) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMinWidth(root, 60); YGNodeStyleSetHeight(root, 50); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidthPercent(root_child0, 50); @@ -1599,10 +1575,10 @@ TEST(YogaTest, percent_of_max_cross_unstretched) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetMaxWidth(root, 60); YGNodeStyleSetHeight(root, 50); + YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetWidthPercent(root_child0, 50); diff --git a/tests/generated/YGRoundingTest.cpp b/tests/generated/YGRoundingTest.cpp index 1ec813de50..48b09d38c6 100644 --- a/tests/generated/YGRoundingTest.cpp +++ b/tests/generated/YGRoundingTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGRoundingTest.html + * @generated SignedSource<<98ca608a4af5789921a0e4b2078ed950>> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGRoundingTest.html */ #include @@ -17,10 +17,10 @@ TEST(YogaTest, rounding_flex_basis_flex_grow_row_width_of_100) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -86,10 +86,10 @@ TEST(YogaTest, rounding_flex_basis_flex_grow_row_prime_number_width) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 113); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetFlexGrow(root_child0, 1); @@ -183,14 +183,14 @@ TEST(YogaTest, rounding_flex_basis_flex_shrink_row) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 101); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 100); + YGNodeStyleSetFlexShrink(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); @@ -254,23 +254,23 @@ TEST(YogaTest, rounding_flex_basis_overrides_main_size) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 20); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -326,23 +326,23 @@ TEST(YogaTest, rounding_total_fractial) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 87.4f); YGNodeStyleSetHeight(root, 113.4f); + YGNodeStyleSetWidth(root, 87.4f); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 20.3f); YGNodeStyleSetFlexGrow(root_child0, 0.7f); YGNodeStyleSetFlexBasis(root_child0, 50.3f); - YGNodeStyleSetHeight(root_child0, 20.3f); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1.6f); YGNodeStyleSetHeight(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1.6f); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1.1f); YGNodeStyleSetHeight(root_child2, 10.7f); + YGNodeStyleSetFlexGrow(root_child2, 1.1f); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -398,37 +398,37 @@ TEST(YogaTest, rounding_total_fractial_nested) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 87.4f); YGNodeStyleSetHeight(root, 113.4f); + YGNodeStyleSetWidth(root, 87.4f); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 20.3f); YGNodeStyleSetFlexGrow(root_child0, 0.7f); YGNodeStyleSetFlexBasis(root_child0, 50.3f); - YGNodeStyleSetHeight(root_child0, 20.3f); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0_child0, 1); - YGNodeStyleSetFlexBasis(root_child0_child0, 0.3f); YGNodeStyleSetPosition(root_child0_child0, YGEdgeBottom, 13.3f); YGNodeStyleSetHeight(root_child0_child0, 9.9f); + YGNodeStyleSetFlexGrow(root_child0_child0, 1); + YGNodeStyleSetFlexBasis(root_child0_child0, 0.3f); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0_child1, 4); - YGNodeStyleSetFlexBasis(root_child0_child1, 0.3f); YGNodeStyleSetPosition(root_child0_child1, YGEdgeTop, 13.3f); YGNodeStyleSetHeight(root_child0_child1, 1.1f); + YGNodeStyleSetFlexGrow(root_child0_child1, 4); + YGNodeStyleSetFlexBasis(root_child0_child1, 0.3f); YGNodeInsertChild(root_child0, root_child0_child1, 1); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1.6f); YGNodeStyleSetHeight(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1.6f); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1.1f); YGNodeStyleSetHeight(root_child2, 10.7f); + YGNodeStyleSetFlexGrow(root_child2, 1.1f); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -504,23 +504,23 @@ TEST(YogaTest, rounding_fractial_input_1) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113.4f); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 20); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -576,23 +576,23 @@ TEST(YogaTest, rounding_fractial_input_2) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113.6f); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 20); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -649,23 +649,23 @@ TEST(YogaTest, rounding_fractial_input_3) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root, YGEdgeTop, 0.3f); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113.4f); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 20); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -722,23 +722,23 @@ TEST(YogaTest, rounding_fractial_input_4) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root, YGEdgeTop, 0.7f); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 113.4f); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0, 20); YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetFlexBasis(root_child0, 50); - YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -793,28 +793,28 @@ TEST(YogaTest, rounding_inner_node_controversy_horizontal) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 320); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetHeight(root_child0, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeight(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeStyleSetHeight(root_child1_child0, 10); + YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeInsertChild(root_child1, root_child1_child0, 0); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeight(root_child2, 10); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -883,23 +883,23 @@ TEST(YogaTest, rounding_inner_node_controversy_vertical) { YGNodeStyleSetHeight(root, 320); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetWidth(root_child0, 10); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetWidth(root_child1, 10); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeStyleSetWidth(root_child1_child0, 10); + YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeInsertChild(root_child1, root_child1_child0, 0); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetWidth(root_child2, 10); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -964,29 +964,29 @@ TEST(YogaTest, rounding_inner_node_controversy_combined) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeStyleSetWidth(root, 640); YGNodeStyleSetHeight(root, 320); + YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeStyleSetHeightPercent(root_child0, 100); + YGNodeStyleSetFlexGrow(root_child0, 1); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeStyleSetHeightPercent(root_child1, 100); + YGNodeStyleSetFlexGrow(root_child1, 1); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeStyleSetWidthPercent(root_child1_child0, 100); + YGNodeStyleSetFlexGrow(root_child1_child0, 1); YGNodeInsertChild(root_child1, root_child1_child0, 0); YGNodeRef root_child1_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1_child1, 1); YGNodeStyleSetWidthPercent(root_child1_child1, 100); + YGNodeStyleSetFlexGrow(root_child1_child1, 1); YGNodeInsertChild(root_child1, root_child1_child1, 1); YGNodeRef root_child1_child1_child0 = YGNodeNewWithConfig(config); @@ -995,13 +995,13 @@ TEST(YogaTest, rounding_inner_node_controversy_combined) { YGNodeInsertChild(root_child1_child1, root_child1_child1_child0, 0); YGNodeRef root_child1_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child1_child2, 1); YGNodeStyleSetWidthPercent(root_child1_child2, 100); + YGNodeStyleSetFlexGrow(root_child1_child2, 1); YGNodeInsertChild(root_child1, root_child1_child2, 2); YGNodeRef root_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeStyleSetHeightPercent(root_child2, 100); + YGNodeStyleSetFlexGrow(root_child2, 1); YGNodeInsertChild(root, root_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGSizeOverflowTest.cpp b/tests/generated/YGSizeOverflowTest.cpp index efd3010a89..92602f8696 100644 --- a/tests/generated/YGSizeOverflowTest.cpp +++ b/tests/generated/YGSizeOverflowTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGSizeOverflowTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGSizeOverflowTest.html */ #include @@ -18,15 +18,15 @@ TEST(YogaTest, nested_overflowing_child) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -72,17 +72,17 @@ TEST(YogaTest, nested_overflowing_child_in_constraint_parent) { YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); + YGNodeStyleSetWidth(root, 100); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetWidth(root_child0, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/generated/YGStaticPositionTest.cpp b/tests/generated/YGStaticPositionTest.cpp index d689f83fd8..60a8de2f86 100644 --- a/tests/generated/YGStaticPositionTest.cpp +++ b/tests/generated/YGStaticPositionTest.cpp @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. * * clang-format off - * @generated SignedSource<<83ad08d246e0d406b525b1b1d5290b35>> - * generated by gentest/gentest-driver.ts from gentest/fixtures/YGStaticPositionTest.html + * @generated SignedSource<> + * generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGStaticPositionTest.html */ #include @@ -20,11 +20,11 @@ TEST(YogaTest, static_position_insets_have_no_effect_left_top) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeStatic); - YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 50); - YGNodeStyleSetPosition(root_child0, YGEdgeTop, 50); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeStatic); + YGNodeStyleSetPosition(root_child0, YGEdgeTop, 50); + YGNodeStyleSetPosition(root_child0, YGEdgeLeft, 50); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -62,11 +62,11 @@ TEST(YogaTest, static_position_insets_have_no_effect_right_bottom) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0, YGPositionTypeStatic); - YGNodeStyleSetPosition(root_child0, YGEdgeRight, 50); - YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 50); YGNodeStyleSetWidth(root_child0, 100); YGNodeStyleSetHeight(root_child0, 100); + YGNodeStyleSetPositionType(root_child0, YGPositionTypeStatic); + YGNodeStyleSetPosition(root_child0, YGEdgeBottom, 50); + YGNodeStyleSetPosition(root_child0, YGEdgeRight, 50); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -109,18 +109,18 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 100); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeLeft, 50); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); - YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeLeft, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -178,23 +178,23 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeStyleSetWidth(root_child0, 200); YGNodeStyleSetHeight(root_child0, 200); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeLeft, 50); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); - YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeLeft, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -252,24 +252,24 @@ TEST(YogaTest, column_reverse_static_position_absolute_child_insets_relative_to_ YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeStyleSetWidth(root_child0, 200); YGNodeStyleSetHeight(root_child0, 200); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); + YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeLeft, 50); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); - YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeLeft, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -327,23 +327,23 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetWidth(root_child0, 200); YGNodeStyleSetHeight(root_child0, 200); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeTop, 50); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); - YGNodeStyleSetHeight(root_child0_child0_child0, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -401,24 +401,24 @@ TEST(YogaTest, column_reverse_static_position_absolute_child_insets_relative_to_ YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeStyleSetWidth(root_child0, 200); YGNodeStyleSetHeight(root_child0, 200); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionRow); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); + YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeTop, 50); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); - YGNodeStyleSetHeight(root_child0_child0_child0, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -476,23 +476,23 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeStyleSetWidth(root_child0, 200); YGNodeStyleSetHeight(root_child0, 200); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeTop, 50); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); - YGNodeStyleSetHeight(root_child0_child0_child0, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -550,24 +550,24 @@ TEST(YogaTest, column_reverse_static_position_absolute_child_insets_relative_to_ YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeStyleSetWidth(root_child0, 200); YGNodeStyleSetHeight(root_child0, 200); + YGNodeStyleSetFlexDirection(root_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionColumnReverse); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); + YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeTop, 50); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); - YGNodeStyleSetHeight(root_child0_child0_child0, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -630,39 +630,39 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 100); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 100); - YGNodeStyleSetWidth(root_child0_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0_child0, 100); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 100); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetPositionType(root_child0_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0_child0_child0_child0, YGEdgeLeft, 100); - YGNodeStyleSetWidth(root_child0_child0_child0_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0_child0_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0_child0_child0_child0, 100); + YGNodeStyleSetMargin(root_child0_child0_child0_child0_child0, YGEdgeLeft, 100); + YGNodeStyleSetPositionType(root_child0_child0_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0_child0_child0, root_child0_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0_child0_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0_child0_child0_child0, 50); YGNodeStyleSetPositionType(root_child0_child0_child0_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPosition(root_child0_child0_child0_child0_child0_child0, YGEdgeLeft, 50); YGNodeStyleSetPosition(root_child0_child0_child0_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetWidth(root_child0_child0_child0_child0_child0_child0, 50); - YGNodeStyleSetHeight(root_child0_child0_child0_child0_child0_child0, 50); + YGNodeStyleSetPosition(root_child0_child0_child0_child0_child0_child0, YGEdgeLeft, 50); YGNodeInsertChild(root_child0_child0_child0_child0_child0, root_child0_child0_child0_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -755,15 +755,15 @@ TEST(YogaTest, static_position_absolute_child_width_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -826,14 +826,14 @@ TEST(YogaTest, static_position_relative_child_width_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -896,15 +896,15 @@ TEST(YogaTest, static_position_static_child_width_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -967,15 +967,15 @@ TEST(YogaTest, static_position_absolute_child_height_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeightPercent(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1038,14 +1038,14 @@ TEST(YogaTest, static_position_relative_child_height_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeightPercent(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1108,15 +1108,15 @@ TEST(YogaTest, static_position_static_child_height_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeightPercent(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1179,16 +1179,16 @@ TEST(YogaTest, static_position_absolute_child_left_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1251,15 +1251,15 @@ TEST(YogaTest, static_position_relative_child_left_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1322,16 +1322,16 @@ TEST(YogaTest, static_position_static_child_left_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1394,16 +1394,16 @@ TEST(YogaTest, static_position_absolute_child_right_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1466,15 +1466,15 @@ TEST(YogaTest, static_position_relative_child_right_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeRight, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1537,16 +1537,16 @@ TEST(YogaTest, static_position_static_child_right_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeRight, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1609,16 +1609,16 @@ TEST(YogaTest, static_position_absolute_child_top_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1681,15 +1681,15 @@ TEST(YogaTest, static_position_relative_child_top_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1752,16 +1752,16 @@ TEST(YogaTest, static_position_static_child_top_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeTop, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1824,16 +1824,16 @@ TEST(YogaTest, static_position_absolute_child_bottom_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeBottom, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1896,15 +1896,15 @@ TEST(YogaTest, static_position_relative_child_bottom_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeBottom, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeBottom, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -1967,16 +1967,16 @@ TEST(YogaTest, static_position_static_child_bottom_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeBottom, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeBottom, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2039,19 +2039,16 @@ TEST(YogaTest, static_position_absolute_child_margin_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeBottom, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeAll, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2114,18 +2111,15 @@ TEST(YogaTest, static_position_relative_child_margin_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeBottom, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeAll, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2188,19 +2182,16 @@ TEST(YogaTest, static_position_static_child_margin_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeBottom, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetMarginPercent(root_child0_child0_child0, YGEdgeAll, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2263,19 +2254,16 @@ TEST(YogaTest, static_position_absolute_child_padding_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeBottom, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeAll, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2338,18 +2326,15 @@ TEST(YogaTest, static_position_relative_child_padding_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeBottom, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeAll, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2412,19 +2397,16 @@ TEST(YogaTest, static_position_static_child_padding_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeLeft, 50); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeTop, 50); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeRight, 50); - YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeBottom, 50); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPaddingPercent(root_child0_child0_child0, YGEdgeAll, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2487,15 +2469,15 @@ TEST(YogaTest, static_position_absolute_child_border_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2558,14 +2540,14 @@ TEST(YogaTest, static_position_relative_child_border_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2628,15 +2610,15 @@ TEST(YogaTest, static_position_static_child_border_percentage) { YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidth(root_child0_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2694,24 +2676,21 @@ TEST(YogaTest, static_position_absolute_child_containing_block_padding_box) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); YGNodeStyleSetWidth(root_child0, 400); YGNodeStyleSetHeight(root_child0, 400); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2769,23 +2748,20 @@ TEST(YogaTest, static_position_relative_child_containing_block_padding_box) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); YGNodeStyleSetWidth(root_child0, 400); YGNodeStyleSetHeight(root_child0, 400); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2843,24 +2819,21 @@ TEST(YogaTest, static_position_static_child_containing_block_padding_box) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); YGNodeStyleSetWidth(root_child0, 400); YGNodeStyleSetHeight(root_child0, 400); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2918,18 +2891,15 @@ TEST(YogaTest, static_position_absolute_child_containing_block_content_box) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); YGNodeStyleSetWidth(root_child0, 400); YGNodeStyleSetHeight(root_child0, 400); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetWidthPercent(root_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -2977,17 +2947,14 @@ TEST(YogaTest, static_position_relative_child_containing_block_content_box) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); YGNodeStyleSetWidth(root_child0, 400); YGNodeStyleSetHeight(root_child0, 400); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetWidthPercent(root_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0, 50); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3035,18 +3002,15 @@ TEST(YogaTest, static_position_static_child_containing_block_content_box) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); YGNodeStyleSetWidth(root_child0, 400); YGNodeStyleSetHeight(root_child0, 400); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidthPercent(root_child0_child0, 50); YGNodeStyleSetHeight(root_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0, 50); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3094,28 +3058,28 @@ TEST(YogaTest, static_position_containing_block_padding_and_border) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0, 400); + YGNodeStyleSetHeight(root_child0, 400); YGNodeStyleSetPadding(root_child0, YGEdgeTop, 8); YGNodeStyleSetPadding(root_child0, YGEdgeRight, 1); YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 5); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 4); - YGNodeStyleSetWidth(root_child0, 400); - YGNodeStyleSetHeight(root_child0, 400); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); YGNodeStyleSetHeightPercent(root_child0_child0_child0, 61); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3173,58 +3137,58 @@ TEST(YogaTest, static_position_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); + YGNodeStyleSetWidth(root_child0, 500); + YGNodeStyleSetHeight(root_child0, 500); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); - YGNodeStyleSetWidth(root_child0, 500); - YGNodeStyleSetHeight(root_child0, 500); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); - YGNodeStyleSetWidth(root_child0_child0, 200); - YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeLeft, 2); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeRight, 12); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); - YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3282,56 +3246,56 @@ TEST(YogaTest, static_position_no_position_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); + YGNodeStyleSetWidth(root_child0, 500); + YGNodeStyleSetHeight(root_child0, 500); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); - YGNodeStyleSetWidth(root_child0, 500); - YGNodeStyleSetHeight(root_child0, 500); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); - YGNodeStyleSetWidth(root_child0_child0, 200); - YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); - YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3389,57 +3353,57 @@ TEST(YogaTest, static_position_zero_for_inset_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); + YGNodeStyleSetWidth(root_child0, 500); + YGNodeStyleSetHeight(root_child0, 500); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); - YGNodeStyleSetWidth(root_child0, 500); - YGNodeStyleSetHeight(root_child0, 500); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); - YGNodeStyleSetWidth(root_child0_child0, 200); - YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 0); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); - YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3497,57 +3461,57 @@ TEST(YogaTest, static_position_start_inset_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); + YGNodeStyleSetWidth(root_child0, 500); + YGNodeStyleSetHeight(root_child0, 500); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); - YGNodeStyleSetWidth(root_child0, 500); - YGNodeStyleSetHeight(root_child0, 500); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); - YGNodeStyleSetWidth(root_child0_child0, 200); - YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeStart, 12); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); - YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3605,57 +3569,57 @@ TEST(YogaTest, static_position_end_inset_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); + YGNodeStyleSetWidth(root_child0, 500); + YGNodeStyleSetHeight(root_child0, 500); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); - YGNodeStyleSetWidth(root_child0, 500); - YGNodeStyleSetHeight(root_child0, 500); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetWidth(root_child0_child0, 200); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); - YGNodeStyleSetWidth(root_child0_child0, 200); - YGNodeStyleSetHeight(root_child0_child0, 200); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeEnd, 4); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 41); - YGNodeStyleSetHeightPercent(root_child0_child0_child0, 63); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3713,69 +3677,69 @@ TEST(YogaTest, static_position_row_reverse_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRowReverse); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); + YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionRowReverse); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetHeightPercent(root_child0_child0_child0, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetHeightPercent(root_child0_child0_child0, 12); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3843,69 +3807,69 @@ TEST(YogaTest, static_position_column_reverse_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionColumnReverse); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); + YGNodeStyleSetFlexDirection(root_child0_child0, YGFlexDirectionColumnReverse); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -3973,134 +3937,134 @@ TEST(YogaTest, static_position_justify_flex_start_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); - YGNodeInsertChild(root_child0, root_child0_child0, 0); - - YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); + YGNodeInsertChild(root_child0, root_child0_child0, 0); + + YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); + YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0); YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); + YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child2, 2); YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4208,135 +4172,135 @@ TEST(YogaTest, static_position_justify_flex_start_position_set_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeRight, 30); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); + YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0); YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); + YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child2, 2); YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4444,68 +4408,68 @@ TEST(YogaTest, static_position_no_definite_size_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 23); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4573,69 +4537,69 @@ TEST(YogaTest, static_position_both_insets_set_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeStyleSetPositionPercent(root_child0_child0_child0, YGEdgeLeft, 23); YGNodeStyleSetPosition(root_child0_child0_child0, YGEdgeRight, 13); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4703,135 +4667,135 @@ TEST(YogaTest, static_position_justify_center_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); + YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyCenter); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); + YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0); YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); + YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child2, 2); YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -4939,135 +4903,135 @@ TEST(YogaTest, static_position_justify_flex_end_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); + YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyFlexEnd); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); + YGNodeStyleSetJustifyContent(root_child0_child0, YGJustifyFlexEnd); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); + YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0); YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); + YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child2, 2); YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5175,135 +5139,135 @@ TEST(YogaTest, static_position_align_flex_start_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root_child0_child0, YGAlignFlexStart); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); + YGNodeStyleSetAlignItems(root_child0_child0, YGAlignFlexStart); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); + YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0); YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); + YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child2, 2); YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5411,135 +5375,135 @@ TEST(YogaTest, static_position_align_center_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root_child0_child0, YGAlignCenter); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); + YGNodeStyleSetAlignItems(root_child0_child0, YGAlignCenter); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); + YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0); YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); + YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child2, 2); YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5647,135 +5611,135 @@ TEST(YogaTest, static_position_align_flex_end_amalgamation) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetMargin(root_child0, YGEdgeTop, 5); YGNodeStyleSetMargin(root_child0, YGEdgeRight, 9); YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 6); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 7); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 8); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 9); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 11); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 13); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 2); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetAlignItems(root_child0_child0, YGAlignFlexEnd); YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetMargin(root_child0_child0, YGEdgeTop, 6); YGNodeStyleSetMargin(root_child0_child0, YGEdgeRight, 3); YGNodeStyleSetMargin(root_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); - YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetMargin(root_child0_child0, YGEdgeLeft, 8); YGNodeStyleSetBorder(root_child0_child0, YGEdgeTop, 10); YGNodeStyleSetBorder(root_child0_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0_child0, YGEdgeBottom, 1); + YGNodeStyleSetBorder(root_child0_child0, YGEdgeLeft, 8); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeRight, 9); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0_child0, YGEdgeLeft, 1); + YGNodeStyleSetAlignItems(root_child0_child0, YGAlignFlexEnd); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 21); + YGNodeStyleSetBorder(root_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child0_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child0_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child0_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child0_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child0_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child0, root_child0_child0_child0_child0, 0); YGNodeRef root_child0_child0_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child1, 10); + YGNodeStyleSetBorder(root_child0_child0_child1, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child1, 1); YGNodeRef root_child0_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child1_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child1_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child1_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child1_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child1_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child1, root_child0_child0_child1_child0, 0); YGNodeRef root_child0_child0_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); + YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeBottom, 9); - YGNodeStyleSetWidthPercent(root_child0_child0_child2, 10); + YGNodeStyleSetBorder(root_child0_child0_child2, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0, root_child0_child0_child2, 2); YGNodeRef root_child0_child0_child2_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); + YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); + YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeTop, 12); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeRight, 4); YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeBottom, 7); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); - YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); - YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetMargin(root_child0_child0_child2_child0, YGEdgeLeft, 9); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeTop, 1); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeRight, 5); YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeBottom, 9); - YGNodeStyleSetWidth(root_child0_child0_child2_child0, 100); - YGNodeStyleSetHeight(root_child0_child0_child2_child0, 50); + YGNodeStyleSetBorder(root_child0_child0_child2_child0, YGEdgeLeft, 2); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeTop, 3); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeRight, 8); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeBottom, 10); + YGNodeStyleSetPadding(root_child0_child0_child2_child0, YGEdgeLeft, 5); YGNodeInsertChild(root_child0_child0_child2, root_child0_child0_child2_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5880,30 +5844,30 @@ TEST(YogaTest, static_position_static_root) { YGConfigRef config = YGConfigNew(); YGNodeRef root = YGNodeNewWithConfig(config); + YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetWidth(root, 100); YGNodeStyleSetPositionType(root, YGPositionTypeStatic); - YGNodeStyleSetPadding(root, YGEdgeLeft, 6); YGNodeStyleSetPadding(root, YGEdgeTop, 1); YGNodeStyleSetPadding(root, YGEdgeRight, 11); YGNodeStyleSetPadding(root, YGEdgeBottom, 4); - YGNodeStyleSetWidth(root, 100); - YGNodeStyleSetHeight(root, 200); + YGNodeStyleSetPadding(root, YGEdgeLeft, 6); YGNodeRef root_child0 = YGNodeNewWithConfig(config); + YGNodeStyleSetHeightPercent(root_child0, 50); + YGNodeStyleSetWidthPercent(root_child0, 50); YGNodeStyleSetPositionType(root_child0, YGPositionTypeAbsolute); - YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 12); - YGNodeStyleSetMargin(root_child0, YGEdgeTop, 11); - YGNodeStyleSetMargin(root_child0, YGEdgeRight, 15); - YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 3); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 7); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 4); - YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 4); YGNodeStyleSetBorder(root_child0, YGEdgeTop, 3); YGNodeStyleSetBorder(root_child0, YGEdgeRight, 2); YGNodeStyleSetBorder(root_child0, YGEdgeBottom, 1); - YGNodeStyleSetWidthPercent(root_child0, 50); - YGNodeStyleSetHeightPercent(root_child0, 50); + YGNodeStyleSetBorder(root_child0, YGEdgeLeft, 4); + YGNodeStyleSetPadding(root_child0, YGEdgeTop, 7); + YGNodeStyleSetPadding(root_child0, YGEdgeRight, 5); + YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 4); + YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 3); + YGNodeStyleSetMargin(root_child0, YGEdgeTop, 11); + YGNodeStyleSetMargin(root_child0, YGEdgeRight, 15); + YGNodeStyleSetMargin(root_child0, YGEdgeBottom, 1); + YGNodeStyleSetMargin(root_child0, YGEdgeLeft, 12); YGNodeInsertChild(root, root_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); @@ -5941,48 +5905,45 @@ TEST(YogaTest, static_position_absolute_child_multiple) { YGNodeStyleSetPositionType(root, YGPositionTypeAbsolute); YGNodeRef root_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPadding(root_child0, YGEdgeLeft, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeTop, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeRight, 100); - YGNodeStyleSetPadding(root_child0, YGEdgeBottom, 100); YGNodeStyleSetWidth(root_child0, 400); YGNodeStyleSetHeight(root_child0, 400); + YGNodeStyleSetPadding(root_child0, YGEdgeAll, 100); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child0, 100); YGNodeStyleSetHeight(root_child0_child0, 100); + YGNodeStyleSetWidth(root_child0_child0, 100); + YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child0, 0); YGNodeRef root_child0_child0_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); - YGNodeStyleSetWidthPercent(root_child0_child0_child0, 10); YGNodeStyleSetHeight(root_child0_child0_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child0_child0, 10); + YGNodeStyleSetPositionType(root_child0_child0_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child0, root_child0_child0_child0, 0); YGNodeRef root_child0_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeStatic); - YGNodeStyleSetWidth(root_child0_child1, 100); YGNodeStyleSetHeight(root_child0_child1, 100); + YGNodeStyleSetWidth(root_child0_child1, 100); + YGNodeStyleSetPositionType(root_child0_child1, YGPositionTypeStatic); YGNodeInsertChild(root_child0, root_child0_child1, 1); YGNodeRef root_child0_child1_child0 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child1_child0, YGPositionTypeAbsolute); - YGNodeStyleSetWidthPercent(root_child0_child1_child0, 50); YGNodeStyleSetHeight(root_child0_child1_child0, 50); + YGNodeStyleSetWidthPercent(root_child0_child1_child0, 50); + YGNodeStyleSetPositionType(root_child0_child1_child0, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child1, root_child0_child1_child0, 0); YGNodeRef root_child0_child1_child1 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child1_child1, YGPositionTypeAbsolute); - YGNodeStyleSetWidthPercent(root_child0_child1_child1, 50); YGNodeStyleSetHeight(root_child0_child1_child1, 50); + YGNodeStyleSetWidthPercent(root_child0_child1_child1, 50); + YGNodeStyleSetPositionType(root_child0_child1_child1, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0_child1, root_child0_child1_child1, 1); YGNodeRef root_child0_child2 = YGNodeNewWithConfig(config); - YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeAbsolute); - YGNodeStyleSetWidth(root_child0_child2, 25); YGNodeStyleSetHeight(root_child0_child2, 50); + YGNodeStyleSetWidth(root_child0_child2, 25); + YGNodeStyleSetPositionType(root_child0_child2, YGPositionTypeAbsolute); YGNodeInsertChild(root_child0, root_child0_child2, 2); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); diff --git a/tests/grid/AutoPlacementTest.cpp b/tests/grid/AutoPlacementTest.cpp new file mode 100644 index 0000000000..354938030f --- /dev/null +++ b/tests/grid/AutoPlacementTest.cpp @@ -0,0 +1,578 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include +#include +#include +#include +#include +#include +#include + +using namespace facebook::yoga; + +class GridAutoplacementTest : public ::testing::Test { + protected: + void SetUp() override { + gridContainer = new Node(); + gridContainer->style().setDisplay(Display::Grid); + } + + void TearDown() override { + delete gridContainer; + } + + Node* gridContainer{nullptr}; + + Node* createGridItem( + GridLine columnStart = GridLine::auto_(), + GridLine columnEnd = GridLine::auto_(), + GridLine rowStart = GridLine::auto_(), + GridLine rowEnd = GridLine::auto_()) { + auto item = new Node(); + item->style().setGridColumnStart(columnStart); + item->style().setGridColumnEnd(columnEnd); + item->style().setGridRowStart(rowStart); + item->style().setGridRowEnd(rowEnd); + gridContainer->insertChild(item, gridContainer->getChildren().size()); + return item; + } +}; + +TEST_F(GridAutoplacementTest, places_items_with_definite_positions) { + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(3), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + createGridItem( + GridLine::fromInteger(2), + GridLine::fromInteger(4), + GridLine::fromInteger(2), + GridLine::fromInteger(3)); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + ASSERT_EQ(placements.size(), 2); + + EXPECT_EQ(placements[0].columnStart, 0); + EXPECT_EQ(placements[0].columnEnd, 2); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 1); + + EXPECT_EQ(placements[1].columnStart, 1); + EXPECT_EQ(placements[1].columnEnd, 3); + EXPECT_EQ(placements[1].rowStart, 1); + EXPECT_EQ(placements[1].rowEnd, 2); +} + +TEST_F(GridAutoplacementTest, places_items_with_definite_row_auto_column) { + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(3), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + createGridItem( + GridLine::auto_(), + GridLine::auto_(), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + ASSERT_EQ(placements.size(), 2); + + EXPECT_EQ(placements[0].columnStart, 0); + EXPECT_EQ(placements[0].columnEnd, 2); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 1); + EXPECT_EQ(placements[1].columnStart, 2); + EXPECT_EQ(placements[1].columnEnd, 3); + EXPECT_EQ(placements[1].rowStart, 0); + EXPECT_EQ(placements[1].rowEnd, 1); +} + +TEST_F(GridAutoplacementTest, handles_overlapping_definite_row_items) { + createGridItem( + GridLine::auto_(), + GridLine::span(2), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + createGridItem( + GridLine::auto_(), + GridLine::span(2), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 2); + + EXPECT_EQ(placements[0].columnStart, 0); + EXPECT_EQ(placements[0].columnEnd, 2); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 1); + + EXPECT_EQ(placements[1].columnStart, 2); + EXPECT_EQ(placements[1].columnEnd, 4); + EXPECT_EQ(placements[1].rowStart, 0); + EXPECT_EQ(placements[1].rowEnd, 1); +} + +TEST_F(GridAutoplacementTest, places_auto_positioned_items) { + createGridItem(); + createGridItem(); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 2); + + EXPECT_EQ(placements[0].columnStart, 0); + EXPECT_EQ(placements[0].columnEnd, 1); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 1); + + EXPECT_EQ(placements[1].columnStart, 0); + EXPECT_EQ(placements[1].columnEnd, 1); + EXPECT_EQ(placements[1].rowStart, 1); + EXPECT_EQ(placements[1].rowEnd, 2); +} + +TEST_F(GridAutoplacementTest, handles_large_spans) { + createGridItem(GridLine::auto_(), GridLine::span(5)); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 1); + + EXPECT_EQ(placements[0].columnStart, 0); + EXPECT_EQ(placements[0].columnEnd, 5); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 1); +} + +TEST_F(GridAutoplacementTest, places_items_with_definite_column_auto_row) { + createGridItem( + GridLine::fromInteger(2), + GridLine::fromInteger(4), + GridLine::auto_(), + GridLine::auto_()); + + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(2), + GridLine::auto_(), + GridLine::auto_()); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 2); + + EXPECT_EQ(placements[0].columnStart, 1); + EXPECT_EQ(placements[0].columnEnd, 3); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 1); + + EXPECT_EQ(placements[1].columnStart, 0); + EXPECT_EQ(placements[1].columnEnd, 1); + EXPECT_EQ(placements[1].rowStart, 1); + EXPECT_EQ(placements[1].rowEnd, 2); +} + +TEST_F(GridAutoplacementTest, avoids_overlaps_with_definite_column_items) { + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(3), + GridLine::fromInteger(1), + GridLine::fromInteger(3)); + + createGridItem( + GridLine::fromInteger(2), + GridLine::fromInteger(3), + GridLine::auto_(), + GridLine::auto_()); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 2); + + EXPECT_EQ(placements[0].columnStart, 0); + EXPECT_EQ(placements[0].columnEnd, 2); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 2); + + EXPECT_EQ(placements[1].columnStart, 1); + EXPECT_EQ(placements[1].columnEnd, 2); + EXPECT_EQ(placements[1].rowStart, 2); + EXPECT_EQ(placements[1].rowEnd, 3); +} + +TEST_F(GridAutoplacementTest, handles_mixed_positioning_strategies) { + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(2), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + createGridItem( + GridLine::auto_(), + GridLine::span(2), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + createGridItem(); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 3); + + EXPECT_EQ(placements[0].columnStart, 0); + EXPECT_EQ(placements[0].columnEnd, 1); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 1); + + EXPECT_EQ(placements[1].columnStart, 1); + EXPECT_EQ(placements[1].columnEnd, 3); + EXPECT_EQ(placements[1].rowStart, 0); + EXPECT_EQ(placements[1].rowEnd, 1); + + EXPECT_EQ(placements[2].columnStart, 0); + EXPECT_EQ(placements[2].columnEnd, 1); + EXPECT_EQ(placements[2].rowStart, 1); + EXPECT_EQ(placements[2].rowEnd, 2); +} + +TEST_F(GridAutoplacementTest, handles_negative_grid_line_references_simple) { + std::vector columns = { + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f)}; + gridContainer->style().setGridTemplateColumns(std::move(columns)); + createGridItem(GridLine::fromInteger(-1), GridLine::fromInteger(-2)); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 1); + EXPECT_EQ(placements[0].columnStart, 2); + EXPECT_EQ(placements[0].columnEnd, 3); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 1); +} + +TEST_F(GridAutoplacementTest, handles_negative_grid_line_references) { + std::vector columns = { + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f)}; + gridContainer->style().setGridTemplateColumns(std::move(columns)); + + // .one { grid-column-start: -5; grid-column-end: -4; } + auto node1 = + createGridItem(GridLine::fromInteger(-5), GridLine::fromInteger(-4)); + + // .two { grid-column-start: 1; grid-column-end: 2; grid-row-start: 1; + // grid-row-end: 2; } + auto node2 = createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(2), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + auto node3 = createGridItem(); + auto node4 = createGridItem(); + auto node5 = createGridItem(); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 5); + + for (auto placement : placements) { + if (placement.node == node1) { + EXPECT_EQ(placement.columnStart, -1); + EXPECT_EQ(placement.columnEnd, 0); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node2) { + EXPECT_EQ(placement.columnStart, 0); + EXPECT_EQ(placement.columnEnd, 1); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node3) { + EXPECT_EQ(placement.columnStart, 1); + EXPECT_EQ(placement.columnEnd, 2); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node4) { + EXPECT_EQ(placement.columnStart, 2); + EXPECT_EQ(placement.columnEnd, 3); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node5) { + EXPECT_EQ(placement.columnStart, -1); + EXPECT_EQ(placement.columnEnd, 0); + EXPECT_EQ(placement.rowStart, 1); + EXPECT_EQ(placement.rowEnd, 2); + } + } +} + +TEST_F(GridAutoplacementTest, same_start_and_end_line_spans_one_track) { + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(1), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 1); + EXPECT_EQ(placements[0].columnStart, 0); + EXPECT_EQ(placements[0].columnEnd, 1); + EXPECT_EQ(placements[0].rowStart, 0); + EXPECT_EQ(placements[0].rowEnd, 1); +} + +TEST_F( + GridAutoplacementTest, + handles_negative_grid_lines_with_row_positioning) { + std::vector columns = { + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f)}; + gridContainer->style().setGridTemplateColumns(std::move(columns)); + + // .one { grid-column-start: -5; grid-column-end: -4; grid-row-start: 2; + // grid-row-end: 3; } + auto node1 = createGridItem( + GridLine::fromInteger(-5), + GridLine::fromInteger(-4), + GridLine::fromInteger(2), + GridLine::fromInteger(3)); + + // .two { grid-row-start: 1; grid-row-end: 2; } + auto node2 = createGridItem( + GridLine::auto_(), + GridLine::auto_(), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + auto node3 = createGridItem(); + auto node4 = createGridItem(); + auto node5 = createGridItem(); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + ; + + ASSERT_EQ(placements.size(), 5); + + for (auto placement : placements) { + if (placement.node == node1) { + EXPECT_EQ(placement.columnStart, -1); + EXPECT_EQ(placement.columnEnd, 0); + EXPECT_EQ(placement.rowStart, 1); + EXPECT_EQ(placement.rowEnd, 2); + } else if (placement.node == node2) { + EXPECT_EQ(placement.columnStart, -1); + EXPECT_EQ(placement.columnEnd, 0); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node3) { + EXPECT_EQ(placement.columnStart, 0); + EXPECT_EQ(placement.columnEnd, 1); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node4) { + EXPECT_EQ(placement.columnStart, 1); + EXPECT_EQ(placement.columnEnd, 2); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node5) { + EXPECT_EQ(placement.columnStart, 2); + EXPECT_EQ(placement.columnEnd, 3); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } + } +} + +TEST_F(GridAutoplacementTest, skips_past_large_blocking_items) { + auto largeItem = createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(6), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + auto autoItem1 = createGridItem( + GridLine::auto_(), + GridLine::auto_(), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + auto autoItem2 = createGridItem( + GridLine::auto_(), + GridLine::auto_(), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 3); + + for (auto placement : placements) { + if (placement.node == largeItem) { + EXPECT_EQ(placement.columnStart, 0); + EXPECT_EQ(placement.columnEnd, 5); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == autoItem1) { + EXPECT_EQ(placement.columnStart, 5); + EXPECT_EQ(placement.columnEnd, 6); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == autoItem2) { + EXPECT_EQ(placement.columnStart, 6); + EXPECT_EQ(placement.columnEnd, 7); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } + } +} + +TEST_F(GridAutoplacementTest, skips_past_large_blocking_rows) { + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(2), + GridLine::fromInteger(1), + GridLine::fromInteger(6)); + + auto autoItem = createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(2), + GridLine::auto_(), + GridLine::auto_()); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 2); + + for (auto placement : placements) { + if (placement.node == autoItem) { + EXPECT_EQ(placement.columnStart, 0); + EXPECT_EQ(placement.columnEnd, 1); + EXPECT_EQ(placement.rowStart, 5); + EXPECT_EQ(placement.rowEnd, 6); + } + } +} + +TEST_F(GridAutoplacementTest, handles_nested_overlapping_items) { + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(8), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + createGridItem( + GridLine::fromInteger(3), + GridLine::fromInteger(5), + GridLine::fromInteger(2), + GridLine::fromInteger(3)); + + auto autoItem = createGridItem( + GridLine::auto_(), + GridLine::auto_(), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + + ASSERT_EQ(placements.size(), 3); + + for (auto placement : placements) { + if (placement.node == autoItem) { + EXPECT_EQ(placement.columnStart, 7); + EXPECT_EQ(placement.columnEnd, 8); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } + } +} + +TEST_F( + GridAutoplacementTest, + handles_negative_and_positive_grid_lines_auto_row) { + std::vector columns = { + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f)}; + gridContainer->style().setGridTemplateColumns(std::move(columns)); + + // .one { grid-column-start: -5; grid-column-end: -4; grid-row-start: 1; + // grid-row-end: 2; } + auto node1 = createGridItem( + GridLine::fromInteger(-5), + GridLine::fromInteger(-4), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + // .two { grid-column-start: 1; grid-column-end: 2; } (auto rows) + auto node2 = createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(2), + GridLine::auto_(), + GridLine::auto_()); + + auto node3 = createGridItem(); + auto node4 = createGridItem(); + auto node5 = createGridItem(); + + auto autoPlacementResult = AutoPlacement::performAutoPlacement(gridContainer); + auto& placements = autoPlacementResult.gridItems; + ASSERT_EQ(placements.size(), 5); + + for (auto placement : placements) { + if (placement.node == node1) { + EXPECT_EQ(placement.columnStart, -1); + EXPECT_EQ(placement.columnEnd, 0); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node2) { + EXPECT_EQ(placement.columnStart, 0); + EXPECT_EQ(placement.columnEnd, 1); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node3) { + EXPECT_EQ(placement.columnStart, 1); + EXPECT_EQ(placement.columnEnd, 2); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node4) { + EXPECT_EQ(placement.columnStart, 2); + EXPECT_EQ(placement.columnEnd, 3); + EXPECT_EQ(placement.rowStart, 0); + EXPECT_EQ(placement.rowEnd, 1); + } else if (placement.node == node5) { + EXPECT_EQ(placement.columnStart, -1); + EXPECT_EQ(placement.columnEnd, 0); + EXPECT_EQ(placement.rowStart, 1); + EXPECT_EQ(placement.rowEnd, 2); + } + } +} diff --git a/tests/grid/CreateGridTrackTest.cpp b/tests/grid/CreateGridTrackTest.cpp new file mode 100644 index 0000000000..ceae7c494c --- /dev/null +++ b/tests/grid/CreateGridTrackTest.cpp @@ -0,0 +1,292 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include +#include +#include +#include +#include +#include +#include + +using namespace facebook::yoga; + +class GridCreateTracksTest : public ::testing::Test { + protected: + void SetUp() override { + gridContainer = new Node(); + gridContainer->style().setDisplay(Display::Grid); + } + + void TearDown() override { + delete gridContainer; + } + + Node* gridContainer{nullptr}; + + Node* createGridItem( + GridLine columnStart = GridLine::auto_(), + GridLine columnEnd = GridLine::auto_(), + GridLine rowStart = GridLine::auto_(), + GridLine rowEnd = GridLine::auto_()) { + auto item = new Node(); + item->style().setGridColumnStart(columnStart); + item->style().setGridColumnEnd(columnEnd); + item->style().setGridRowStart(rowStart); + item->style().setGridRowEnd(rowEnd); + gridContainer->insertChild(item, gridContainer->getChildren().size()); + return item; + } +}; + +TEST_F(GridCreateTracksTest, only_explicit_tracks) { + std::vector columns = { + GridTrackSize::length(100.0f), GridTrackSize::length(150.0f)}; + std::vector rows = { + GridTrackSize::length(80.0f), GridTrackSize::fr(1.0f)}; + + gridContainer->style().setGridTemplateColumns(std::move(columns)); + gridContainer->style().setGridTemplateRows(std::move(rows)); + + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(2), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + createGridItem( + GridLine::fromInteger(2), + GridLine::fromInteger(3), + GridLine::fromInteger(2), + GridLine::fromInteger(3)); + + auto autoPlacementResult = + ResolvedAutoPlacement::resolveGridItemPlacements(gridContainer); + GridTracks tracks = createGridTracks(gridContainer, autoPlacementResult); + + EXPECT_EQ(tracks.columnTracks.size(), 2); + EXPECT_TRUE(tracks.columnTracks[0].minSizingFunction.isPoints()); + EXPECT_TRUE(tracks.columnTracks[1].minSizingFunction.isPoints()); + + EXPECT_EQ(tracks.rowTracks.size(), 2); + EXPECT_TRUE(tracks.rowTracks[0].minSizingFunction.isPoints()); + EXPECT_TRUE(tracks.rowTracks[1].maxSizingFunction.isStretch()); +} + +TEST_F(GridCreateTracksTest, implicit_tracks_after_explicit_grid) { + std::vector columns = { + GridTrackSize::length(100.0f), GridTrackSize::length(150.0f)}; + + gridContainer->style().setGridTemplateColumns(std::move(columns)); + + createGridItem( + GridLine::fromInteger(1), + GridLine::fromInteger(5), + GridLine::fromInteger(1), + GridLine::fromInteger(2)); + + auto autoPlacementResult = + ResolvedAutoPlacement::resolveGridItemPlacements(gridContainer); + GridTracks tracks = createGridTracks(gridContainer, autoPlacementResult); + + EXPECT_EQ(tracks.columnTracks.size(), 4); + + EXPECT_TRUE(tracks.columnTracks[0].minSizingFunction.isPoints()); + EXPECT_TRUE(tracks.columnTracks[1].minSizingFunction.isPoints()); + + EXPECT_TRUE(tracks.columnTracks[2].minSizingFunction.isAuto()); + EXPECT_TRUE(tracks.columnTracks[3].minSizingFunction.isAuto()); +} + +TEST_F( + GridCreateTracksTest, + implicit_tracks_before_explicit_grid_negative_indices) { + std::vector columns = { + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f), + GridTrackSize::length(20.0f)}; + + gridContainer->style().setGridTemplateColumns(std::move(columns)); + + createGridItem(GridLine::fromInteger(-5), GridLine::fromInteger(-4)); + + auto autoPlacementResult = + ResolvedAutoPlacement::resolveGridItemPlacements(gridContainer); + GridTracks tracks = createGridTracks(gridContainer, autoPlacementResult); + + EXPECT_EQ(tracks.columnTracks.size(), 4); + + EXPECT_TRUE(tracks.columnTracks[0].minSizingFunction.isAuto()); +} + +TEST_F(GridCreateTracksTest, implicit_tracks_before_and_after) { + std::vector columns = { + GridTrackSize::length(100.0f), GridTrackSize::fr(1.0f)}; + + // creates 3 grid lines 1, 2, 3 + gridContainer->style().setGridTemplateColumns(std::move(columns)); + // -4 index = 0 index. 1 new track before. and 5 index = 1 new track after. + // total 5 tracks + createGridItem(GridLine::fromInteger(-4), GridLine::fromInteger(5)); + + auto autoPlacementResult = + ResolvedAutoPlacement::resolveGridItemPlacements(gridContainer); + GridTracks tracks = createGridTracks(gridContainer, autoPlacementResult); + + EXPECT_EQ(tracks.columnTracks.size(), 5); + EXPECT_TRUE(tracks.columnTracks[0].minSizingFunction.isAuto()); + EXPECT_TRUE(tracks.columnTracks[1].minSizingFunction.isPoints()); + EXPECT_TRUE(tracks.columnTracks[2].maxSizingFunction.isStretch()); + EXPECT_TRUE(tracks.columnTracks[4].minSizingFunction.isAuto()); + EXPECT_TRUE(tracks.columnTracks[4].minSizingFunction.isAuto()); +} + +TEST_F(GridCreateTracksTest, no_explicit_tracks_only_implicit) { + createGridItem(); + createGridItem(); + createGridItem(); + + auto autoPlacementResult = + ResolvedAutoPlacement::resolveGridItemPlacements(gridContainer); + GridTracks tracks = createGridTracks(gridContainer, autoPlacementResult); + + for (const auto& track : tracks.columnTracks) { + EXPECT_TRUE(track.minSizingFunction.isAuto()); + } + + for (const auto& track : tracks.rowTracks) { + EXPECT_TRUE(track.minSizingFunction.isAuto()); + } +} + +TEST_F(GridCreateTracksTest, empty_grid_no_items) { + std::vector columns = { + GridTrackSize::length(100.0f), GridTrackSize::length(150.0f)}; + + gridContainer->style().setGridTemplateColumns(std::move(columns)); + + auto autoPlacementResult = + ResolvedAutoPlacement::resolveGridItemPlacements(gridContainer); + GridTracks tracks = createGridTracks(gridContainer, autoPlacementResult); + EXPECT_EQ(tracks.columnTracks.size(), 2); +} + +TEST_F(GridCreateTracksTest, large_span_creating_many_implicit_tracks) { + createGridItem(GridLine::auto_(), GridLine::span(10)); + + auto autoPlacementResult = + ResolvedAutoPlacement::resolveGridItemPlacements(gridContainer); + GridTracks tracks = createGridTracks(gridContainer, autoPlacementResult); + + EXPECT_EQ(tracks.columnTracks.size(), 10); + + for (const auto& track : tracks.columnTracks) { + EXPECT_TRUE(track.minSizingFunction.isAuto()); + } +} + +TEST_F(GridCreateTracksTest, grid_auto_columns_pattern_repeats_backward) { + std::vector columns = { + GridTrackSize::length(100.0f), GridTrackSize::length(150.0f)}; + gridContainer->style().setGridTemplateColumns(std::move(columns)); + + std::vector autoColumns = { + GridTrackSize::length(50.0f), + GridTrackSize::fr(1.0f), + GridTrackSize::length(75.0f)}; + gridContainer->style().setGridAutoColumns(std::move(autoColumns)); + + createGridItem(GridLine::fromInteger(-8), GridLine::fromInteger(-7)); + createGridItem(GridLine::fromInteger(3), GridLine::fromInteger(6)); + + auto autoPlacementResult = + ResolvedAutoPlacement::resolveGridItemPlacements(gridContainer); + GridTracks tracks = createGridTracks(gridContainer, autoPlacementResult); + + // 5 negative implicit + 2 explicit + 3 positive implicit = 10 tracks + EXPECT_EQ(tracks.columnTracks.size(), 10); + + // Implicit tracks before explicit grid + EXPECT_TRUE(tracks.columnTracks[4].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.columnTracks[4].minSizingFunction.resolve(0.0f).unwrap(), 75.0f); + EXPECT_TRUE(tracks.columnTracks[3].maxSizingFunction.isStretch()); + EXPECT_TRUE(tracks.columnTracks[2].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.columnTracks[2].minSizingFunction.resolve(0.0f).unwrap(), 50.0f); + EXPECT_TRUE(tracks.columnTracks[1].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.columnTracks[1].minSizingFunction.resolve(0.0f).unwrap(), 75.0f); + EXPECT_TRUE(tracks.columnTracks[0].maxSizingFunction.isStretch()); + + // Explicit grid + EXPECT_TRUE(tracks.columnTracks[5].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.columnTracks[5].minSizingFunction.resolve(0.0f).unwrap(), 100.0f); + EXPECT_TRUE(tracks.columnTracks[6].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.columnTracks[6].minSizingFunction.resolve(0.0f).unwrap(), 150.0f); + + // Implicit tracks after explicit grid + EXPECT_TRUE(tracks.columnTracks[7].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.columnTracks[7].minSizingFunction.resolve(0.0f).unwrap(), 50.0f); + EXPECT_TRUE(tracks.columnTracks[8].maxSizingFunction.isStretch()); + EXPECT_TRUE(tracks.columnTracks[9].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.columnTracks[9].minSizingFunction.resolve(0.0f).unwrap(), 75.0f); +} + +TEST_F(GridCreateTracksTest, grid_auto_rows_pattern_repeats_both_directions) { + std::vector rows = {GridTrackSize::length(200.0f)}; + gridContainer->style().setGridTemplateRows(std::move(rows)); + + std::vector autoRows = { + GridTrackSize::length(60.0f), GridTrackSize::length(80.0f)}; + gridContainer->style().setGridAutoRows(std::move(autoRows)); + + createGridItem( + GridLine::auto_(), + GridLine::auto_(), + GridLine::fromInteger(-4), + GridLine::fromInteger(-2)); + + createGridItem( + GridLine::auto_(), + GridLine::auto_(), + GridLine::fromInteger(3), + GridLine::fromInteger(5)); + + auto autoPlacementResult = + ResolvedAutoPlacement::resolveGridItemPlacements(gridContainer); + GridTracks tracks = createGridTracks(gridContainer, autoPlacementResult); + + // 2 implicit before + 1 explicit + 3 implicit after = 7 tracks + EXPECT_EQ(tracks.rowTracks.size(), 6); + + // Implicit tracks before explicit grid + EXPECT_TRUE(tracks.rowTracks[1].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.rowTracks[1].minSizingFunction.resolve(0.0f).unwrap(), 80.0f); + EXPECT_TRUE(tracks.rowTracks[0].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.rowTracks[0].minSizingFunction.resolve(0.0f).unwrap(), 60.0f); + + // Explicit grid + EXPECT_EQ( + tracks.rowTracks[2].minSizingFunction.resolve(0.0f).unwrap(), 200.0f); + + // Implicit tracks after explicit grid + EXPECT_TRUE(tracks.rowTracks[3].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.rowTracks[3].minSizingFunction.resolve(0.0f).unwrap(), 60.0f); + EXPECT_TRUE(tracks.rowTracks[4].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.rowTracks[4].minSizingFunction.resolve(0.0f).unwrap(), 80.0f); + EXPECT_TRUE(tracks.rowTracks[5].minSizingFunction.isPoints()); + EXPECT_EQ( + tracks.rowTracks[5].minSizingFunction.resolve(0.0f).unwrap(), 60.0f); +} diff --git a/yarn.lock b/yarn.lock index dbaa766160..9412b071e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2239,11 +2239,6 @@ resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== -"@tsconfig/node18@^18.2.2": - version "18.2.2" - resolved "https://registry.yarnpkg.com/@tsconfig/node18/-/node18-18.2.2.tgz#81fb16ecff0d400b1cbadbf76713b50f331029ce" - integrity sha512-d6McJeGsuoRlwWZmVIeE8CUA27lu6jLjvv1JzqmpsytOYYbVi1tHZEnwCNVOXnj4pyLvneZlFlpXUK+X9wBWyw== - "@types/acorn@^4.0.0": version "4.0.6" resolved "https://registry.yarnpkg.com/@types/acorn/-/acorn-4.0.6.tgz#d61ca5480300ac41a7d973dd5b84d0a591154a22" @@ -2474,7 +2469,7 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.33.tgz#80bf1da64b15f21fd8c1dc387c31929317d99ee9" integrity sha512-AuHIyzR5Hea7ij0P9q7vx7xu4z0C28ucwjAZC0ja7JhINyCnOw8/DnvAPQQ9TfOlCtZAmCERKQX9+o1mgQhuOQ== -"@types/node@*", "@types/node@^20.10.3": +"@types/node@*": version "20.10.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.4.tgz#b246fd84d55d5b1b71bf51f964bd514409347198" integrity sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg== @@ -2496,6 +2491,13 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw== +"@types/node@^22.0.0": + version "22.19.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.19.11.tgz#7e1feaad24e4e36c52fa5558d5864bb4b272603e" + integrity sha512-BH7YwL6rA93ReqeQS1c4bsPpcfOmJasG+Fkr6Y59q83f9M1WcBRHR2vM+P9eOisYRcN3ujQoiZY8uk5W+1WL8w== + dependencies: + undici-types "~6.21.0" + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" @@ -10665,6 +10667,11 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" diff --git a/yoga/CMakeLists.txt b/yoga/CMakeLists.txt index b6eca1ac72..594600f702 100644 --- a/yoga/CMakeLists.txt +++ b/yoga/CMakeLists.txt @@ -20,7 +20,8 @@ include(${YOGA_ROOT}/cmake/project-defaults.cmake) file(GLOB SOURCES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/**/*.cpp) + ${CMAKE_CURRENT_SOURCE_DIR}/**/*.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/algorithm/grid/*.cpp) add_library(yogacore STATIC ${SOURCES}) diff --git a/yoga/YGEnums.cpp b/yoga/YGEnums.cpp index 4bdace6b7a..9fc4a83a82 100644 --- a/yoga/YGEnums.cpp +++ b/yoga/YGEnums.cpp @@ -29,6 +29,10 @@ const char* YGAlignToString(const YGAlign value) { return "space-around"; case YGAlignSpaceEvenly: return "space-evenly"; + case YGAlignStart: + return "start"; + case YGAlignEnd: + return "end"; } return "unknown"; } @@ -73,6 +77,8 @@ const char* YGDisplayToString(const YGDisplay value) { return "none"; case YGDisplayContents: return "contents"; + case YGDisplayGrid: + return "grid"; } return "unknown"; } @@ -141,6 +147,22 @@ const char* YGFlexDirectionToString(const YGFlexDirection value) { return "unknown"; } +const char* YGGridTrackTypeToString(const YGGridTrackType value) { + switch (value) { + case YGGridTrackTypeAuto: + return "auto"; + case YGGridTrackTypePoints: + return "points"; + case YGGridTrackTypePercent: + return "percent"; + case YGGridTrackTypeFr: + return "fr"; + case YGGridTrackTypeMinmax: + return "minmax"; + } + return "unknown"; +} + const char* YGGutterToString(const YGGutter value) { switch (value) { case YGGutterColumn: @@ -155,6 +177,8 @@ const char* YGGutterToString(const YGGutter value) { const char* YGJustifyToString(const YGJustify value) { switch (value) { + case YGJustifyAuto: + return "auto"; case YGJustifyFlexStart: return "flex-start"; case YGJustifyCenter: @@ -167,6 +191,12 @@ const char* YGJustifyToString(const YGJustify value) { return "space-around"; case YGJustifySpaceEvenly: return "space-evenly"; + case YGJustifyStretch: + return "stretch"; + case YGJustifyStart: + return "start"; + case YGJustifyEnd: + return "end"; } return "unknown"; } diff --git a/yoga/YGEnums.h b/yoga/YGEnums.h index bb83bcfac9..1b69f09318 100644 --- a/yoga/YGEnums.h +++ b/yoga/YGEnums.h @@ -22,7 +22,9 @@ YG_ENUM_DECL( YGAlignBaseline, YGAlignSpaceBetween, YGAlignSpaceAround, - YGAlignSpaceEvenly) + YGAlignSpaceEvenly, + YGAlignStart, + YGAlignEnd) YG_ENUM_DECL( YGBoxSizing, @@ -44,7 +46,8 @@ YG_ENUM_DECL( YGDisplay, YGDisplayFlex, YGDisplayNone, - YGDisplayContents) + YGDisplayContents, + YGDisplayGrid) YG_ENUM_DECL( YGEdge, @@ -79,6 +82,14 @@ YG_ENUM_DECL( YGFlexDirectionRow, YGFlexDirectionRowReverse) +YG_ENUM_DECL( + YGGridTrackType, + YGGridTrackTypeAuto, + YGGridTrackTypePoints, + YGGridTrackTypePercent, + YGGridTrackTypeFr, + YGGridTrackTypeMinmax) + YG_ENUM_DECL( YGGutter, YGGutterColumn, @@ -87,12 +98,16 @@ YG_ENUM_DECL( YG_ENUM_DECL( YGJustify, + YGJustifyAuto, YGJustifyFlexStart, YGJustifyCenter, YGJustifyFlexEnd, YGJustifySpaceBetween, YGJustifySpaceAround, - YGJustifySpaceEvenly) + YGJustifySpaceEvenly, + YGJustifyStretch, + YGJustifyStart, + YGJustifyEnd) YG_ENUM_DECL( YGLogLevel, diff --git a/yoga/YGGridTrackList.cpp b/yoga/YGGridTrackList.cpp new file mode 100644 index 0000000000..7417656758 --- /dev/null +++ b/yoga/YGGridTrackList.cpp @@ -0,0 +1,179 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include +#include +#include +#include +#include + +using namespace facebook::yoga; + +// Internal representation of a grid track value +struct YGGridTrackValue { + enum class Type { Points, Percent, Fr, Auto, MinMax }; + + Type type; + float value; + YGGridTrackValue* minValue; + YGGridTrackValue* maxValue; + + YGGridTrackValue(Type t, float v = 0.0f) + : type(t), value(v), minValue(nullptr), maxValue(nullptr) {} + + YGGridTrackValue(YGGridTrackValue* min, YGGridTrackValue* max) + : type(Type::MinMax), value(0.0f), minValue(min), maxValue(max) {} + + ~YGGridTrackValue() { + // MinMax owns its min/max values + if (type == Type::MinMax) { + delete minValue; + delete maxValue; + } + } + + StyleSizeLength toStyleSizeLength() const { + switch (type) { + case Type::Points: + return StyleSizeLength::points(value); + case Type::Percent: + return StyleSizeLength::percent(value); + case Type::Fr: + return StyleSizeLength::stretch(value); + case Type::Auto: + return StyleSizeLength::ofAuto(); + case Type::MinMax: + // MinMax should not call this, it needs special handling + return StyleSizeLength::ofAuto(); + } + return StyleSizeLength::ofAuto(); + } +}; + +// Internal representation of a grid track list +struct YGGridTrackList { + std::vector tracks; + + YGGridTrackList() = default; + YGGridTrackList(const YGGridTrackList&) = delete; + YGGridTrackList& operator=(const YGGridTrackList&) = delete; + YGGridTrackList(YGGridTrackList&&) = delete; + YGGridTrackList& operator=(YGGridTrackList&&) = delete; + + ~YGGridTrackList() { + for (auto* track : tracks) { + delete track; + } + } + + GridTrackList toGridTrackList() const { + GridTrackList result; + result.reserve(tracks.size()); + + for (auto* track : tracks) { + if (track->type == YGGridTrackValue::Type::MinMax) { + auto min = track->minValue->toStyleSizeLength(); + auto max = track->maxValue->toStyleSizeLength(); + result.push_back(GridTrackSize::minmax(min, max)); + } else { + switch (track->type) { + case YGGridTrackValue::Type::Points: + result.push_back(GridTrackSize::length(track->value)); + break; + case YGGridTrackValue::Type::Percent: + result.push_back(GridTrackSize::percent(track->value)); + break; + case YGGridTrackValue::Type::Fr: + result.push_back(GridTrackSize::fr(track->value)); + break; + case YGGridTrackValue::Type::Auto: + result.push_back(GridTrackSize::auto_()); + break; + case YGGridTrackValue::Type::MinMax: + // Already handled above + break; + } + } + } + + return result; + } +}; + +YGGridTrackListRef YGGridTrackListCreate() { + return new YGGridTrackList(); +} + +void YGGridTrackListFree(YGGridTrackListRef list) { + delete list; +} + +void YGGridTrackListAddTrack( + YGGridTrackListRef list, + YGGridTrackValueRef trackValue) { + if (list && trackValue) { + list->tracks.push_back(trackValue); + } +} + +YGGridTrackValueRef YGPoints(float points) { + return new YGGridTrackValue(YGGridTrackValue::Type::Points, points); +} + +YGGridTrackValueRef YGPercent(float percent) { + return new YGGridTrackValue(YGGridTrackValue::Type::Percent, percent); +} + +YGGridTrackValueRef YGFr(float fr) { + return new YGGridTrackValue(YGGridTrackValue::Type::Fr, fr); +} + +YGGridTrackValueRef YGAuto() { + return new YGGridTrackValue(YGGridTrackValue::Type::Auto); +} + +YGGridTrackValueRef YGMinMax(YGGridTrackValueRef min, YGGridTrackValueRef max) { + return new YGGridTrackValue(min, max); +} + +void YGNodeStyleSetGridTemplateRows( + YGNodeRef node, + YGGridTrackListRef trackList) { + if (node && trackList) { + auto* n = resolveRef(node); + n->style().setGridTemplateRows(trackList->toGridTrackList()); + n->markDirtyAndPropagate(); + } +} + +void YGNodeStyleSetGridTemplateColumns( + YGNodeRef node, + YGGridTrackListRef trackList) { + if (node && trackList) { + auto* n = resolveRef(node); + n->style().setGridTemplateColumns(trackList->toGridTrackList()); + n->markDirtyAndPropagate(); + } +} + +void YGNodeStyleSetGridAutoRows(YGNodeRef node, YGGridTrackListRef trackList) { + if (node && trackList) { + auto* n = resolveRef(node); + n->style().setGridAutoRows(trackList->toGridTrackList()); + n->markDirtyAndPropagate(); + } +} + +void YGNodeStyleSetGridAutoColumns( + YGNodeRef node, + YGGridTrackListRef trackList) { + if (node && trackList) { + auto* n = resolveRef(node); + n->style().setGridAutoColumns(trackList->toGridTrackList()); + n->markDirtyAndPropagate(); + } +} diff --git a/yoga/YGGridTrackList.h b/yoga/YGGridTrackList.h new file mode 100644 index 0000000000..a89e92cca6 --- /dev/null +++ b/yoga/YGGridTrackList.h @@ -0,0 +1,96 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include +#include + +YG_EXTERN_C_BEGIN + +/** + * Opaque handle to a grid track list for building grid-template-rows/columns. + */ +typedef struct YGGridTrackList* YGGridTrackListRef; + +/** + * Opaque handle to a grid track value. + */ +typedef struct YGGridTrackValue* YGGridTrackValueRef; + +/** + * Create a new grid track list. + */ +YG_EXPORT YGGridTrackListRef YGGridTrackListCreate(void); + +/** + * Free a grid track list. + */ +YG_EXPORT void YGGridTrackListFree(YGGridTrackListRef list); + +/** + * Add a track to the grid track list. + */ +YG_EXPORT void YGGridTrackListAddTrack( + YGGridTrackListRef list, + YGGridTrackValueRef trackValue); + +/** + * Create a grid track value with a points (px) length. + */ +YG_EXPORT YGGridTrackValueRef YGPoints(float points); + +/** + * Create a grid track value with a percentage length. + */ +YG_EXPORT YGGridTrackValueRef YGPercent(float percent); + +/** + * Create a grid track value with a flexible (fr) length. + */ +YG_EXPORT YGGridTrackValueRef YGFr(float fr); + +/** + * Create a grid track value with auto sizing. + */ +YG_EXPORT YGGridTrackValueRef YGAuto(void); + +/** + * Create a grid track value with minmax(min, max) sizing. + */ +YG_EXPORT YGGridTrackValueRef +YGMinMax(YGGridTrackValueRef min, YGGridTrackValueRef max); + +/** + * Set the grid-template-rows property on a node. + */ +YG_EXPORT void YGNodeStyleSetGridTemplateRows( + YGNodeRef node, + YGGridTrackListRef trackList); + +/** + * Set the grid-template-columns property on a node. + */ +YG_EXPORT void YGNodeStyleSetGridTemplateColumns( + YGNodeRef node, + YGGridTrackListRef trackList); + +/** + * Set the grid-auto-rows property on a node. + */ +YG_EXPORT void YGNodeStyleSetGridAutoRows( + YGNodeRef node, + YGGridTrackListRef trackList); + +/** + * Set the grid-auto-columns property on a node. + */ +YG_EXPORT void YGNodeStyleSetGridAutoColumns( + YGNodeRef node, + YGGridTrackListRef trackList); + +YG_EXTERN_C_END diff --git a/yoga/YGNodeStyle.cpp b/yoga/YGNodeStyle.cpp index 4e77405b6c..f859c8427a 100644 --- a/yoga/YGNodeStyle.cpp +++ b/yoga/YGNodeStyle.cpp @@ -74,6 +74,24 @@ YGJustify YGNodeStyleGetJustifyContent(const YGNodeConstRef node) { return unscopedEnum(resolveRef(node)->style().justifyContent()); } +void YGNodeStyleSetJustifyItems(YGNodeRef node, const YGJustify justifyItems) { + updateStyle<&Style::justifyItems, &Style::setJustifyItems>( + node, scopedEnum(justifyItems)); +} + +YGJustify YGNodeStyleGetJustifyItems(const YGNodeConstRef node) { + return unscopedEnum(resolveRef(node)->style().justifyItems()); +} + +void YGNodeStyleSetJustifySelf(YGNodeRef node, const YGJustify justifySelf) { + updateStyle<&Style::justifySelf, &Style::setJustifySelf>( + node, scopedEnum(justifySelf)); +} + +YGJustify YGNodeStyleGetJustifySelf(const YGNodeConstRef node) { + return unscopedEnum(resolveRef(node)->style().justifySelf()); +} + void YGNodeStyleSetAlignContent( const YGNodeRef node, const YGAlign alignContent) { @@ -503,3 +521,85 @@ void YGNodeStyleSetMaxHeightStretch(const YGNodeRef node) { YGValue YGNodeStyleGetMaxHeight(const YGNodeConstRef node) { return (YGValue)resolveRef(node)->style().maxDimension(Dimension::Height); } + +// Grid Item Placement Properties + +void YGNodeStyleSetGridColumnStart(YGNodeRef node, int32_t gridColumnStart) { + updateStyle<&Style::gridColumnStart, &Style::setGridColumnStart>( + node, GridLine::fromInteger(gridColumnStart)); +} + +void YGNodeStyleSetGridColumnStartAuto(YGNodeRef node) { + updateStyle<&Style::gridColumnStart, &Style::setGridColumnStart>( + node, GridLine::auto_()); +} + +void YGNodeStyleSetGridColumnStartSpan(YGNodeRef node, int32_t span) { + updateStyle<&Style::gridColumnStart, &Style::setGridColumnStart>( + node, GridLine::span(span)); +} + +int32_t YGNodeStyleGetGridColumnStart(YGNodeConstRef node) { + const auto& gridLine = resolveRef(node)->style().gridColumnStart(); + return gridLine.isInteger() ? gridLine.integer : 0; +} + +void YGNodeStyleSetGridColumnEnd(YGNodeRef node, int32_t gridColumnEnd) { + updateStyle<&Style::gridColumnEnd, &Style::setGridColumnEnd>( + node, GridLine::fromInteger(gridColumnEnd)); +} + +void YGNodeStyleSetGridColumnEndAuto(YGNodeRef node) { + updateStyle<&Style::gridColumnEnd, &Style::setGridColumnEnd>( + node, GridLine::auto_()); +} + +void YGNodeStyleSetGridColumnEndSpan(YGNodeRef node, int32_t span) { + updateStyle<&Style::gridColumnEnd, &Style::setGridColumnEnd>( + node, GridLine::span(span)); +} + +int32_t YGNodeStyleGetGridColumnEnd(YGNodeConstRef node) { + const auto& gridLine = resolveRef(node)->style().gridColumnEnd(); + return gridLine.isInteger() ? gridLine.integer : 0; +} + +void YGNodeStyleSetGridRowStart(YGNodeRef node, int32_t gridRowStart) { + updateStyle<&Style::gridRowStart, &Style::setGridRowStart>( + node, GridLine::fromInteger(gridRowStart)); +} + +void YGNodeStyleSetGridRowStartAuto(YGNodeRef node) { + updateStyle<&Style::gridRowStart, &Style::setGridRowStart>( + node, GridLine::auto_()); +} + +void YGNodeStyleSetGridRowStartSpan(YGNodeRef node, int32_t span) { + updateStyle<&Style::gridRowStart, &Style::setGridRowStart>( + node, GridLine::span(span)); +} + +int32_t YGNodeStyleGetGridRowStart(YGNodeConstRef node) { + const auto& gridLine = resolveRef(node)->style().gridRowStart(); + return gridLine.isInteger() ? gridLine.integer : 0; +} + +void YGNodeStyleSetGridRowEnd(YGNodeRef node, int32_t gridRowEnd) { + updateStyle<&Style::gridRowEnd, &Style::setGridRowEnd>( + node, GridLine::fromInteger(gridRowEnd)); +} + +void YGNodeStyleSetGridRowEndAuto(YGNodeRef node) { + updateStyle<&Style::gridRowEnd, &Style::setGridRowEnd>( + node, GridLine::auto_()); +} + +void YGNodeStyleSetGridRowEndSpan(YGNodeRef node, int32_t span) { + updateStyle<&Style::gridRowEnd, &Style::setGridRowEnd>( + node, GridLine::span(span)); +} + +int32_t YGNodeStyleGetGridRowEnd(YGNodeConstRef node) { + const auto& gridLine = resolveRef(node)->style().gridRowEnd(); + return gridLine.isInteger() ? gridLine.integer : 0; +} diff --git a/yoga/YGNodeStyle.h b/yoga/YGNodeStyle.h index 21b8326d85..d1afd5c8ae 100644 --- a/yoga/YGNodeStyle.h +++ b/yoga/YGNodeStyle.h @@ -8,7 +8,6 @@ #pragma once #include - #include #include @@ -29,6 +28,14 @@ YG_EXPORT void YGNodeStyleSetJustifyContent( YGJustify justifyContent); YG_EXPORT YGJustify YGNodeStyleGetJustifyContent(YGNodeConstRef node); +YG_EXPORT void YGNodeStyleSetJustifyItems( + YGNodeRef node, + YGJustify justifyItems); +YG_EXPORT YGJustify YGNodeStyleGetJustifyItems(YGNodeConstRef node); + +YG_EXPORT void YGNodeStyleSetJustifySelf(YGNodeRef node, YGJustify justifySelf); +YG_EXPORT YGJustify YGNodeStyleGetJustifySelf(YGNodeConstRef node); + YG_EXPORT void YGNodeStyleSetAlignContent(YGNodeRef node, YGAlign alignContent); YG_EXPORT YGAlign YGNodeStyleGetAlignContent(YGNodeConstRef node); @@ -148,4 +155,27 @@ YG_EXPORT YGValue YGNodeStyleGetMaxHeight(YGNodeConstRef node); YG_EXPORT void YGNodeStyleSetAspectRatio(YGNodeRef node, float aspectRatio); YG_EXPORT float YGNodeStyleGetAspectRatio(YGNodeConstRef node); +// Grid Item Properties +YG_EXPORT void YGNodeStyleSetGridColumnStart( + YGNodeRef node, + int gridColumnStart); +YG_EXPORT void YGNodeStyleSetGridColumnStartAuto(YGNodeRef node); +YG_EXPORT void YGNodeStyleSetGridColumnStartSpan(YGNodeRef node, int span); +YG_EXPORT int YGNodeStyleGetGridColumnStart(YGNodeConstRef node); + +YG_EXPORT void YGNodeStyleSetGridColumnEnd(YGNodeRef node, int gridColumnEnd); +YG_EXPORT void YGNodeStyleSetGridColumnEndAuto(YGNodeRef node); +YG_EXPORT void YGNodeStyleSetGridColumnEndSpan(YGNodeRef node, int span); +YG_EXPORT int YGNodeStyleGetGridColumnEnd(YGNodeConstRef node); + +YG_EXPORT void YGNodeStyleSetGridRowStart(YGNodeRef node, int gridRowStart); +YG_EXPORT void YGNodeStyleSetGridRowStartAuto(YGNodeRef node); +YG_EXPORT void YGNodeStyleSetGridRowStartSpan(YGNodeRef node, int span); +YG_EXPORT int YGNodeStyleGetGridRowStart(YGNodeConstRef node); + +YG_EXPORT void YGNodeStyleSetGridRowEnd(YGNodeRef node, int gridRowEnd); +YG_EXPORT void YGNodeStyleSetGridRowEndAuto(YGNodeRef node); +YG_EXPORT void YGNodeStyleSetGridRowEndSpan(YGNodeRef node, int span); +YG_EXPORT int YGNodeStyleGetGridRowEnd(YGNodeConstRef node); + YG_EXTERN_C_END diff --git a/yoga/Yoga.h b/yoga/Yoga.h index 97f05ed3ea..25b7a8e83c 100644 --- a/yoga/Yoga.h +++ b/yoga/Yoga.h @@ -13,6 +13,7 @@ #include // IWYU pragma: export #include // IWYU pragma: export +#include // IWYU pragma: export #include // IWYU pragma: export #include // IWYU pragma: export #include // IWYU pragma: export diff --git a/yoga/algorithm/AbsoluteLayout.cpp b/yoga/algorithm/AbsoluteLayout.cpp index b2d8d8dbef..181dfcb1b0 100644 --- a/yoga/algorithm/AbsoluteLayout.cpp +++ b/yoga/algorithm/AbsoluteLayout.cpp @@ -23,7 +23,11 @@ static inline void setFlexStartLayoutPosition( axis, direction, containingBlockWidth) + parent->getLayout().border(flexStartEdge(axis)); - if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding)) { + // https://www.w3.org/TR/css-grid-1/#abspos + // absolute positioned grid items are positioned relative to the padding edge + // of the grid container + if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding) && + parent->style().display() != Display::Grid) { position += parent->getLayout().padding(flexStartEdge(axis)); } @@ -40,7 +44,11 @@ static inline void setFlexEndLayoutPosition( child->style().computeFlexEndMargin( axis, direction, containingBlockWidth); - if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding)) { + // https://www.w3.org/TR/css-grid-1/#abspos + // absolute positioned grid items are positioned relative to the padding edge + // of the grid container + if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding) && + parent->style().display() != Display::Grid) { flexEndPosition += parent->getLayout().padding(flexEndEdge(axis)); } @@ -60,7 +68,11 @@ static inline void setCenterLayoutPosition( parent->getLayout().border(flexStartEdge(axis)) - parent->getLayout().border(flexEndEdge(axis)); - if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding)) { + // https://www.w3.org/TR/css-grid-1/#abspos + // absolute positioned grid items are positioned relative to the padding edge + // of the grid container + if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding) && + parent->style().display() != Display::Grid) { parentContentBoxSize -= parent->getLayout().padding(flexStartEdge(axis)); parentContentBoxSize -= parent->getLayout().padding(flexEndEdge(axis)); } @@ -74,7 +86,11 @@ static inline void setCenterLayoutPosition( child->style().computeFlexStartMargin( axis, direction, containingBlockWidth); - if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding)) { + // https://www.w3.org/TR/css-grid-1/#abspos + // absolute positioned grid items are positioned relative to the padding edge + // of the grid container + if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding) && + parent->style().display() != Display::Grid) { position += parent->getLayout().padding(flexStartEdge(axis)); } @@ -87,13 +103,19 @@ static void justifyAbsoluteChild( const Direction direction, const FlexDirection mainAxis, const float containingBlockWidth) { - const Justify parentJustifyContent = parent->style().justifyContent(); - switch (parentJustifyContent) { + const Justify justify = parent->style().display() == Display::Grid + ? resolveChildJustification(parent, child) + : parent->style().justifyContent(); + switch (justify) { + case Justify::Start: + case Justify::Auto: + case Justify::Stretch: case Justify::FlexStart: case Justify::SpaceBetween: setFlexStartLayoutPosition( parent, child, direction, mainAxis, containingBlockWidth); break; + case Justify::End: case Justify::FlexEnd: setFlexEndLayoutPosition( parent, child, direction, mainAxis, containingBlockWidth); @@ -124,6 +146,7 @@ static void alignAbsoluteChild( } switch (itemAlign) { + case Align::Start: case Align::Auto: case Align::FlexStart: case Align::Baseline: @@ -134,6 +157,7 @@ static void alignAbsoluteChild( setFlexStartLayoutPosition( parent, child, direction, crossAxis, containingBlockWidth); break; + case Align::End: case Align::FlexEnd: setFlexEndLayoutPosition( parent, child, direction, crossAxis, containingBlockWidth); @@ -234,9 +258,15 @@ void layoutAbsoluteChild( LayoutData& layoutMarkerData, const uint32_t depth, const uint32_t generationCount) { - const FlexDirection mainAxis = - resolveDirection(node->style().flexDirection(), direction); - const FlexDirection crossAxis = resolveCrossDirection(mainAxis, direction); + // For grid containers, use inline (Row) and block (Column) axes for + // positioning, since grid alignment properties (justify-self, align-self) + // operate on inline/block axes, not main/cross axes based on flex-direction. + const FlexDirection mainAxis = node->style().display() == Display::Grid + ? resolveDirection(FlexDirection::Row, direction) + : resolveDirection(node->style().flexDirection(), direction); + const FlexDirection crossAxis = node->style().display() == Display::Grid + ? FlexDirection::Column + : resolveCrossDirection(mainAxis, direction); const bool isMainAxisRow = isRow(mainAxis); float childWidth = YGUndefined; diff --git a/yoga/algorithm/Align.h b/yoga/algorithm/Align.h index bb21fe5dca..b12ae7fd53 100644 --- a/yoga/algorithm/Align.h +++ b/yoga/algorithm/Align.h @@ -20,12 +20,23 @@ inline Align resolveChildAlignment( const Align align = child->style().alignSelf() == Align::Auto ? node->style().alignItems() : child->style().alignSelf(); - if (align == Align::Baseline && isColumn(node->style().flexDirection())) { + + if (node->style().display() == Display::Flex && align == Align::Baseline && + isColumn(node->style().flexDirection())) { return Align::FlexStart; } + return align; } +inline Justify resolveChildJustification( + const yoga::Node* node, + const yoga::Node* child) { + return child->style().justifySelf() == Justify::Auto + ? node->style().justifyItems() + : child->style().justifySelf(); +} + /** * Fallback alignment to use on overflow * https://www.w3.org/TR/css-align-3/#distribution-values diff --git a/yoga/algorithm/CalculateLayout.cpp b/yoga/algorithm/CalculateLayout.cpp index 81a5f3b8a0..b9b3d90d2a 100644 --- a/yoga/algorithm/CalculateLayout.cpp +++ b/yoga/algorithm/CalculateLayout.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,7 @@ namespace facebook::yoga { std::atomic gCurrentGenerationCount(0); -static void constrainMaxSizeForMode( +void constrainMaxSizeForMode( const yoga::Node* node, Direction direction, FlexDirection axis, @@ -468,7 +469,7 @@ static bool measureNodeWithFixedSize( return false; } -static void zeroOutLayoutRecursively(yoga::Node* const node) { +void zeroOutLayoutRecursively(yoga::Node* const node) { node->getLayout() = {}; node->setLayoutDimension(0, Dimension::Width); node->setLayoutDimension(0, Dimension::Height); @@ -480,7 +481,7 @@ static void zeroOutLayoutRecursively(yoga::Node* const node) { } } -static void cleanupContentsNodesRecursively(yoga::Node* const node) { +void cleanupContentsNodesRecursively(yoga::Node* const node) { if (node->hasContentsChildren()) [[unlikely]] { node->cloneContentsChildrenIfNeeded(); for (auto child : node->getChildren()) { @@ -498,7 +499,7 @@ static void cleanupContentsNodesRecursively(yoga::Node* const node) { } } -static float calculateAvailableInnerDimension( +float calculateAvailableInnerDimension( const yoga::Node* const node, const Direction direction, const Dimension dimension, @@ -1046,6 +1047,14 @@ static void justifyMainAxis( if (flexLine.numberOfAutoMargins == 0) { switch (justifyContent) { + case Justify::Start: + case Justify::End: + case Justify::Auto: + // No-Op + break; + case Justify::Stretch: + // No-Op + break; case Justify::Center: leadingMainDim = flexLine.layout.remainingFreeSpace / 2; break; @@ -1367,6 +1376,24 @@ static void calculateLayoutImpl( // current node as they will not be traversed cleanupContentsNodesRecursively(node); + if (node->style().display() == Display::Grid) { + calculateGridLayoutInternal( + node, + availableWidth, + availableHeight, + ownerDirection, + widthSizingMode, + heightSizingMode, + ownerWidth, + ownerHeight, + performLayout, + reason, + layoutMarkerData, + depth, + generationCount); + return; + } + // STEP 1: CALCULATE VALUES FOR REMAINDER OF ALGORITHM const FlexDirection mainAxis = resolveDirection(node->style().flexDirection(), direction); @@ -1799,6 +1826,10 @@ static void calculateLayoutImpl( : fallbackAlignment(node->style().alignContent()); switch (alignContent) { + case Align::Start: + case Align::End: + // No-Op + break; case Align::FlexEnd: currentLead += remainingAlignContentDim; break; @@ -1886,6 +1917,10 @@ static void calculateLayoutImpl( } if (child->style().positionType() != PositionType::Absolute) { switch (resolveChildAlignment(node, child)) { + case Align::Start: + case Align::End: + // No-Op + break; case Align::FlexStart: { child->setLayoutPosition( currentLead + diff --git a/yoga/algorithm/CalculateLayout.h b/yoga/algorithm/CalculateLayout.h index 5e6884ec1a..86b3c61afe 100644 --- a/yoga/algorithm/CalculateLayout.h +++ b/yoga/algorithm/CalculateLayout.h @@ -35,4 +35,26 @@ bool calculateLayoutInternal( uint32_t depth, uint32_t generationCount); +void constrainMaxSizeForMode( + const yoga::Node* node, + Direction direction, + FlexDirection axis, + float ownerAxisSize, + float ownerWidth, + /*in_out*/ SizingMode* mode, + /*in_out*/ float* size); + +float calculateAvailableInnerDimension( + const yoga::Node* const node, + const Direction direction, + const Dimension dimension, + const float availableDim, + const float paddingAndBorder, + const float ownerDim, + const float ownerWidth); + +void zeroOutLayoutRecursively(yoga::Node* const node); + +void cleanupContentsNodesRecursively(yoga::Node* const node); + } // namespace facebook::yoga diff --git a/yoga/algorithm/grid/AutoPlacement.h b/yoga/algorithm/grid/AutoPlacement.h new file mode 100644 index 0000000000..0245c2fbd6 --- /dev/null +++ b/yoga/algorithm/grid/AutoPlacement.h @@ -0,0 +1,585 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace facebook::yoga { + +struct OccupancyGrid { + std::unordered_map>> + rowIntervals; + + void markOccupied( + int32_t rowStart, + int32_t rowEnd, + int32_t colStart, + int32_t colEnd) { + for (int32_t row = rowStart; row < rowEnd; row++) { + rowIntervals[row].emplace_back(colStart, colEnd); + } + } + + bool hasOverlap( + int32_t rowStart, + int32_t rowEnd, + int32_t colStart, + int32_t colEnd) const { + for (int32_t row = rowStart; row < rowEnd; row++) { + auto it = rowIntervals.find(row); + if (it == rowIntervals.end()) { + continue; + } + for (const auto& interval : it->second) { + if (interval.first < colEnd && interval.second > colStart) { + return true; + } + } + } + return false; + } +}; + +struct GridItemTrackPlacement { + int32_t start = 0; + int32_t end = 0; + int32_t span = 1; + // https://www.w3.org/TR/css-grid-1/#grid-placement-errors + static GridItemTrackPlacement resolveLinePlacement( + const GridLine& startLine, + const GridLine& endLine, + int32_t explicitLineCount) { + GridItemTrackPlacement placement; + + auto resolveNegativeLineValue = [](int32_t lineValue, + int32_t explicitLineCount) -> int32_t { + return lineValue < 0 ? explicitLineCount + lineValue + 1 : lineValue; + }; + + // If the placement for a grid item contains two lines + if (startLine.type == GridLineType::Integer && + endLine.type == GridLineType::Integer) { + // if lines are negative, we count it from the last line. e.g. -1 is the + // last line + auto normalizedStartLine = + resolveNegativeLineValue(startLine.integer, explicitLineCount); + auto normalizedEndLine = + resolveNegativeLineValue(endLine.integer, explicitLineCount); + // and the start line is further end-ward than the end line, swap the two + // lines. + if (normalizedStartLine > normalizedEndLine) { + placement.start = normalizedEndLine; + placement.end = normalizedStartLine; + placement.span = placement.end - placement.start; + } + // If the start line is equal to the end line, remove the end line. + else if (normalizedStartLine == normalizedEndLine) { + placement.start = normalizedStartLine; + placement.end = normalizedStartLine + 1; + placement.span = 1; + } else { + placement.start = normalizedStartLine; + placement.end = normalizedEndLine; + placement.span = placement.end - placement.start; + } + } + // If the placement contains two spans, remove the one contributed by the + // end grid-placement property. + else if ( + startLine.type == GridLineType::Span && + endLine.type == GridLineType::Span) { + placement.start = 0; + placement.end = 0; + placement.span = startLine.integer; + } + + else if ( + startLine.type == GridLineType::Integer && + endLine.type == GridLineType::Span) { + auto normalizedStartLine = + resolveNegativeLineValue(startLine.integer, explicitLineCount); + placement.start = normalizedStartLine; + placement.span = endLine.integer; + placement.end = placement.start + placement.span; + } + + else if ( + startLine.type == GridLineType::Span && + endLine.type == GridLineType::Integer) { + auto normalizedEndLine = + resolveNegativeLineValue(endLine.integer, explicitLineCount); + placement.end = normalizedEndLine; + placement.span = startLine.integer; + placement.start = placement.end - placement.span; + } + + else if (startLine.type == GridLineType::Integer) { + auto normalizedStartLine = + resolveNegativeLineValue(startLine.integer, explicitLineCount); + placement.start = normalizedStartLine; + placement.span = 1; + placement.end = placement.start + placement.span; + } + + else if (startLine.type == GridLineType::Span) { + placement.span = startLine.integer; + placement.start = 0; + placement.end = 0; + } + + else if (endLine.type == GridLineType::Integer) { + auto normalizedEndLine = + resolveNegativeLineValue(endLine.integer, explicitLineCount); + placement.end = normalizedEndLine; + placement.span = 1; + placement.start = placement.end - placement.span; + } + + else if (endLine.type == GridLineType::Span) { + placement.span = endLine.integer; + placement.start = 0; + placement.end = 0; + } + + else { + placement.start = 0; + placement.end = 0; + placement.span = 1; + } + + // we want 0 based indexing, so we subtract 1. Negative values will imply + // auto implicit grid lines + placement.start = placement.start - 1; + placement.end = placement.end - 1; + + return placement; + } +}; + +struct AutoPlacement { + struct AutoPlacementItem { + int32_t columnStart; + int32_t columnEnd; + int32_t rowStart; + int32_t rowEnd; + + yoga::Node* node; + + bool overlaps(const AutoPlacementItem& other) const { + return columnStart < other.columnEnd && columnEnd > other.columnStart && + rowStart < other.rowEnd && rowEnd > other.rowStart; + } + }; + + std::vector gridItems; + int32_t minColumnStart; + int32_t minRowStart; + int32_t maxColumnEnd; + int32_t maxRowEnd; + + static AutoPlacement performAutoPlacement(yoga::Node* node) { + std::vector gridItems; + gridItems.reserve(node->getChildCount()); + std::unordered_set placedItems; + placedItems.reserve(node->getChildCount()); + int32_t minColumnStart = 0; + int32_t minRowStart = 0; + int32_t maxColumnEnd = + static_cast(node->style().gridTemplateColumns().size()); + int32_t maxRowEnd = + static_cast(node->style().gridTemplateRows().size()); + OccupancyGrid occupancy; + + // function to push back a grid item placement and record the min/max + // column/row start/end + auto recordGridArea = [&](AutoPlacementItem& gridItemArea) { + yoga::assertFatal( + gridItemArea.columnEnd > gridItemArea.columnStart, + "Grid item column end must be greater than column start"); + yoga::assertFatal( + gridItemArea.rowEnd > gridItemArea.rowStart, + "Grid item row end must be greater than row start"); + gridItems.push_back(gridItemArea); + placedItems.insert(gridItemArea.node); + occupancy.markOccupied( + gridItemArea.rowStart, + gridItemArea.rowEnd, + gridItemArea.columnStart, + gridItemArea.columnEnd); + minColumnStart = std::min(minColumnStart, gridItemArea.columnStart); + minRowStart = std::min(minRowStart, gridItemArea.rowStart); + maxColumnEnd = std::max(maxColumnEnd, gridItemArea.columnEnd); + maxRowEnd = std::max(maxRowEnd, gridItemArea.rowEnd); + }; + + auto explicitColumnLineCount = + static_cast(node->style().gridTemplateColumns().size() + 1); + auto explicitRowLineCount = + static_cast(node->style().gridTemplateRows().size() + 1); + + // Step 1: Position anything that's not auto-positioned. + // In spec level 1, span is always definite. Default is 1. + // So for grid position to be definite, we need either start or end to be + // definite. + for (auto child : node->getLayoutChildren()) { + if (child->style().positionType() == PositionType::Absolute || + child->style().display() == Display::None) { + continue; + } + + auto gridItemColumnStart = child->style().gridColumnStart(); + auto gridItemColumnEnd = child->style().gridColumnEnd(); + auto gridItemRowStart = child->style().gridRowStart(); + auto gridItemRowEnd = child->style().gridRowEnd(); + auto hasDefiniteColumn = + gridItemColumnStart.type == GridLineType::Integer || + gridItemColumnEnd.type == GridLineType::Integer; + auto hasDefiniteRow = gridItemRowStart.type == GridLineType::Integer || + gridItemRowEnd.type == GridLineType::Integer; + + auto hasDefinitePosition = hasDefiniteColumn && hasDefiniteRow; + + if (hasDefinitePosition) { + auto columnPlacement = GridItemTrackPlacement::resolveLinePlacement( + gridItemColumnStart, gridItemColumnEnd, explicitColumnLineCount); + auto rowPlacement = GridItemTrackPlacement::resolveLinePlacement( + gridItemRowStart, gridItemRowEnd, explicitRowLineCount); + + auto columnStart = columnPlacement.start; + auto columnEnd = columnPlacement.end; + + auto rowStart = rowPlacement.start; + auto rowEnd = rowPlacement.end; + + auto gridItemArea = AutoPlacementItem{ + .columnStart = columnStart, + .columnEnd = columnEnd, + .rowStart = rowStart, + .rowEnd = rowEnd, + .node = child}; + recordGridArea(gridItemArea); + } + } + + // Step 2: Process the items locked to a given row. + // Definite row positions only, exclude items with definite column + // positions. + std::unordered_map rowStartToColumnStartCache; + for (auto child : node->getLayoutChildren()) { + if (child->style().positionType() == PositionType::Absolute || + child->style().display() == Display::None) { + continue; + } + + auto gridItemColumnStart = child->style().gridColumnStart(); + auto gridItemColumnEnd = child->style().gridColumnEnd(); + auto gridItemRowStart = child->style().gridRowStart(); + auto gridItemRowEnd = child->style().gridRowEnd(); + auto hasDefiniteRow = gridItemRowStart.type == GridLineType::Integer || + gridItemRowEnd.type == GridLineType::Integer; + auto hasDefiniteColumn = + gridItemColumnStart.type == GridLineType::Integer || + gridItemColumnEnd.type == GridLineType::Integer; + + if (hasDefiniteRow && !hasDefiniteColumn) { + auto rowPlacement = GridItemTrackPlacement::resolveLinePlacement( + gridItemRowStart, gridItemRowEnd, explicitRowLineCount); + + auto rowStart = rowPlacement.start; + auto rowEnd = rowPlacement.end; + + auto columnStart = rowStartToColumnStartCache.contains(rowStart) + ? rowStartToColumnStartCache[rowStart] + : minColumnStart; + + auto columnPlacement = GridItemTrackPlacement::resolveLinePlacement( + gridItemColumnStart, gridItemColumnEnd, explicitColumnLineCount); + auto columnSpan = columnPlacement.span; + auto columnEnd = columnStart + columnSpan; + + bool placed = false; + while (!placed) { + auto gridItemArea = AutoPlacementItem{ + .columnStart = columnStart, + .columnEnd = columnEnd, + .rowStart = rowStart, + .rowEnd = rowEnd, + .node = child}; + if (occupancy.hasOverlap(rowStart, rowEnd, columnStart, columnEnd)) { + columnStart++; + columnEnd = columnStart + columnSpan; + } else { + recordGridArea(gridItemArea); + rowStartToColumnStartCache[rowStart] = columnEnd; + placed = true; + } + } + } + } + + // Step 3: Determine the columns in the implicit grid. + // TODO: we dont need this loop. we can do it in above steps. But keeping it + // for now, to match the spec. + auto largestColumnSpan = 1; + for (auto child : node->getLayoutChildren()) { + if (child->style().positionType() == PositionType::Absolute || + child->style().display() == Display::None) { + continue; + } + + auto gridItemColumnStart = child->style().gridColumnStart(); + auto gridItemColumnEnd = child->style().gridColumnEnd(); + + auto hasDefiniteColumn = + gridItemColumnStart.type == GridLineType::Integer || + gridItemColumnEnd.type == GridLineType::Integer; + + if (hasDefiniteColumn) { + auto columnPlacement = GridItemTrackPlacement::resolveLinePlacement( + gridItemColumnStart, gridItemColumnEnd, explicitColumnLineCount); + + auto columnStart = columnPlacement.start; + auto columnEnd = columnPlacement.end; + + minColumnStart = std::min(minColumnStart, columnStart); + maxColumnEnd = std::max(maxColumnEnd, columnEnd); + } else { + auto columnPlacement = GridItemTrackPlacement::resolveLinePlacement( + gridItemColumnStart, gridItemColumnEnd, explicitColumnLineCount); + largestColumnSpan = std::max(largestColumnSpan, columnPlacement.span); + } + } + + // If largest span is larger than current grid width, extend the end + auto currentGridWidth = maxColumnEnd - minColumnStart; + if (largestColumnSpan > currentGridWidth) { + maxColumnEnd = minColumnStart + largestColumnSpan; + } + + // Step 4: Position the remaining grid items. + std::array autoPlacementCursor = {minColumnStart, minRowStart}; + for (auto child : node->getLayoutChildren()) { + if (child->style().positionType() == PositionType::Absolute || + child->style().display() == Display::None) { + continue; + } + + if (!placedItems.contains(child)) { + auto gridItemColumnStart = child->style().gridColumnStart(); + auto gridItemColumnEnd = child->style().gridColumnEnd(); + auto hasDefiniteColumn = + gridItemColumnStart.type == GridLineType::Integer || + gridItemColumnEnd.type == GridLineType::Integer; + + auto gridItemRowStart = child->style().gridRowStart(); + auto gridItemRowEnd = child->style().gridRowEnd(); + auto hasDefiniteRow = gridItemRowStart.type == GridLineType::Integer || + gridItemRowEnd.type == GridLineType::Integer; + + auto columnPlacement = GridItemTrackPlacement::resolveLinePlacement( + gridItemColumnStart, gridItemColumnEnd, explicitColumnLineCount); + auto rowPlacement = GridItemTrackPlacement::resolveLinePlacement( + gridItemRowStart, gridItemRowEnd, explicitRowLineCount); + + // If the item has a definite column position: + if (hasDefiniteColumn) { + auto columnStart = columnPlacement.start; + auto columnEnd = columnPlacement.end; + + // Set cursor column position to item's column-start line + auto previousColumnPosition = autoPlacementCursor[0]; + autoPlacementCursor[0] = columnStart; + + // If this is less than previous column position, increment row + if (autoPlacementCursor[0] < previousColumnPosition) { + autoPlacementCursor[1]++; + } + + // Find a row position where the item doesn't overlap occupied cells + bool foundPosition = false; + auto rowSpan = rowPlacement.span; + while (!foundPosition) { + auto proposedRowStart = autoPlacementCursor[1]; + auto proposedRowEnd = proposedRowStart + rowSpan; + + // Check for overlaps with already placed items + AutoPlacementItem proposedPlacement{ + .columnStart = columnStart, + .columnEnd = columnEnd, + .rowStart = proposedRowStart, + .rowEnd = proposedRowEnd, + .node = child}; + + if (occupancy.hasOverlap( + proposedRowStart, proposedRowEnd, columnStart, columnEnd)) { + autoPlacementCursor[1]++; + } else { + recordGridArea(proposedPlacement); + foundPosition = true; + } + } + } + + // If the item has an automatic grid position in both axes: + else if (!hasDefiniteRow && !hasDefiniteColumn) { + auto itemColumnSpan = columnPlacement.span; + auto itemRowSpan = rowPlacement.span; + + bool foundPosition = false; + while (!foundPosition) { + // Try to find a position starting from current cursor position + while (autoPlacementCursor[0] + itemColumnSpan <= maxColumnEnd) { + auto columnStart = autoPlacementCursor[0]; + auto columnEnd = columnStart + itemColumnSpan; + auto rowStart = autoPlacementCursor[1]; + auto rowEnd = rowStart + itemRowSpan; + + AutoPlacementItem proposedPlacement{ + .columnStart = columnStart, + .columnEnd = columnEnd, + .rowStart = rowStart, + .rowEnd = rowEnd, + .node = child}; + + if (occupancy.hasOverlap( + rowStart, rowEnd, columnStart, columnEnd)) { + autoPlacementCursor[0]++; + } else { + recordGridArea(proposedPlacement); + foundPosition = true; + break; + } + } + + if (!foundPosition) { + // Cursor column position + span would overflow, move to next row + autoPlacementCursor[1]++; + autoPlacementCursor[0] = minColumnStart; + } + } + } + } + } + + return AutoPlacement{ + std::move(gridItems), + minColumnStart, + minRowStart, + maxColumnEnd, + maxRowEnd}; + } +}; + +struct GridItem { + size_t columnStart; + size_t columnEnd; + size_t rowStart; + size_t rowEnd; + yoga::Node* node; + // additional space added to align baselines + // https://www.w3.org/TR/css-grid-1/#algo-baseline-shims + float baselineShim = 0.0f; + // Flags used for optimisations in TrackSizing + bool crossesIntrinsicRow = false; + bool crossesIntrinsicColumn = false; + bool crossesFlexibleRow = false; + bool crossesFlexibleColumn = false; + + GridItem( + size_t columnStart, + size_t columnEnd, + size_t rowStart, + size_t rowEnd, + yoga::Node* node, + float baselineShim = 0.0f) + : columnStart(columnStart), + columnEnd(columnEnd), + rowStart(rowStart), + rowEnd(rowEnd), + node(node), + baselineShim(baselineShim) {} + + bool crossesIntrinsicTrack(Dimension dimension) const { + return dimension == Dimension::Width ? crossesIntrinsicColumn + : crossesIntrinsicRow; + } + bool crossesFlexibleTrack(Dimension dimension) const { + return dimension == Dimension::Width ? crossesFlexibleColumn + : crossesFlexibleRow; + } +}; + +// Baseline sharing groups - items grouped by their starting row for resolve +// intrinsic size step in TrackSizing +// https://www.w3.org/TR/css-grid-1/#algo-baseline-shims +using BaselineItemGroups = std::map>; + +struct ResolvedAutoPlacement { + std::vector gridItems; + BaselineItemGroups baselineItemGroups; + int32_t minColumnStart; + int32_t minRowStart; + int32_t maxColumnEnd; + int32_t maxRowEnd; + + // Offset column and row so they starts at 0 index + // also casts start and end values from int32_t to size_t + static ResolvedAutoPlacement resolveGridItemPlacements(Node* node) { + auto autoPlacement = AutoPlacement::performAutoPlacement(node); + + auto minColumnStart = autoPlacement.minColumnStart; + auto minRowStart = autoPlacement.minRowStart; + auto maxColumnEnd = autoPlacement.maxColumnEnd; + auto maxRowEnd = autoPlacement.maxRowEnd; + + std::vector resolvedAreas; + resolvedAreas.reserve(autoPlacement.gridItems.size()); + + BaselineItemGroups baselineGroups; + auto alignItems = node->style().alignItems(); + + for (auto& placement : autoPlacement.gridItems) { + resolvedAreas.emplace_back( + static_cast(placement.columnStart - minColumnStart), + static_cast(placement.columnEnd - minColumnStart), + static_cast(placement.rowStart - minRowStart), + static_cast(placement.rowEnd - minRowStart), + placement.node); + + auto& item = resolvedAreas.back(); + auto alignSelf = item.node->style().alignSelf(); + if (alignSelf == Align::Auto) { + alignSelf = alignItems; + } + bool spansOneRow = (item.rowEnd - item.rowStart) == 1; + if (alignSelf == Align::Baseline && spansOneRow) { + baselineGroups[item.rowStart].push_back(&item); + } + + // TODO: find a better place to call this + placement.node->processDimensions(); + } + + return ResolvedAutoPlacement{ + .gridItems = std::move(resolvedAreas), + .baselineItemGroups = std::move(baselineGroups), + .minColumnStart = minColumnStart, + .minRowStart = minRowStart, + .maxColumnEnd = maxColumnEnd, + .maxRowEnd = maxRowEnd}; + } +}; + +} // namespace facebook::yoga diff --git a/yoga/algorithm/grid/GridLayout.cpp b/yoga/algorithm/grid/GridLayout.cpp new file mode 100644 index 0000000000..14ee6e7d0a --- /dev/null +++ b/yoga/algorithm/grid/GridLayout.cpp @@ -0,0 +1,514 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include +#include +#include +#include +#include + +namespace facebook::yoga { + +void calculateGridLayoutInternal( + Node* node, + float availableWidth, + float availableHeight, + Direction ownerDirection, + SizingMode widthSizingMode, + SizingMode heightSizingMode, + float ownerWidth, + float ownerHeight, + bool performLayout, + LayoutPassReason reason, + LayoutData& layoutMarkerData, + uint32_t depth, + uint32_t generationCount) { + (void)reason; // Unused parameter + + const auto& nodeStyle = node->style(); + const Direction direction = node->resolveDirection(ownerDirection); + const float marginInline = + nodeStyle.computeMarginForAxis(FlexDirection::Row, ownerWidth); + const float marginBlock = + nodeStyle.computeMarginForAxis(FlexDirection::Column, ownerWidth); + const float paddingAndBorderInline = + paddingAndBorderForAxis(node, FlexDirection::Row, direction, ownerWidth); + const float paddingAndBorderBlock = paddingAndBorderForAxis( + node, FlexDirection::Column, direction, ownerWidth); + const float availableInnerWidth = calculateAvailableInnerDimension( + node, + direction, + Dimension::Width, + availableWidth - marginInline, + paddingAndBorderInline, + ownerWidth, + ownerWidth); + const float availableInnerHeight = calculateAvailableInnerDimension( + node, + direction, + Dimension::Height, + availableHeight - marginBlock, + paddingAndBorderBlock, + ownerHeight, + ownerWidth); + auto widthIsDefinite = + (widthSizingMode == SizingMode::StretchFit && + yoga::isDefined(availableWidth)); + auto heightIsDefinite = + (heightSizingMode == SizingMode::StretchFit && + yoga::isDefined(availableHeight)); + + // 11. Grid Layout Algorithm + // Step 1: Run the Grid Item Placement Algorithm to resolve the placement of + // all grid items in the grid. + auto autoPlacement = ResolvedAutoPlacement::resolveGridItemPlacements(node); + // Create the grid tracks (auto and explicit = implicit grid) + auto gridTracks = createGridTracks(node, autoPlacement); + // At this point, we have grid items final positions and implicit grid tracks + + // Step 2: Find the size of the grid container, per § 5.2 Sizing Grid + // Containers. If grid container size is not definite, we have to run the + // track sizing algorithm to find the size of the grid container. Note: During + // this phase, cyclic s in track sizes are treated as auto. + float containerInnerWidth = + widthIsDefinite ? availableInnerWidth : YGUndefined; + float containerInnerHeight = + heightIsDefinite ? availableInnerHeight : YGUndefined; + auto& rowTracks = gridTracks.rowTracks; + auto& columnTracks = gridTracks.columnTracks; + auto& gridItems = autoPlacement.gridItems; + auto& baselineItemGroups = autoPlacement.baselineItemGroups; + bool needsSecondTrackSizingPass = true; + + if (!widthIsDefinite || !heightIsDefinite) { + auto trackSizing = TrackSizing( + node, + columnTracks, + rowTracks, + containerInnerWidth, + containerInnerHeight, + gridItems, + widthSizingMode, + heightSizingMode, + direction, + ownerWidth, + ownerHeight, + layoutMarkerData, + depth, + generationCount, + baselineItemGroups); + + trackSizing.runGridSizingAlgorithm(); + + bool containerSizeChanged = false; + + if (!widthIsDefinite) { + auto totalTrackWidth = trackSizing.getTotalBaseSize(Dimension::Width); + containerInnerWidth = boundAxis( + node, + FlexDirection::Row, + direction, + totalTrackWidth, + ownerWidth, + ownerWidth); + if (containerInnerWidth != totalTrackWidth) { + containerSizeChanged = true; + } + } + + if (!heightIsDefinite) { + auto totalTrackHeight = trackSizing.getTotalBaseSize(Dimension::Height); + containerInnerHeight = boundAxis( + node, + FlexDirection::Column, + direction, + totalTrackHeight, + ownerHeight, + ownerWidth); + if (containerInnerHeight != totalTrackHeight) { + containerSizeChanged = true; + } + } + + // We need to run track sizing again if: + // 1. The container size changed due to min/max bounds or + // 2. There are percentage tracks in indefinite dimensions that need + // resolution + bool hasPercentageTracksNeedingResolution = + (!widthIsDefinite && + trackSizing.hasPercentageTracks(Dimension::Width)) || + (!heightIsDefinite && + trackSizing.hasPercentageTracks(Dimension::Height)); + needsSecondTrackSizingPass = + containerSizeChanged || hasPercentageTracksNeedingResolution; + } + + node->setLayoutMeasuredDimension( + boundAxis( + node, + FlexDirection::Row, + direction, + containerInnerWidth + paddingAndBorderInline, + ownerWidth, + ownerWidth), + Dimension::Width); + + node->setLayoutMeasuredDimension( + boundAxis( + node, + FlexDirection::Column, + direction, + containerInnerHeight + paddingAndBorderBlock, + ownerHeight, + ownerWidth), + Dimension::Height); + + // If we are not performing layout, we can return early after sizing the grid + // container. + if (!performLayout) { + return; + } + + // Inititialize track sizing with the final container size + auto trackSizing = TrackSizing( + node, + columnTracks, + rowTracks, + containerInnerWidth, + containerInnerHeight, + gridItems, + widthSizingMode, + heightSizingMode, + direction, + ownerWidth, + ownerHeight, + layoutMarkerData, + depth, + generationCount, + baselineItemGroups); + + // Step 3: Given the resulting grid container size, run the Grid Sizing + // Algorithm to size the grid. Run track sizing with the new container + // dimensions Note: During this phase, s in track sizes are + // resolved against the grid container size. + + // We only need to run track sizing again if: + // 1. Both dimensions were definite or + // 2. The container size changed due to min/max constraints in Step 2, or + // 3. There are percentage tracks in indefinite dimensions that need + // resolution + if (needsSecondTrackSizingPass) { + trackSizing.runGridSizingAlgorithm(); + } + + // Step 4: Lay out the grid items into their respective containing blocks. + // Each grid area’s width and height are considered definite for this purpose. + auto gridWidth = trackSizing.getTotalBaseSize(Dimension::Width); + auto gridHeight = trackSizing.getTotalBaseSize(Dimension::Height); + + float leadingPaddingAndBorderInline = + nodeStyle.computeInlineStartPadding( + FlexDirection::Row, direction, ownerWidth) + + nodeStyle.computeInlineStartBorder(FlexDirection::Row, direction); + float leadingPaddingAndBorderBlock = + nodeStyle.computeInlineStartPadding( + FlexDirection::Column, direction, ownerWidth) + + nodeStyle.computeInlineStartBorder(FlexDirection::Column, direction); + + // Align content/Justify content + float freeSpaceInlineAxis = containerInnerWidth - gridWidth; + auto inlineDistribution = trackSizing.calculateContentDistribution( + Dimension::Width, freeSpaceInlineAxis); + float freeSpaceBlockAxis = containerInnerHeight - gridHeight; + auto blockDistribution = trackSizing.calculateContentDistribution( + Dimension::Height, freeSpaceBlockAxis); + + if (freeSpaceInlineAxis < 0.0f || freeSpaceBlockAxis < 0.0f) { + node->setLayoutHadOverflow(true); + } + + auto gridInlineStartOffset = inlineDistribution.startOffset; + auto gridBlockStartOffset = blockDistribution.startOffset; + auto finalEffectiveColumnGap = inlineDistribution.effectiveGap; + auto finalEffectiveRowGap = blockDistribution.effectiveGap; + + std::vector columnGridLineOffsets; + columnGridLineOffsets.reserve(columnTracks.size() + 1); + columnGridLineOffsets.push_back(0.0f); + for (size_t i = 0; i < columnTracks.size(); i++) { + float offset = columnGridLineOffsets[i] + columnTracks[i].baseSize; + if (i < columnTracks.size() - 1) { + offset += finalEffectiveColumnGap; + } + columnGridLineOffsets.push_back(offset); + } + + std::vector rowGridLineOffsets; + rowGridLineOffsets.reserve(rowTracks.size() + 1); + rowGridLineOffsets.push_back(0.0f); + for (size_t i = 0; i < rowTracks.size(); i++) { + float offset = rowGridLineOffsets[i] + rowTracks[i].baseSize; + if (i < rowTracks.size() - 1) { + offset += finalEffectiveRowGap; + } + rowGridLineOffsets.push_back(offset); + } + + for (auto& item : gridItems) { + // grid line offsets include the gap after each track (except the last). + // so we subtract the trailing gap for items that do not end at the last + // track. + float containingBlockWidth = columnGridLineOffsets[item.columnEnd] - + columnGridLineOffsets[item.columnStart]; + if (item.columnEnd < columnTracks.size()) { + containingBlockWidth -= finalEffectiveColumnGap; + } + float containingBlockHeight = + rowGridLineOffsets[item.rowEnd] - rowGridLineOffsets[item.rowStart]; + if (item.rowEnd < rowTracks.size()) { + containingBlockHeight -= finalEffectiveRowGap; + } + float gridItemInlineStart = columnGridLineOffsets[item.columnStart]; + float gridItemBlockStart = rowGridLineOffsets[item.rowStart]; + const auto& itemStyle = item.node->style(); + + const auto marginInlineStart = itemStyle.computeInlineStartMargin( + FlexDirection::Row, direction, containingBlockWidth); + const auto marginInlineEnd = itemStyle.computeInlineEndMargin( + FlexDirection::Row, direction, containingBlockWidth); + const auto marginBlockStart = itemStyle.computeInlineStartMargin( + FlexDirection::Column, direction, containingBlockWidth); + const auto marginBlockEnd = itemStyle.computeInlineEndMargin( + FlexDirection::Column, direction, containingBlockWidth); + + auto itemConstraints = trackSizing.calculateItemConstraints( + item, containingBlockWidth, containingBlockHeight); + + calculateLayoutInternal( + item.node, + itemConstraints.width, + itemConstraints.height, + direction, + itemConstraints.widthSizingMode, + itemConstraints.heightSizingMode, + containingBlockWidth, + containingBlockHeight, + true, + LayoutPassReason::kGridLayout, + layoutMarkerData, + depth, + generationCount); + + auto justifySelf = resolveChildJustification(node, item.node); + auto alignSelf = resolveChildAlignment(node, item.node); + + // since we know the item width and grid width, we can do the alignment + // here. alignment of grid items happen in the grid area measured dimension + // includes padding and border + float actualItemWidth = + item.node->getLayout().measuredDimension(Dimension::Width); + auto freeSpaceInlineAxisItem = containingBlockWidth - actualItemWidth - + marginInlineStart - marginInlineEnd; + float startAutoMarginOffset = 0.0f; + // https://www.w3.org/TR/css-grid-1/#auto-margins + // auto margins in either axis absorb positive free space prior to alignment + // via the box alignment properties, thereby disabling the effects of any + // self-alignment properties in that axis. + if (freeSpaceInlineAxisItem > 0.0f) { + if (itemStyle.inlineStartMarginIsAuto(FlexDirection::Row, direction) && + itemStyle.inlineEndMarginIsAuto(FlexDirection::Row, direction)) { + startAutoMarginOffset = freeSpaceInlineAxisItem / 2; + freeSpaceInlineAxisItem = 0.0f; + } else if (itemStyle.inlineStartMarginIsAuto( + FlexDirection::Row, direction)) { + startAutoMarginOffset = freeSpaceInlineAxisItem; + freeSpaceInlineAxisItem = 0.0f; + } else if (itemStyle.inlineEndMarginIsAuto( + FlexDirection::Row, direction)) { + startAutoMarginOffset = 0.0f; + freeSpaceInlineAxisItem = 0.0f; + } + } + + float justifySelfOffset = 0.0f; + if (justifySelf == Justify::End) { + justifySelfOffset = freeSpaceInlineAxisItem; + } else if (justifySelf == Justify::Center) { + justifySelfOffset = freeSpaceInlineAxisItem / 2; + } + + float finalLeft = leadingPaddingAndBorderInline + gridItemInlineStart + + marginInlineStart + startAutoMarginOffset + justifySelfOffset + + gridInlineStartOffset; + + if (direction == Direction::RTL) { + finalLeft = getPositionOfOppositeEdge( + finalLeft, FlexDirection::Row, node, item.node); + } + + // Add relative position offset for relatively positioned items. + // For RTL, the relative position is in logical coordinates so we subtract + // it from the physical left. + float relativePositionInline = item.node->relativePosition( + FlexDirection::Row, direction, containingBlockWidth); + if (direction == Direction::RTL) { + item.node->setLayoutPosition( + finalLeft - relativePositionInline, PhysicalEdge::Left); + } else { + item.node->setLayoutPosition( + finalLeft + relativePositionInline, PhysicalEdge::Left); + } + + float actualItemHeight = + item.node->getLayout().measuredDimension(Dimension::Height); + auto freeSpaceBlockAxisItem = containingBlockHeight - actualItemHeight - + marginBlockStart - marginBlockEnd; + float topAutoMarginOffset = 0.0f; + if (freeSpaceBlockAxisItem > 0.0f) { + if (itemStyle.inlineStartMarginIsAuto(FlexDirection::Column, direction) && + itemStyle.inlineEndMarginIsAuto(FlexDirection::Column, direction)) { + topAutoMarginOffset = freeSpaceBlockAxisItem / 2; + freeSpaceBlockAxisItem = 0.0f; + } else if (itemStyle.inlineStartMarginIsAuto( + FlexDirection::Column, direction)) { + topAutoMarginOffset = freeSpaceBlockAxisItem; + freeSpaceBlockAxisItem = 0.0f; + } else if (itemStyle.inlineEndMarginIsAuto( + FlexDirection::Column, direction)) { + freeSpaceBlockAxisItem = 0.0f; + } + } + + float alignSelfOffset = 0.0f; + if (alignSelf == Align::End) { + alignSelfOffset = freeSpaceBlockAxisItem; + } else if (alignSelf == Align::Center) { + alignSelfOffset = freeSpaceBlockAxisItem / 2; + } else if (alignSelf == Align::Baseline) { + alignSelfOffset = item.baselineShim; + } + + float finalTop = gridItemBlockStart + marginBlockStart + + topAutoMarginOffset + alignSelfOffset + gridBlockStartOffset + + leadingPaddingAndBorderBlock; + + // Add relative position offset for relatively positioned items + float relativePositionBlock = item.node->relativePosition( + FlexDirection::Column, direction, containingBlockHeight); + item.node->setLayoutPosition( + finalTop + relativePositionBlock, PhysicalEdge::Top); + } + + // Perform layout of absolute children + // https://www.w3.org/TR/css-grid-1/#abspos + // TODO: support grid-[row|column]-[start|end] as containing blocks + if (nodeStyle.positionType() != PositionType::Static || + node->alwaysFormsContainingBlock() || depth == 1) { + for (auto child : node->getLayoutChildren()) { + if (child->style().display() == Display::None) { + zeroOutLayoutRecursively(child); + child->setHasNewLayout(true); + child->setDirty(false); + continue; + } + + if (child->style().positionType() == PositionType::Absolute) { + child->processDimensions(); + } + } + + layoutAbsoluteDescendants( + node, + node, + widthSizingMode, + direction, + layoutMarkerData, + depth, + generationCount, + 0.0f, + 0.0f, + availableInnerWidth, + availableInnerHeight); + } +} + +GridTracks createGridTracks( + yoga::Node* node, + const ResolvedAutoPlacement& autoPlacement) { + auto gridExplicitColumns = node->style().gridTemplateColumns(); + auto gridExplicitRows = node->style().gridTemplateRows(); + + std::vector columnTracks; + std::vector rowTracks; + columnTracks.reserve( + static_cast( + autoPlacement.maxColumnEnd - autoPlacement.minColumnStart)); + rowTracks.reserve( + static_cast(autoPlacement.maxRowEnd - autoPlacement.minRowStart)); + + // https://www.w3.org/TR/css-grid-1/#auto-tracks + auto autoRowTracks = node->style().gridAutoRows().empty() + ? GridTrackList{GridTrackSize{ + .minSizingFunction = StyleSizeLength::ofAuto(), + .maxSizingFunction = StyleSizeLength::ofAuto()}} + : node->style().gridAutoRows(); + auto autoColumnTracks = node->style().gridAutoColumns().empty() + ? GridTrackList{GridTrackSize{ + .minSizingFunction = StyleSizeLength::ofAuto(), + .maxSizingFunction = StyleSizeLength::ofAuto()}} + : node->style().gridAutoColumns(); + + // The last implicit grid track before the explicit grid receives the last + // specified size, and so on backwards. i.e. The pattern repeats backwards + auto negativeImplicitGridColumnTrackCount = -autoPlacement.minColumnStart; + auto autoColumnTracksSize = autoColumnTracks.size(); + for (auto i = 0; i < negativeImplicitGridColumnTrackCount; i++) { + auto currentColumnTrackIndex = + static_cast(negativeImplicitGridColumnTrackCount - i - 1) % + autoColumnTracksSize; + auto autoColumnTrack = + autoColumnTracks[autoColumnTracksSize - currentColumnTrackIndex - 1]; + columnTracks.push_back(autoColumnTrack); + } + + for (size_t i = 0; i < gridExplicitColumns.size(); i++) { + columnTracks.push_back(gridExplicitColumns[i]); + } + + // The first track after the last explicitly-sized track receives the first + // specified size i.e. the pattern repeats forwards + for (size_t i = 0; i < static_cast(autoPlacement.maxColumnEnd) - + gridExplicitColumns.size(); + i++) { + auto autoColumnTrack = autoColumnTracks[i % autoColumnTracksSize]; + columnTracks.push_back(autoColumnTrack); + } + + auto negativeImplicitGridRowTrackCount = -autoPlacement.minRowStart; + auto autoRowTracksSize = autoRowTracks.size(); + for (auto i = 0; i < negativeImplicitGridRowTrackCount; i++) { + auto currentRowTrackIndex = + static_cast(negativeImplicitGridRowTrackCount - i - 1) % + autoRowTracksSize; + auto autoRowTrack = + autoRowTracks[autoRowTracksSize - currentRowTrackIndex - 1]; + rowTracks.push_back(autoRowTrack); + } + for (const auto& explicitRow : gridExplicitRows) { + rowTracks.push_back(explicitRow); + } + for (size_t i = 0; i < + static_cast(autoPlacement.maxRowEnd) - gridExplicitRows.size(); + i++) { + auto autoRowTrack = autoRowTracks[i % autoRowTracksSize]; + rowTracks.push_back(autoRowTrack); + } + + return {std::move(columnTracks), std::move(rowTracks)}; +} + +} // namespace facebook::yoga diff --git a/yoga/algorithm/grid/GridLayout.h b/yoga/algorithm/grid/GridLayout.h new file mode 100644 index 0000000000..f6699c1366 --- /dev/null +++ b/yoga/algorithm/grid/GridLayout.h @@ -0,0 +1,42 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace facebook::yoga { + +void calculateGridLayoutInternal( + yoga::Node* node, + float availableWidth, + float availableHeight, + Direction ownerDirection, + SizingMode widthSizingMode, + SizingMode heightSizingMode, + float ownerWidth, + float ownerHeight, + bool performLayout, + LayoutPassReason reason, + LayoutData& layoutMarkerData, + uint32_t depth, + uint32_t generationCount); + +struct GridTracks { + std::vector columnTracks; + std::vector rowTracks; +}; +// Creates implicit grid tracks based on the auto placement result +GridTracks createGridTracks( + yoga::Node* node, + const ResolvedAutoPlacement& autoPlacement); + +} // namespace facebook::yoga diff --git a/yoga/algorithm/grid/TrackSizing.h b/yoga/algorithm/grid/TrackSizing.h new file mode 100644 index 0000000000..77802b2d9c --- /dev/null +++ b/yoga/algorithm/grid/TrackSizing.h @@ -0,0 +1,2052 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace facebook::yoga { + +struct TrackSizing { + enum class AffectedSize { BaseSize, GrowthLimit }; + + struct ContentDistribution { + float startOffset = 0.0f; + float betweenTracksOffset = 0.0f; + float effectiveGap = 0.0f; + }; + + struct ItemConstraint { + float width; + float height; + SizingMode widthSizingMode; + SizingMode heightSizingMode; + float containingBlockWidth; + float containingBlockHeight; + }; + + using CrossDimensionEstimator = std::function; + + struct ItemSizeContribution { + const GridItem* item; + std::vector affectedTracks; + float sizeContribution; + + ItemSizeContribution( + const GridItem* item, + const std::vector& affectedTracks, + float sizeContribution) + : item(item), + affectedTracks(affectedTracks), + sizeContribution(sizeContribution) {} + }; + + Node* node; + std::vector& + columnTracks; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) + std::vector& + rowTracks; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) + float containerInnerWidth; + float containerInnerHeight; + std::vector& + gridItems; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) + SizingMode widthSizingMode; + SizingMode heightSizingMode; + Direction direction; + float ownerWidth; + float ownerHeight; + LayoutData& + layoutMarkerData; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) + uint32_t depth; + uint32_t generationCount; + CrossDimensionEstimator crossDimensionEstimator; + + // below flags are used for optimization purposes + bool hasPercentageColumnTracks = false; + bool hasPercentageRowTracks = false; + bool hasOnlyFixedTracks = false; + bool hasIntrinsicTracks = false; + bool hasFlexibleTracks = false; + + // Pre-computed baseline sharing groups + BaselineItemGroups& + baselineItemGroups; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members) + + TrackSizing( + yoga::Node* node, + std::vector& columnTracks, + std::vector& rowTracks, + float containerInnerWidth, + float containerInnerHeight, + std::vector& gridItems, + SizingMode widthSizingMode, + SizingMode heightSizingMode, + Direction direction, + float ownerWidth, + float ownerHeight, + LayoutData& layoutMarkerData, + uint32_t depth, + uint32_t generationCount, + BaselineItemGroups& baselineItemGroups) + : node(node), + columnTracks(columnTracks), + rowTracks(rowTracks), + containerInnerWidth(containerInnerWidth), + containerInnerHeight(containerInnerHeight), + gridItems(gridItems), + widthSizingMode(widthSizingMode), + heightSizingMode(heightSizingMode), + direction(direction), + ownerWidth(ownerWidth), + ownerHeight(ownerHeight), + layoutMarkerData(layoutMarkerData), + depth(depth), + generationCount(generationCount), + baselineItemGroups(baselineItemGroups) {} + + // 11.1. Grid Sizing Algorithm + // https://www.w3.org/TR/css-grid-1/#algo-grid-sizing + void runGridSizingAlgorithm() { + computeItemTrackCrossingFlags(); + + // 1. First, the track sizing algorithm is used to resolve the sizes of the + // grid columns. + auto rowHeightFromFixedTracks = makeRowHeightEstimatorUsingFixedTracks( + calculateEffectiveRowGapForEstimation()); + runTrackSizing(Dimension::Width, rowHeightFromFixedTracks); + + // 2. Next, the track sizing algorithm resolves the sizes of the grid rows. + auto columnWidthFromBaseSizes = makeCrossDimensionEstimatorUsingBaseSize( + Dimension::Width, calculateEffectiveGapFromBaseSizes(Dimension::Width)); + runTrackSizing(Dimension::Height, columnWidthFromBaseSizes); + + // 3. Then, if the min-content contribution of any grid item has changed + // Only intrinsic tracks can affect the cross track size in above steps, so + // this step is only needed if there are intrinsic tracks + if (hasIntrinsicTracks) { + auto rowHeightFromBaseSizes = makeCrossDimensionEstimatorUsingBaseSize( + Dimension::Height, + calculateEffectiveGapFromBaseSizes(Dimension::Height)); + if (contributionsChanged( + Dimension::Width, + rowHeightFromFixedTracks, + rowHeightFromBaseSizes)) { + runTrackSizing(Dimension::Width, rowHeightFromBaseSizes); + // 4. Next, if the min-content contribution of any grid item has changed + auto newColumnWidthFromBaseSizes = + makeCrossDimensionEstimatorUsingBaseSize( + Dimension::Width, + calculateEffectiveGapFromBaseSizes(Dimension::Width)); + if (contributionsChanged( + Dimension::Height, + columnWidthFromBaseSizes, + newColumnWidthFromBaseSizes)) { + runTrackSizing(Dimension::Height, newColumnWidthFromBaseSizes); + } + } + } + } + + // 11.3. Track Sizing Algorithm + // https://www.w3.org/TR/css-grid-1/#algo-track-sizing + void runTrackSizing( + Dimension dimension, + CrossDimensionEstimator estimator = nullptr) { + // Store the estimator for use in calculateItemConstraints + crossDimensionEstimator = estimator; + + // Step 1: Initialize Track Sizes + initializeTrackSizes(dimension); + // Step 2: Resolve Intrinsic Track Sizes + resolveIntrinsicTrackSizes(dimension); + // Step 3: Maximize Track Sizes + maximizeTrackSizes(dimension); + // Step 4: Expand Flexible Tracks + expandFlexibleTracks(dimension); + // Step 5: Stretch Auto Tracks + stretchAutoTracks(dimension); + } + + // 11.4 Initialize Track Sizes + // https://www.w3.org/TR/css-grid-1/#algo-init + // Also sets some flags (hasPercentageTracks, hasOnlyFixedTracks) for + // optimization purposes + void initializeTrackSizes(Dimension dimension) { + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + bool& hasPercentageTracks = dimension == Dimension::Width + ? hasPercentageColumnTracks + : hasPercentageRowTracks; + hasOnlyFixedTracks = true; + hasIntrinsicTracks = false; + hasFlexibleTracks = false; + + for (size_t i = 0; i < tracks.size(); i++) { + auto& track = tracks[i]; + + // detect percentage tracks for optimization purposes + if (isPercentageSizingFunction(track.minSizingFunction) || + isPercentageSizingFunction(track.maxSizingFunction)) { + hasPercentageTracks = true; + } + + if (isFixedSizingFunction(track.minSizingFunction, containerSize)) { + auto resolved = track.minSizingFunction.resolve(containerSize); + track.baseSize = resolved.unwrap(); + } else if (isIntrinsicSizingFunction( + track.minSizingFunction, containerSize)) { + track.baseSize = 0; + hasOnlyFixedTracks = false; + hasIntrinsicTracks = true; + } else { + // THIS SHOULD NEVER HAPPEN + track.baseSize = 0; + } + + if (isFixedSizingFunction(track.maxSizingFunction, containerSize)) { + auto resolved = track.maxSizingFunction.resolve(containerSize); + track.growthLimit = resolved.unwrap(); + } else if (isIntrinsicSizingFunction( + track.maxSizingFunction, containerSize)) { + track.growthLimit = INFINITY; + hasOnlyFixedTracks = false; + hasIntrinsicTracks = true; + } else if (isFlexibleSizingFunction(track.maxSizingFunction)) { + track.growthLimit = INFINITY; + hasOnlyFixedTracks = false; + hasFlexibleTracks = true; + } else { + // THIS SHOULD NEVER HAPPEN + track.growthLimit = INFINITY; + } + + // In all cases, if the growth limit is less than the base size, increase + // the growth limit to match the base size. + if (track.growthLimit < track.baseSize) { + track.growthLimit = track.baseSize; + } + + // minmax(20px, 40px) type of tracks are not fixed tracks + if (track.baseSize < track.growthLimit) { + hasOnlyFixedTracks = false; + } + } + } + + // 11.5 Resolve Intrinsic Track Sizes + // https://www.w3.org/TR/css-grid-1/#algo-content + void resolveIntrinsicTrackSizes(Dimension dimension) { + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + + // Step 1: Shim baseline-aligned items (only for height dimension i.e. + // align-items/align-self) + if (dimension == Dimension::Height) { + shimBaselineAlignedItems(); + } + + // Fast path - if tracks are fixed-sized, skip below steps + if (hasOnlyFixedTracks) { + return; + } + + // Step 2. and Step 3 Increase sizes to accommodate spanning items + accomodateSpanningItemsCrossingContentSizedTracks(dimension); + // Step 4. Increase sizes to accommodate spanning items crossing flexible + // tracks + accomodateSpanningItemsCrossingFlexibleTracks(dimension); + // Step 5. If any track still has an infinite growth limit (because, for + // example, it had no items placed in it or it is a flexible track), set its + // growth limit to its base size. + for (auto& track : tracks) { + if (track.growthLimit == INFINITY) { + track.growthLimit = track.baseSize; + } + } + } + + // https://www.w3.org/TR/css-grid-1/#algo-baseline-shims + void shimBaselineAlignedItems() { + for (const auto& [rowIndex, items] : baselineItemGroups) { + float maxBaselineWithMargin = 0.0f; + std::vector> itemBaselines; + itemBaselines.reserve(items.size()); + + for (auto* itemPtr : items) { + const auto& item = *itemPtr; + + if (itemSizeDependsOnIntrinsicTracks(item)) { + continue; + } + + float containingBlockWidth = crossDimensionEstimator + ? crossDimensionEstimator(item) + : YGUndefined; + float containingBlockHeight = YGUndefined; + + auto itemConstraints = calculateItemConstraints( + item, containingBlockWidth, containingBlockHeight); + + calculateLayoutInternal( + item.node, + itemConstraints.width, + itemConstraints.height, + node->getLayout().direction(), + SizingMode::MaxContent, + itemConstraints.heightSizingMode, + itemConstraints.containingBlockWidth, + itemConstraints.containingBlockHeight, + true, + LayoutPassReason::kGridLayout, + layoutMarkerData, + depth + 1, + generationCount); + + const float baseline = calculateBaseline(item.node); + const float marginTop = item.node->style().computeInlineStartMargin( + FlexDirection::Column, + direction, + itemConstraints.containingBlockWidth); + const float baselineWithMargin = baseline + marginTop; + + itemBaselines.emplace_back(itemPtr, baselineWithMargin); + maxBaselineWithMargin = + std::max(maxBaselineWithMargin, baselineWithMargin); + } + + for (auto& [itemPtr, baselineWithMargin] : itemBaselines) { + itemPtr->baselineShim = maxBaselineWithMargin - baselineWithMargin; + } + } + } + + // https://www.w3.org/TR/css-grid-1/#algo-single-span-items + // https://www.w3.org/TR/css-grid-1/#algo-spanning-items + void accomodateSpanningItemsCrossingContentSizedTracks(Dimension dimension) { + if (!hasIntrinsicTracks) { + return; + } + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + auto sizingMode = + dimension == Dimension::Width ? widthSizingMode : heightSizingMode; + + auto startIndexKey = dimension == Dimension::Width ? &GridItem::columnStart + : &GridItem::rowStart; + auto endIndexKey = dimension == Dimension::Width ? &GridItem::columnEnd + : &GridItem::rowEnd; + + // 2. Size tracks to fit non-spanning items (span = 1 items) + // https://www.w3.org/TR/css-grid-1/#algo-single-span-items + std::vector spanningItemIndices; + spanningItemIndices.reserve(gridItems.size()); + for (size_t index = 0; index < gridItems.size(); index++) { + const auto& item = gridItems[index]; + if (item.crossesFlexibleTrack(dimension)) { + continue; + } + auto startIndex = item.*startIndexKey; + auto endIndex = item.*endIndexKey; + size_t span = endIndex - startIndex; + if (span == 1) { + auto& track = tracks[startIndex]; + auto itemConstraints = calculateItemConstraints(item, dimension); + // For auto minimums: + if (isAutoSizingFunction(track.minSizingFunction, containerSize)) { + float contribution = sizingMode == SizingMode::MaxContent + ? limitedMinContentContribution(item, dimension, itemConstraints) + : minimumContribution(item, dimension, itemConstraints); + track.baseSize = std::max(track.baseSize, contribution); + } + + // For max-content maximums: + if (isAutoSizingFunction(track.maxSizingFunction, containerSize)) { + float contribution = + maxContentContribution(item, dimension, itemConstraints); + if (track.growthLimit == INFINITY) { + track.growthLimit = contribution; + } else { + track.growthLimit = std::max(track.growthLimit, contribution); + } + } + // In all cases, if a track's growth limit is now less than its base + // size, increase the growth limit to match the base size. + if (track.growthLimit < track.baseSize) { + track.growthLimit = track.baseSize; + } + } else { + spanningItemIndices.push_back(index); + } + } + + // 3. Increase sizes to accommodate spanning items crossing content-sized + // tracks: https://www.w3.org/TR/css-grid-1/#algo-spanning-items + if (spanningItemIndices.empty()) { + return; + } + + std::sort( + spanningItemIndices.begin(), + spanningItemIndices.end(), + [&](size_t i, size_t j) { + const auto& a = gridItems[i]; + const auto& b = gridItems[j]; + return (a.*endIndexKey - a.*startIndexKey) < + (b.*endIndexKey - b.*startIndexKey); + }); + + size_t previousSpan = 1; + std::vector itemsForIntrinsicMin; + std::vector itemsForIntrinsicMax; + std::vector itemsForMaxContentMax; + + auto distributeSpaceToTracksForItemsWithTheSameSpan = [&]() { + // Step 1: For intrinsic minimums + if (!itemsForIntrinsicMin.empty()) { + distributeExtraSpaceAcrossSpannedTracks( + dimension, itemsForIntrinsicMin, AffectedSize::BaseSize); + itemsForIntrinsicMin.clear(); + } + + // Step 2 and Step 3 are skipped since we're not supporting min-content + // and max-content yet + + // Step 4: If at this point any track's growth limit is now less than its + // base size, increase its growth limit to match its base size + for (auto& track : tracks) { + if (track.growthLimit < track.baseSize) { + track.growthLimit = track.baseSize; + } + + // https://www.w3.org/TR/css-grid-1/#infinitely-growable + // reset infinitely growable flag for each track + // This flag gets set in Step 5 and used in Step 6, so we need to reset + // it before running Step 5. + track.infinitelyGrowable = false; + } + + // Step 5: For intrinsic maximums + if (!itemsForIntrinsicMax.empty()) { + distributeExtraSpaceAcrossSpannedTracks( + dimension, itemsForIntrinsicMax, AffectedSize::GrowthLimit); + itemsForIntrinsicMax.clear(); + } + + // Step 6: For max-content maximums + if (!itemsForMaxContentMax.empty()) { + distributeExtraSpaceAcrossSpannedTracks( + dimension, itemsForMaxContentMax, AffectedSize::GrowthLimit); + itemsForMaxContentMax.clear(); + } + }; + + for (auto& index : spanningItemIndices) { + const auto& item = gridItems[index]; + + if (item.crossesFlexibleTrack(dimension)) { + continue; + } + + auto startIndex = item.*startIndexKey; + auto endIndex = item.*endIndexKey; + size_t span = endIndex - startIndex; + + if (span > previousSpan) { + distributeSpaceToTracksForItemsWithTheSameSpan(); + previousSpan = span; + } + + std::vector intrinsicMinimumSizingFunctionTracks; + std::vector intrinsicMaximumSizingFunctionTracks; + std::vector maxContentMaximumSizingFunctionTracks; + + for (size_t i = startIndex; i < endIndex; i++) { + if (isIntrinsicSizingFunction( + tracks[i].minSizingFunction, containerSize)) { + intrinsicMinimumSizingFunctionTracks.push_back(&tracks[i]); + } + + if (isIntrinsicSizingFunction( + tracks[i].maxSizingFunction, containerSize)) { + intrinsicMaximumSizingFunctionTracks.push_back(&tracks[i]); + } + + // auto as max sizing function is treated as max-content sizing function + if (isAutoSizingFunction(tracks[i].maxSizingFunction, containerSize)) { + maxContentMaximumSizingFunctionTracks.push_back(&tracks[i]); + } + } + + auto itemConstraints = calculateItemConstraints(item, dimension); + if (!intrinsicMinimumSizingFunctionTracks.empty()) { + auto minContribution = sizingMode == SizingMode::MaxContent + ? limitedMinContentContribution(item, dimension, itemConstraints) + : minimumContribution(item, dimension, itemConstraints); + itemsForIntrinsicMin.emplace_back( + &item, + std::move(intrinsicMinimumSizingFunctionTracks), + minContribution); + } + + if (!intrinsicMaximumSizingFunctionTracks.empty()) { + auto minContentContrib = + minContentContribution(item, dimension, itemConstraints); + itemsForIntrinsicMax.emplace_back( + &item, + std::move(intrinsicMaximumSizingFunctionTracks), + minContentContrib); + } + + if (!maxContentMaximumSizingFunctionTracks.empty()) { + auto maxContentContrib = + maxContentContribution(item, dimension, itemConstraints); + itemsForMaxContentMax.emplace_back( + &item, + std::move(maxContentMaximumSizingFunctionTracks), + maxContentContrib); + } + } + + // Process last span + distributeSpaceToTracksForItemsWithTheSameSpan(); + }; + + // https://www.w3.org/TR/css-grid-1/#algo-spanning-flex-items + void accomodateSpanningItemsCrossingFlexibleTracks(Dimension dimension) { + if (!hasFlexibleTracks) { + return; + } + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + auto sizingMode = + dimension == Dimension::Width ? widthSizingMode : heightSizingMode; + auto startIndexkey = dimension == Dimension::Width ? &GridItem::columnStart + : &GridItem::rowStart; + auto endIndexKey = dimension == Dimension::Width ? &GridItem::columnEnd + : &GridItem::rowEnd; + + std::vector itemsSpanningFlexible; + + for (const auto& item : gridItems) { + if (!item.crossesFlexibleTrack(dimension)) { + continue; + } + + auto start = item.*startIndexkey; + auto end = item.*endIndexKey; + std::vector flexibleTracks; + + for (size_t i = start; i < end && i < tracks.size(); i++) { + auto& track = tracks[i]; + if (isFlexibleSizingFunction(track.maxSizingFunction)) { + flexibleTracks.push_back(&track); + } + } + + if (!flexibleTracks.empty()) { + auto itemConstraints = calculateItemConstraints(item, dimension); + auto minContribution = sizingMode == SizingMode::MaxContent + ? limitedMinContentContribution(item, dimension, itemConstraints) + : minimumContribution(item, dimension, itemConstraints); + + itemsSpanningFlexible.emplace_back( + &item, std::move(flexibleTracks), minContribution); + } + } + + if (!itemsSpanningFlexible.empty()) { + distributeSpaceToFlexibleTracksForItems(dimension, itemsSpanningFlexible); + } + }; + + // https://www.w3.org/TR/css-grid-1/#extra-space + void distributeExtraSpaceAcrossSpannedTracks( + Dimension dimension, + std::vector& gridItemSizeContributions, + AffectedSize affectedSizeType) { + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + auto startIndexKey = dimension == Dimension::Width ? &GridItem::columnStart + : &GridItem::rowStart; + auto endIndexKey = dimension == Dimension::Width ? &GridItem::columnEnd + : &GridItem::rowEnd; + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + auto gap = node->style().computeGapForDimension(dimension, containerSize); + std::unordered_map plannedIncrease; + plannedIncrease.reserve(gridItemSizeContributions.size()); + + // 1. Maintain separately for each affected track a planned increase, + // initially set to 0. (This prevents the size increases from becoming + // order-dependent.) + for (const auto& itemSizeContribution : gridItemSizeContributions) { + for (auto& track : itemSizeContribution.affectedTracks) { + plannedIncrease[track] = 0.0f; + } + } + + // 2. For each accommodated item, considering only tracks the item spans: + for (const auto& itemSizeContribution : gridItemSizeContributions) { + std::unordered_map itemIncurredIncrease; + itemIncurredIncrease.reserve(itemSizeContribution.affectedTracks.size()); + for (auto& track : itemSizeContribution.affectedTracks) { + itemIncurredIncrease[track] = 0.0f; + } + + // 2.1 Find the space to distribute + auto start = itemSizeContribution.item->*startIndexKey; + auto end = itemSizeContribution.item->*endIndexKey; + float totalSpannedTracksSize = 0.0f; + for (size_t i = start; i < end && i < tracks.size(); i++) { + auto& track = tracks[i]; + if (affectedSizeType == AffectedSize::BaseSize) { + totalSpannedTracksSize += track.baseSize; + } else { + // For infinite growth limits, substitute the track's base size + totalSpannedTracksSize += track.growthLimit == INFINITY + ? track.baseSize + : track.growthLimit; + } + if (i < end - 1) { + // gaps are treated as tracks of fixed size. Item can span over gaps. + totalSpannedTracksSize += gap; + } + } + + float spaceToDistribute = std::max( + 0.0f, itemSizeContribution.sizeContribution - totalSpannedTracksSize); + std::unordered_set frozenTracks; + frozenTracks.reserve(itemSizeContribution.affectedTracks.size()); + + // 2.2. Distribute space up to limits + while (frozenTracks.size() < itemSizeContribution.affectedTracks.size() && + spaceToDistribute > 0.0f && + !yoga::inexactEquals(spaceToDistribute, 0.0f)) { + auto unfrozenTrackCount = + itemSizeContribution.affectedTracks.size() - frozenTracks.size(); + auto distributionPerTrack = + spaceToDistribute / static_cast(unfrozenTrackCount); + + for (auto& track : itemSizeContribution.affectedTracks) { + if (frozenTracks.contains(track)) { + continue; + } + + float limit; + float affectedSize; + + if (affectedSizeType == AffectedSize::BaseSize) { + affectedSize = track->baseSize; + limit = track->growthLimit; + } else { + affectedSize = track->growthLimit; + limit = INFINITY; + if (track->growthLimit != INFINITY && !track->infinitelyGrowable) { + limit = track->growthLimit; + } + + // If the affected size was a growth limit and the track is not + // marked infinitely growable, then each item-incurred increase will + // be zero. + if (!track->infinitelyGrowable) { + frozenTracks.insert(track); + continue; + } + } + + if (affectedSize + distributionPerTrack + + itemIncurredIncrease[track] > + limit) { + frozenTracks.insert(track); + auto increase = limit - affectedSize - itemIncurredIncrease[track]; + itemIncurredIncrease[track] += increase; + spaceToDistribute -= increase; + } else { + itemIncurredIncrease[track] += distributionPerTrack; + spaceToDistribute -= distributionPerTrack; + } + } + } + + // 2.3. Distribute space to non-affected tracks: + // Currently, browsers do not implement this step. + // https://github.com/w3c/csswg-drafts/issues/3648 + + // 2.4. Distribute space beyond limits + if (spaceToDistribute > 0.0f && + !yoga::inexactEquals(spaceToDistribute, 0.0f)) { + std::vector tracksToGrowBeyondLimits; + for (auto& track : itemSizeContribution.affectedTracks) { + if (isIntrinsicSizingFunction( + track->maxSizingFunction, containerSize)) { + tracksToGrowBeyondLimits.push_back(track); + } + } + + // if there are no such tracks, then all affected tracks. + if (affectedSizeType == AffectedSize::BaseSize && + tracksToGrowBeyondLimits.empty()) { + tracksToGrowBeyondLimits = itemSizeContribution.affectedTracks; + } + + while (spaceToDistribute > 0.0f && + !yoga::inexactEquals(spaceToDistribute, 0.0f) && + !tracksToGrowBeyondLimits.empty()) { + auto unfrozenTrackCount = tracksToGrowBeyondLimits.size(); + auto distributionPerTrack = + spaceToDistribute / static_cast(unfrozenTrackCount); + for (auto& track : tracksToGrowBeyondLimits) { + itemIncurredIncrease[track] += distributionPerTrack; + spaceToDistribute -= distributionPerTrack; + } + } + } + + // 2.5. For each affected track, if the track's item-incurred increase is + // larger than the track's planned increase set the track's planned + // increase to that value. + for (auto& track : itemSizeContribution.affectedTracks) { + if (itemIncurredIncrease[track] > plannedIncrease[track]) { + plannedIncrease[track] = itemIncurredIncrease[track]; + } + } + } + + // 3. Update the tracks affected sizes + for (const auto& [track, increase] : plannedIncrease) { + if (affectedSizeType == AffectedSize::BaseSize) { + track->baseSize += increase; + } else { + if (track->growthLimit == INFINITY) { + track->growthLimit = track->baseSize + increase; + track->infinitelyGrowable = true; + } else { + track->growthLimit += increase; + } + } + } + } + + // https://www.w3.org/TR/css-grid-1/#extra-space + // Similar to distribute extra space for content sized tracks, but distributes + // space considering flex factors. + void distributeSpaceToFlexibleTracksForItems( + Dimension dimension, + const std::vector& gridItemSizeContributions) { + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + auto gap = node->style().computeGapForDimension(dimension, containerSize); + auto startIndexKey = dimension == Dimension::Width ? &GridItem::columnStart + : &GridItem::rowStart; + auto endIndexKey = dimension == Dimension::Width ? &GridItem::columnEnd + : &GridItem::rowEnd; + + // Step 1: Maintain planned increase for each affected track + std::unordered_map plannedIncrease; + for (const auto& itemSizeContribution : gridItemSizeContributions) { + for (auto& track : itemSizeContribution.affectedTracks) { + plannedIncrease[track] = 0.0f; + } + } + + // Step 2: For each item + for (const auto& itemSizeContribution : gridItemSizeContributions) { + std::unordered_map itemIncurredIncrease; + for (auto& track : itemSizeContribution.affectedTracks) { + itemIncurredIncrease[track] = 0.0f; + } + + // 2.1 Find space to distribute + auto start = itemSizeContribution.item->*startIndexKey; + auto end = itemSizeContribution.item->*endIndexKey; + float totalSpannedTracksSize = 0.0f; + for (size_t i = start; i < end && i < tracks.size(); i++) { + totalSpannedTracksSize += tracks[i].baseSize; + if (i < end - 1) { + // gaps are treated as tracks of fixed size. Item can span over gaps. + totalSpannedTracksSize += gap; + } + } + + float spaceToDistribute = std::max( + 0.0f, itemSizeContribution.sizeContribution - totalSpannedTracksSize); + + float sumOfFlexFactors = 0.0f; + for (auto& track : itemSizeContribution.affectedTracks) { + sumOfFlexFactors += track->maxSizingFunction.value().unwrap(); + } + + if (sumOfFlexFactors > 0.0f) { + // Distribute space by flex ratios (normalized) + for (auto& track : itemSizeContribution.affectedTracks) { + auto flexFactor = track->maxSizingFunction.value().unwrap(); + auto increase = spaceToDistribute * flexFactor / sumOfFlexFactors; + itemIncurredIncrease[track] += increase; + } + } else { + // All flex factors are zero, distribute equally + auto equalShare = spaceToDistribute / + static_cast(itemSizeContribution.affectedTracks.size()); + for (auto& track : itemSizeContribution.affectedTracks) { + itemIncurredIncrease[track] += equalShare; + } + } + + for (auto& track : itemSizeContribution.affectedTracks) { + if (itemIncurredIncrease[track] > plannedIncrease[track]) { + plannedIncrease[track] = itemIncurredIncrease[track]; + } + } + } + + // Step 3: Update the tracks' affected sizes by adding in the planned + // increase + for (const auto& [track, increase] : plannedIncrease) { + track->baseSize += increase; + } + }; + + // 11.6. Maximize Tracks + // https://www.w3.org/TR/css-grid-1/#algo-grow-tracks + void maximizeTrackSizes(Dimension dimension) { + // Fast path - if tracks are fixed-sized, skip below steps + if (hasOnlyFixedTracks) { + return; + } + + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + + // Save original base sizes before maximization + std::vector originalBaseSizes; + originalBaseSizes.reserve(tracks.size()); + for (auto& track : tracks) { + originalBaseSizes.push_back(track.baseSize); + } + + // First attempt with the original container inner size + distributeFreeSpaceToTracks(dimension, containerSize); + + // Check if this would cause the grid to be larger than the grid container's + // inner size as limited by its max-width/height + auto totalGridSize = getTotalBaseSize(dimension); + + // Get the max constraint for this dimension + const float paddingAndBorder = dimension == Dimension::Width + ? paddingAndBorderForAxis( + node, FlexDirection::Row, direction, ownerWidth) + : paddingAndBorderForAxis( + node, FlexDirection::Column, direction, ownerWidth); + + auto maxContainerBorderBoxSize = node->style().resolvedMaxDimension( + direction, + dimension, + dimension == Dimension::Width ? ownerWidth : ownerHeight, + ownerWidth); + + auto maxContainerInnerSize = maxContainerBorderBoxSize.isDefined() + ? maxContainerBorderBoxSize.unwrap() - paddingAndBorder + : YGUndefined; + + if (yoga::isDefined(maxContainerInnerSize)) { + if (totalGridSize > maxContainerInnerSize) { + // Redo this step, treating the available grid space as equal to the + // grid container's inner size when it's sized to its max-width/height + // Reset base sizes to their values before this maximize step + for (size_t i = 0; i < tracks.size(); i++) { + tracks[i].baseSize = originalBaseSizes[i]; + } + + distributeFreeSpaceToTracks(dimension, maxContainerInnerSize); + } + } + } + + // Distribute space in maximizeTrackSizes step + // https://www.w3.org/TR/css-grid-1/#algo-grow-tracks + void distributeFreeSpaceToTracks( + Dimension dimension, + float targetAvailableSize) { + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + auto sizingMode = + dimension == Dimension::Width ? widthSizingMode : heightSizingMode; + float freeSpace = 0.0f; + if (yoga::isDefined(targetAvailableSize)) { + auto totalBaseSize = getTotalBaseSize(dimension); + freeSpace = std::max(0.0f, targetAvailableSize - totalBaseSize); + } + + // For the purpose of this step: if sizing the grid container under a + // max-content constraint, the free space is infinite; if sizing under a + // min-content constraint, the free space is zero. + if (sizingMode == SizingMode::MaxContent) { + freeSpace = INFINITY; + } + + // If the free space is positive, distribute it equally to the base sizes of + // all tracks, freezing tracks as they reach their growth limits (and + // continuing to grow the unfrozen tracks as needed). + if (freeSpace > 0.0f && !yoga::inexactEquals(freeSpace, 0.0f)) { + // growth limit will not be Infinite in maximizeTrackSizes step since we + // had set Infinite growth limit to base size in + // resolveIntrinsicTrackSizes's last step - + // https://www.w3.org/TR/css-grid-1/#algo-finite-growth + if (freeSpace == INFINITY) { + for (auto& track : tracks) { + track.baseSize = track.growthLimit; + } + } else { + std::unordered_set frozenTracks; + frozenTracks.reserve(tracks.size()); + auto extraSpace = freeSpace; + + while (frozenTracks.size() < tracks.size() && extraSpace > 0.0f && + !yoga::inexactEquals(extraSpace, 0.0f)) { + auto unfrozenTrackCount = tracks.size() - frozenTracks.size(); + auto distributionPerTrack = + extraSpace / static_cast(unfrozenTrackCount); + + for (auto& track : tracks) { + GridTrackSize* trackPtr = &track; + if (frozenTracks.contains(trackPtr)) { + continue; + } + + // Check if adding this distribution would exceed the growth limit + if (track.baseSize + distributionPerTrack > track.growthLimit) { + auto increase = + std::max(0.0f, track.growthLimit - track.baseSize); + track.baseSize += increase; + extraSpace -= increase; + frozenTracks.insert(trackPtr); + } else { + track.baseSize += distributionPerTrack; + extraSpace -= distributionPerTrack; + } + } + } + } + } + } + + // 11.7. Expand Flexible Tracks + // https://www.w3.org/TR/css-grid-1/#algo-flex-tracks + void expandFlexibleTracks(Dimension dimension) { + if (!hasFlexibleTracks) { + return; + } + + auto& gridTracks = dimension == Dimension::Width ? columnTracks : rowTracks; + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + auto gap = node->style().computeGapForDimension(dimension, containerSize); + + float freeSpace = calculateFreeSpace(dimension); + + float flexFraction = 0.0f; + // If the free space is zero or if sizing the grid container under a + // min-content constraint: + if (yoga::inexactEquals(freeSpace, 0.0f)) { + flexFraction = 0.0f; + } + // Otherwise, if the free space is a definite length: + // The used flex fraction is the result of finding the size of an fr using + // all of the grid tracks and a space to fill of the available grid space. + else if (yoga::isDefined(freeSpace)) { + flexFraction = findFrSize( + dimension, + 0, + gridTracks.size(), + containerSize, + std::unordered_set()); + } + // Otherwise, if the free space is an indefinite length: + // The used flex fraction is the maximum of: + // For each flexible track, if the flexible track's flex factor is greater + // than one, the result of dividing the track's base size by its flex + // factor; otherwise, the track's base size. For each grid item that crosses + // a flexible track, the result of finding the size of an fr using all the + // grid tracks that the item crosses and a space to fill of the item’s + // max-content contribution. + else { + for (auto& track : gridTracks) { + if (isFlexibleSizingFunction(track.maxSizingFunction) && + track.maxSizingFunction.value().isDefined()) { + float flexFactor = track.maxSizingFunction.value().unwrap(); + if (flexFactor > 1.0f) { + flexFraction = std::max(flexFraction, track.baseSize / flexFactor); + } else { + flexFraction = std::max(flexFraction, track.baseSize); + } + } + } + + auto startIndexKey = dimension == Dimension::Width + ? &GridItem::columnStart + : &GridItem::rowStart; + auto endIndexKey = dimension == Dimension::Width ? &GridItem::columnEnd + : &GridItem::rowEnd; + + for (auto& item : gridItems) { + if (!item.crossesFlexibleTrack(dimension)) { + continue; + } + auto itemConstraints = calculateItemConstraints(item, dimension); + auto itemMaxContentContribution = + maxContentContribution(item, dimension, itemConstraints); + flexFraction = std::max( + flexFraction, + findFrSize( + dimension, + item.*startIndexKey, + item.*endIndexKey, + itemMaxContentContribution, + std::unordered_set())); + } + } + + // If using this flex fraction would cause the grid to be smaller than the + // grid container's min-width/height (or larger than the grid container's + // max-width/height), then redo this step, treating the free space as + // definite and the available grid space as equal to the grid container's + // inner size when it's sized to its min-width/height (max-width/height). + + // Calculate what the grid size would be with this flex fraction + float newTotalSize = 0.0f; + for (size_t i = 0; i < gridTracks.size(); i++) { + auto& track = gridTracks[i]; + if (isFlexibleSizingFunction(track.maxSizingFunction) && + track.maxSizingFunction.value().isDefined()) { + float flexFactor = track.maxSizingFunction.value().unwrap(); + newTotalSize += std::max(track.baseSize, flexFraction * flexFactor); + } else { + newTotalSize += track.baseSize; + } + if (i < gridTracks.size() - 1) { + newTotalSize += gap; + } + } + + // Check min constraint for this dimension + const float paddingAndBorder = dimension == Dimension::Width + ? paddingAndBorderForAxis( + node, FlexDirection::Row, direction, ownerWidth) + : paddingAndBorderForAxis( + node, FlexDirection::Column, direction, ownerWidth); + auto minContainerOuter = node->style().resolvedMinDimension( + direction, + dimension, + dimension == Dimension::Width ? ownerWidth : ownerHeight, + ownerWidth); + auto minContainerSize = minContainerOuter.isDefined() + ? minContainerOuter.unwrap() - paddingAndBorder + : YGUndefined; + + if (yoga::isDefined(minContainerSize)) { + if (newTotalSize < minContainerSize) { + // Redo with min constraint + flexFraction = findFrSize( + dimension, + 0, + gridTracks.size(), + minContainerSize, + std::unordered_set()); + } + } + + // Get the max constraint for this dimension + auto maxContainerOuter = node->style().resolvedMaxDimension( + direction, + dimension, + dimension == Dimension::Width ? ownerWidth : ownerHeight, + ownerWidth); + + auto maxContainerSize = maxContainerOuter.isDefined() + ? maxContainerOuter.unwrap() - paddingAndBorder + : YGUndefined; + + if (yoga::isDefined(maxContainerSize)) { + if (newTotalSize > maxContainerSize) { + // Redo with max constraint + flexFraction = findFrSize( + dimension, + 0, + gridTracks.size(), + maxContainerSize, + std::unordered_set()); + } + } + + // For each flexible track, if the product of the used flex fraction and the + // track's flex factor is greater than the track's base size, set its base + // size to that product. + for (auto& track : gridTracks) { + if (isFlexibleSizingFunction(track.maxSizingFunction) && + track.maxSizingFunction.value().isDefined()) { + float flexFactor = track.maxSizingFunction.value().unwrap(); + float newSize = flexFraction * flexFactor; + if (newSize > track.baseSize) { + track.baseSize = newSize; + } + } + } + }; + + // 11.7.1. Find the Size of an fr + // https://www.w3.org/TR/css-grid-1/#algo-find-fr-size + float findFrSize( + Dimension dimension, + size_t startIndex, + size_t endIndex, + float spaceToFill, + const std::unordered_set& nonFlexibleTracks) { + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + auto gap = node->style().computeGapForDimension(dimension, containerSize); + auto leftoverSpace = spaceToFill; + auto flexFactorSum = 0.0f; + std::vector flexibleTracks; + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + + for (size_t i = startIndex; i < endIndex; i++) { + auto& track = tracks[i]; + // Let leftover space be the space to fill minus the base sizes of the + // non-flexible grid tracks. + if (i < endIndex - 1) { + // gap is treated as a non-flexible track + leftoverSpace -= gap; + } + + if (!isFlexibleSizingFunction(track.maxSizingFunction) || + nonFlexibleTracks.contains(&track)) { + leftoverSpace -= track.baseSize; + } + // Let flex factor sum be the sum of the flex factors of the flexible + // tracks. + else if ( + track.maxSizingFunction.isStretch() && + track.maxSizingFunction.value().isDefined()) { + flexFactorSum += track.maxSizingFunction.value().unwrap(); + flexibleTracks.push_back(&track); + } + } + + // If this value is less than 1, set it to 1 instead. + if (flexFactorSum < 1.0f) { + flexFactorSum = 1.0f; + } + + // Let the hypothetical fr size be the leftover space divided by the flex + // factor sum. + auto hypotheticalFrSize = leftoverSpace / flexFactorSum; + // If the product of the hypothetical fr size and a flexible track's flex + // factor is less than the track's base size, restart this algorithm + // treating all such tracks as inflexible. + std::unordered_set inflexibleTracks; + for (auto& track : flexibleTracks) { + if (track->maxSizingFunction.isStretch() && + track->maxSizingFunction.value().isDefined()) { + float flexFactor = track->maxSizingFunction.value().unwrap(); + if (hypotheticalFrSize * flexFactor < track->baseSize) { + inflexibleTracks.insert(track); + } + } + } + + // restart this algorithm treating all such tracks as inflexible. + if (!inflexibleTracks.empty()) { + inflexibleTracks.insert( + nonFlexibleTracks.begin(), nonFlexibleTracks.end()); + return findFrSize( + dimension, startIndex, endIndex, spaceToFill, inflexibleTracks); + } + + return hypotheticalFrSize; + } + + // 11.8. Stretch auto Tracks + // https://www.w3.org/TR/css-grid-1/#algo-stretch + void stretchAutoTracks(Dimension dimension) { + // Fast path - if tracks are fixed-sized, skip below steps + if (hasOnlyFixedTracks) { + return; + } + + auto& gridTracks = dimension == Dimension::Width ? columnTracks : rowTracks; + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + + // When the content-distribution property of the grid container is normal or + // stretch in this axis, this step expands tracks that have an auto max + // track sizing function by dividing any remaining positive, definite free + // space equally amongst them. If the free space is indefinite, but the grid + // container has a definite min-width/height, use that size to calculate the + // free space for this step instead. + auto shouldStretch = false; + if (dimension == Dimension::Width) { + shouldStretch = node->style().justifyContent() == Justify::Stretch; + } else { + shouldStretch = node->style().alignContent() == Align::Stretch; + } + + if (shouldStretch) { + // Count only auto tracks for distribution + std::vector autoTracks; + for (auto& track : gridTracks) { + if (isAutoSizingFunction(track.maxSizingFunction, containerSize)) { + autoTracks.push_back(&track); + } + } + + if (autoTracks.empty()) { + return; + } + + float freeSpace = calculateFreeSpace(dimension); + + // If the free space is indefinite, but the grid container has a definite + // min-width/height, use that size to calculate the free space for this + // step instead. + if (!yoga::isDefined(freeSpace)) { + const float paddingAndBorder = dimension == Dimension::Width + ? paddingAndBorderForAxis( + node, FlexDirection::Row, direction, ownerWidth) + : paddingAndBorderForAxis( + node, FlexDirection::Column, direction, ownerWidth); + + auto minContainerBorderBoxSize = node->style().resolvedMinDimension( + direction, + dimension, + dimension == Dimension::Width ? ownerWidth : ownerHeight, + ownerWidth); + auto minContainerInnerSize = minContainerBorderBoxSize.isDefined() + ? minContainerBorderBoxSize.unwrap() - paddingAndBorder + : YGUndefined; + + if (yoga::isDefined(minContainerInnerSize)) { + auto totalBaseSize = getTotalBaseSize(dimension); + freeSpace = std::max(0.0f, minContainerInnerSize - totalBaseSize); + } + } + + if (yoga::isDefined(freeSpace) && freeSpace > 0.0f && + !yoga::inexactEquals(freeSpace, 0.0f)) { + // Divide free space equally among auto tracks only + auto freeSpacePerAutoTrack = + freeSpace / static_cast(autoTracks.size()); + for (auto& track : autoTracks) { + track->baseSize += freeSpacePerAutoTrack; + } + } + } + }; + + // https://www.w3.org/TR/css-grid-1/#free-space + float calculateFreeSpace(Dimension dimension) { + float freeSpace = YGUndefined; + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + if (yoga::isDefined(containerSize)) { + auto totalBaseSize = getTotalBaseSize(dimension); + freeSpace = std::max(0.0f, containerSize - totalBaseSize); + } + + return freeSpace; + } + + float measureItem( + const GridItem& item, + Dimension dimension, + const ItemConstraint& constraints) { + calculateLayoutInternal( + item.node, + constraints.width, + constraints.height, + node->getLayout().direction(), + constraints.widthSizingMode, + constraints.heightSizingMode, + constraints.containingBlockWidth, + constraints.containingBlockHeight, + false, + LayoutPassReason::kMeasureChild, + layoutMarkerData, + depth + 1, + generationCount); + + return item.node->getLayout().measuredDimension(dimension); + } + + // There are 4 size contribution types used for intrinsic track sizing + // 1. minContentContribution - item's min-content size + margins + // 2. maxContentContribution - item's max-content size + margins + // 3. minimumContribution - smallest outer size + // 4. limitedMinContentContribution - min-content clamped by fixed track + // limits + + // TODO: Yoga does not support min-content constraint yet so we use the + // max-content size contributions here + float minContentContribution( + const GridItem& item, + Dimension dimension, + const ItemConstraint& itemConstraints) { + auto marginForAxis = item.node->style().computeMarginForAxis( + dimension == Dimension::Width ? FlexDirection::Row + : FlexDirection::Column, + itemConstraints.containingBlockWidth); + + float contribution = + measureItem(item, dimension, itemConstraints) + marginForAxis; + + if (dimension == Dimension::Height) { + contribution += item.baselineShim; + } + return contribution; + } + + float maxContentContribution( + const GridItem& item, + Dimension dimension, + const ItemConstraint& itemConstraints) { + auto marginForAxis = item.node->style().computeMarginForAxis( + dimension == Dimension::Width ? FlexDirection::Row + : FlexDirection::Column, + itemConstraints.containingBlockWidth); + + float contribution = + measureItem(item, dimension, itemConstraints) + marginForAxis; + + if (dimension == Dimension::Height) { + contribution += item.baselineShim; + } + return contribution; + } + + // Minimum contribution: the smallest outer size the item can have + // https://www.w3.org/TR/css-grid-1/#minimum-contribution + float minimumContribution( + const GridItem& item, + Dimension dimension, + const ItemConstraint& itemConstraints) { + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + float containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + auto containingBlockSize = dimension == Dimension::Width + ? itemConstraints.containingBlockWidth + : itemConstraints.containingBlockHeight; + + auto marginForAxis = item.node->style().computeMarginForAxis( + dimension == Dimension::Width ? FlexDirection::Row + : FlexDirection::Column, + itemConstraints.containingBlockWidth); + + auto preferredSize = item.node->style().dimension(dimension); + auto minSize = item.node->style().minDimension(dimension); + + float contribution = 0.0f; + + // If preferred size is definite (not auto/percent), use min-content + // contribution + if (!preferredSize.isAuto() && !preferredSize.isPercent()) { + return minContentContribution(item, dimension, itemConstraints); + } + + // If explicit min-size is set, use it + if (minSize.isDefined() && !minSize.isAuto()) { + auto resolvedMinSize = minSize.resolve(containingBlockSize); + contribution = resolvedMinSize.unwrap() + marginForAxis; + } + // Otherwise compute automatic minimum size + else { + contribution = + automaticMinimumSize( + item, dimension, itemConstraints, tracks, containerSize) + + marginForAxis; + } + + if (dimension == Dimension::Height) { + contribution += item.baselineShim; + } + return contribution; + } + + // https://www.w3.org/TR/css-grid-1/#min-size-auto + float automaticMinimumSize( + const GridItem& item, + Dimension dimension, + const ItemConstraint& itemConstraints, + const std::vector& tracks, + float containerSize) { + auto overflow = item.node->style().overflow(); + size_t startIndex = + dimension == Dimension::Width ? item.columnStart : item.rowStart; + size_t endIndex = + dimension == Dimension::Width ? item.columnEnd : item.rowEnd; + + // Check its computed overflow is not a scrollable overflow value + bool isScrollContainer = + overflow == Overflow::Scroll || overflow == Overflow::Hidden; + if (isScrollContainer) { + return 0.0f; + } + + // Check if it spans at least one track in that axis whose min track sizing + // function is auto + bool spansAutoMinTrack = false; + for (size_t i = startIndex; i < endIndex; i++) { + // TODO: check if this should also consider percentage auto behaving + // tracks + if (tracks[i].minSizingFunction.isAuto()) { + spansAutoMinTrack = true; + break; + } + } + if (!spansAutoMinTrack) { + return 0.0f; + } + + // Check if it spans more than one track in that axis, none of those tracks + // are flexible + bool spansMultipleTracks = (endIndex - startIndex) > 1; + if (spansMultipleTracks && item.crossesFlexibleTrack(dimension)) { + return 0.0f; + } + + return contentBasedMinimum( + item, dimension, itemConstraints, tracks, containerSize); + } + + // https://www.w3.org/TR/css-grid-1/#content-based-minimum-size + float contentBasedMinimum( + const GridItem& item, + Dimension dimension, + const ItemConstraint& itemConstraints, + const std::vector& tracks, + float containerSize) { + float result = measureItem(item, dimension, itemConstraints); + // Clamp by fixed track limit if all spanned tracks have fixed max sizing + // function + auto fixedLimit = + computeFixedTracksLimit(item, dimension, tracks, containerSize); + if (yoga::isDefined(fixedLimit)) { + result = std::min(result, fixedLimit); + } + + // Clamp by max-size if definite + auto containingBlockSize = dimension == Dimension::Width + ? itemConstraints.containingBlockWidth + : itemConstraints.containingBlockHeight; + auto maxSize = item.node->style().maxDimension(dimension); + if (maxSize.isDefined()) { + auto resolvedMaxSize = maxSize.resolve(containingBlockSize); + if (resolvedMaxSize.isDefined()) { + result = std::min(result, resolvedMaxSize.unwrap()); + } + } + + return result; + } + + // https://www.w3.org/TR/css-grid-1/#limited-contribution + float limitedMinContentContribution( + const GridItem& item, + Dimension dimension, + const ItemConstraint& itemConstraints) { + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + float containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + + auto fixedLimit = + computeFixedTracksLimit(item, dimension, tracks, containerSize); + auto minContent = minContentContribution(item, dimension, itemConstraints); + auto minimum = minimumContribution(item, dimension, itemConstraints); + + if (yoga::isDefined(fixedLimit)) { + return std::max(std::min(minContent, fixedLimit), minimum); + } + + return std::max(minContent, minimum); + } + + float computeFixedTracksLimit( + const GridItem& item, + Dimension dimension, + const std::vector& tracks, + float containerSize) { + size_t startIndex = + dimension == Dimension::Width ? item.columnStart : item.rowStart; + size_t endIndex = + dimension == Dimension::Width ? item.columnEnd : item.rowEnd; + auto gap = node->style().computeGapForDimension(dimension, containerSize); + + float limit = 0.0f; + for (size_t i = startIndex; i < endIndex; i++) { + if (!isFixedSizingFunction(tracks[i].maxSizingFunction, containerSize)) { + return YGUndefined; + } + auto resolved = tracks[i].maxSizingFunction.resolve(containerSize); + if (resolved.isDefined()) { + limit += resolved.unwrap(); + } + if (i < endIndex - 1) { + limit += gap; + } + } + return limit; + } + + static bool isFixedSizingFunction( + const StyleSizeLength& sizingFunction, + float referenceLength) { + return sizingFunction.isDefined() && + sizingFunction.resolve(referenceLength).isDefined(); + } + + static bool isIntrinsicSizingFunction( + const StyleSizeLength& sizingFunction, + float referenceLength) { + return isAutoSizingFunction(sizingFunction, referenceLength); + } + + static bool isAutoSizingFunction( + const StyleSizeLength& sizingFunction, + float referenceLength) { + return sizingFunction.isAuto() || + (sizingFunction.isPercent() && !yoga::isDefined(referenceLength)); + } + + static bool isFlexibleSizingFunction(const StyleSizeLength& sizingFunction) { + return sizingFunction.isStretch(); + } + + static bool isPercentageSizingFunction( + const StyleSizeLength& sizingFunction) { + return sizingFunction.isPercent(); + } + + float getTotalBaseSize(Dimension dimension) { + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + const auto& tracks = + dimension == Dimension::Width ? columnTracks : rowTracks; + auto gap = node->style().computeGapForDimension(dimension, containerSize); + + float totalBaseSize = 0.0f; + for (size_t i = 0; i < tracks.size(); i++) { + totalBaseSize += tracks[i].baseSize; + if (i < tracks.size() - 1) { + totalBaseSize += gap; + } + } + return totalBaseSize; + } + + bool hasPercentageTracks(Dimension dimension) const { + return dimension == Dimension::Width ? hasPercentageColumnTracks + : hasPercentageRowTracks; + } + + ContentDistribution calculateContentDistribution( + Dimension dimension, + float freeSpace) { + auto numTracks = static_cast( + dimension == Dimension::Width ? columnTracks.size() : rowTracks.size()); + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + auto baseGap = + node->style().computeGapForDimension(dimension, containerSize); + + ContentDistribution result; + result.effectiveGap = baseGap; + + if (yoga::inexactEquals(freeSpace, 0.0f)) { + return result; + } + + if (dimension == Dimension::Width) { + const Justify justifyContent = freeSpace > 0.0f + ? node->style().justifyContent() + : fallbackAlignment(node->style().justifyContent()); + + switch (justifyContent) { + case Justify::Center: + result.startOffset = freeSpace / 2.0f; + break; + + case Justify::End: + result.startOffset = freeSpace; + break; + + case Justify::SpaceBetween: + if (numTracks > 1) { + result.betweenTracksOffset = freeSpace / (numTracks - 1); + } + break; + + case Justify::SpaceAround: + if (numTracks > 0) { + result.betweenTracksOffset = freeSpace / numTracks; + result.startOffset = result.betweenTracksOffset / 2.0f; + } + break; + + case Justify::SpaceEvenly: + result.betweenTracksOffset = freeSpace / (numTracks + 1); + result.startOffset = result.betweenTracksOffset; + break; + + case Justify::Start: + case Justify::FlexStart: + case Justify::FlexEnd: + case Justify::Stretch: + case Justify::Auto: + default: + break; + } + } else { + const auto alignContent = freeSpace > 0.0f + ? node->style().alignContent() + : fallbackAlignment(node->style().alignContent()); + switch (alignContent) { + case Align::Center: + // content center works with negative free space too + // refer grid_align_content_center_negative_space_gap fixture + result.startOffset = freeSpace / 2.0f; + break; + case Align::End: + result.startOffset = freeSpace; + break; + case Align::SpaceBetween: + if (numTracks > 1) { + // negative free space is not distributed with space between, + // checkout grid_align_content_space_between_negative_space_gap + // fixture + result.betweenTracksOffset = + std::max(0.0f, freeSpace / (numTracks - 1)); + } + break; + + case Align::SpaceAround: + if (numTracks > 0) { + result.betweenTracksOffset = freeSpace / numTracks; + result.startOffset = result.betweenTracksOffset / 2.0f; + } + break; + + case Align::SpaceEvenly: + result.betweenTracksOffset = freeSpace / (numTracks + 1); + result.startOffset = result.betweenTracksOffset; + break; + + case Align::Auto: + case Align::FlexStart: + case Align::FlexEnd: + case Align::Stretch: + case Align::Baseline: + case Align::Start: + default: + break; + } + } + + result.effectiveGap = baseGap + result.betweenTracksOffset; + return result; + } + + ItemConstraint calculateItemConstraints( + const GridItem& item, + Dimension dimension) { + float containingBlockWidth = YGUndefined; + float containingBlockHeight = YGUndefined; + if (dimension == Dimension::Width) { + containingBlockHeight = crossDimensionEstimator(item); + } else { + containingBlockWidth = crossDimensionEstimator(item); + } + + return calculateItemConstraints( + item, containingBlockWidth, containingBlockHeight); + } + + ItemConstraint calculateItemConstraints( + const GridItem& item, + float containingBlockWidth, + float containingBlockHeight) { + auto availableWidth = YGUndefined; + auto availableHeight = YGUndefined; + auto itemWidthSizingMode = SizingMode::MaxContent; + auto itemHeightSizingMode = SizingMode::MaxContent; + auto hasDefiniteWidth = + item.node->hasDefiniteLength(Dimension::Width, containingBlockWidth); + auto hasDefiniteHeight = + item.node->hasDefiniteLength(Dimension::Height, containingBlockHeight); + + if (yoga::isDefined(containingBlockWidth)) { + itemWidthSizingMode = SizingMode::FitContent; + availableWidth = containingBlockWidth; + } + + if (yoga::isDefined(containingBlockHeight)) { + itemHeightSizingMode = SizingMode::FitContent; + availableHeight = containingBlockHeight; + } + + const auto marginInline = item.node->style().computeMarginForAxis( + FlexDirection::Row, containingBlockWidth); + if (hasDefiniteWidth) { + itemWidthSizingMode = SizingMode::StretchFit; + auto resolvedWidth = item.node + ->getResolvedDimension( + direction, + Dimension::Width, + containingBlockWidth, + containingBlockWidth) + .unwrap(); + resolvedWidth = boundAxis( + item.node, + FlexDirection::Row, + direction, + resolvedWidth, + containingBlockWidth, + containingBlockWidth); + availableWidth = resolvedWidth + marginInline; + } + + const auto marginBlock = item.node->style().computeMarginForAxis( + FlexDirection::Column, containingBlockWidth); + if (hasDefiniteHeight) { + itemHeightSizingMode = SizingMode::StretchFit; + auto resolvedHeight = item.node + ->getResolvedDimension( + direction, + Dimension::Height, + containingBlockHeight, + containingBlockWidth) + .unwrap(); + resolvedHeight = boundAxis( + item.node, + FlexDirection::Column, + direction, + resolvedHeight, + containingBlockHeight, + containingBlockWidth); + availableHeight = resolvedHeight + marginBlock; + } + + auto justifySelf = resolveChildJustification(node, item.node); + auto alignSelf = resolveChildAlignment(node, item.node); + + bool hasMarginInlineAuto = item.node->style().inlineStartMarginIsAuto( + FlexDirection::Row, direction) || + item.node->style().inlineEndMarginIsAuto(FlexDirection::Row, direction); + bool hasMarginBlockAuto = item.node->style().inlineStartMarginIsAuto( + FlexDirection::Column, direction) || + item.node->style().inlineEndMarginIsAuto( + FlexDirection::Column, direction); + + // For stretch-aligned items with a definite containing block size and no + // auto margins, treat the item as having a definite size in that axis (it + // will stretch to fill). + const auto& itemStyle = item.node->style(); + + if (yoga::isDefined(containingBlockWidth) && !hasDefiniteWidth && + justifySelf == Justify::Stretch && !hasMarginInlineAuto) { + itemWidthSizingMode = SizingMode::StretchFit; + availableWidth = containingBlockWidth; + } + + if (yoga::isDefined(containingBlockHeight) && + !item.node->hasDefiniteLength( + Dimension::Height, containingBlockHeight) && + alignSelf == Align::Stretch && !hasMarginBlockAuto) { + itemHeightSizingMode = SizingMode::StretchFit; + availableHeight = containingBlockHeight; + } + + if (itemStyle.aspectRatio().isDefined() && + !yoga::inexactEquals(itemStyle.aspectRatio().unwrap(), 0.0f)) { + const float aspectRatio = itemStyle.aspectRatio().unwrap(); + if (itemWidthSizingMode == SizingMode::StretchFit && + itemHeightSizingMode == SizingMode::StretchFit) { + if (!hasDefiniteWidth && !hasDefiniteHeight) { + auto resolvedWidth = (availableHeight - marginBlock) * aspectRatio; + resolvedWidth = boundAxis( + item.node, + FlexDirection::Row, + direction, + resolvedWidth, + containingBlockWidth, + containingBlockWidth); + availableWidth = resolvedWidth + marginInline; + } + } else if ( + itemWidthSizingMode == SizingMode::StretchFit && + itemHeightSizingMode != SizingMode::StretchFit) { + auto resolvedHeight = (availableWidth - marginInline) / aspectRatio; + resolvedHeight = boundAxis( + item.node, + FlexDirection::Column, + direction, + resolvedHeight, + containingBlockHeight, + containingBlockWidth); + availableHeight = resolvedHeight + marginBlock; + itemHeightSizingMode = SizingMode::StretchFit; + } else if ( + itemHeightSizingMode == SizingMode::StretchFit && + itemWidthSizingMode != SizingMode::StretchFit) { + auto resolvedWidth = (availableHeight - marginBlock) * aspectRatio; + resolvedWidth = boundAxis( + item.node, + FlexDirection::Row, + direction, + resolvedWidth, + containingBlockWidth, + containingBlockWidth); + availableWidth = resolvedWidth + marginInline; + itemWidthSizingMode = SizingMode::StretchFit; + } + } + + constrainMaxSizeForMode( + item.node, + direction, + FlexDirection::Row, + containingBlockWidth, + containingBlockWidth, + &itemWidthSizingMode, + &availableWidth); + constrainMaxSizeForMode( + item.node, + direction, + FlexDirection::Column, + containingBlockHeight, + containingBlockWidth, + &itemHeightSizingMode, + &availableHeight); + + return ItemConstraint{ + .width = availableWidth, + .height = availableHeight, + .widthSizingMode = itemWidthSizingMode, + .heightSizingMode = itemHeightSizingMode, + .containingBlockWidth = containingBlockWidth, + .containingBlockHeight = containingBlockHeight}; + } + + float calculateEffectiveRowGapForEstimation() { + auto rowGap = node->style().computeGapForDimension( + Dimension::Height, containerInnerHeight); + + if (!yoga::isDefined(containerInnerHeight)) { + return rowGap; + } + + float totalTrackSize = 0.0f; + for (auto& track : rowTracks) { + if (isFixedSizingFunction( + track.maxSizingFunction, containerInnerHeight)) { + totalTrackSize += + track.maxSizingFunction.resolve(containerInnerHeight).unwrap(); + } else { + return rowGap; + } + } + + float totalGapSize = rowTracks.size() > 1 + ? rowGap * static_cast(rowTracks.size() - 1) + : 0.0f; + float freeSpace = containerInnerHeight - totalTrackSize - totalGapSize; + + auto distribution = + calculateContentDistribution(Dimension::Height, freeSpace); + + return distribution.effectiveGap; + } + + float calculateEffectiveGapFromBaseSizes(Dimension dimension) { + auto containerSize = dimension == Dimension::Width ? containerInnerWidth + : containerInnerHeight; + auto gap = node->style().computeGapForDimension(dimension, containerSize); + const auto& tracks = + dimension == Dimension::Width ? columnTracks : rowTracks; + + if (!yoga::isDefined(containerSize)) { + return gap; + } + + float totalTrackSize = 0.0f; + for (auto& track : tracks) { + totalTrackSize += track.baseSize; + } + + float totalGapSize = + tracks.size() > 1 ? gap * static_cast(tracks.size() - 1) : 0.0f; + float freeSpace = containerSize - totalTrackSize - totalGapSize; + + auto distribution = calculateContentDistribution(dimension, freeSpace); + + return distribution.effectiveGap; + } + + bool contributionsChanged( + Dimension dimension, + CrossDimensionEstimator estimatorBefore, + CrossDimensionEstimator estimatorAfter) { + for (const auto& item : gridItems) { + if (!item.crossesIntrinsicTrack(dimension)) { + continue; + } + + float crossDimBefore = + estimatorBefore ? estimatorBefore(item) : YGUndefined; + float crossDimAfter = estimatorAfter ? estimatorAfter(item) : YGUndefined; + + // If cross dimension hasn't changed, contribution depending on it won't + // change + if (yoga::inexactEquals(crossDimBefore, crossDimAfter)) { + continue; + } + + float containingBlockWidth = + dimension == Dimension::Width ? YGUndefined : crossDimBefore; + float containingBlockHeight = + dimension == Dimension::Width ? crossDimBefore : YGUndefined; + auto constraintsBefore = calculateItemConstraints( + item, containingBlockWidth, containingBlockHeight); + float contributionBefore = + minContentContribution(item, dimension, constraintsBefore); + + containingBlockWidth = + dimension == Dimension::Width ? YGUndefined : crossDimAfter; + containingBlockHeight = + dimension == Dimension::Width ? crossDimAfter : YGUndefined; + auto constraintsAfter = calculateItemConstraints( + item, containingBlockWidth, containingBlockHeight); + float contributionAfter = + minContentContribution(item, dimension, constraintsAfter); + + if (!yoga::inexactEquals(contributionBefore, contributionAfter)) { + return true; + } + } + return false; + } + + bool itemSizeDependsOnIntrinsicTracks(const GridItem& item) const { + auto heightStyle = item.node->style().dimension(Dimension::Height); + if (heightStyle.isPercent()) { + for (size_t i = item.rowStart; i < item.rowEnd && i < rowTracks.size(); + i++) { + if (isIntrinsicSizingFunction( + rowTracks[i].minSizingFunction, containerInnerHeight) || + isIntrinsicSizingFunction( + rowTracks[i].maxSizingFunction, containerInnerHeight)) { + return true; + } + } + } + return false; + } + + void computeItemTrackCrossingFlags() { + for (auto& item : gridItems) { + item.crossesFlexibleColumn = false; + item.crossesIntrinsicColumn = false; + item.crossesFlexibleRow = false; + item.crossesIntrinsicRow = false; + + for (size_t i = item.columnStart; i < item.columnEnd; i++) { + if (isFlexibleSizingFunction(columnTracks[i].maxSizingFunction)) { + item.crossesFlexibleColumn = true; + } else if (isIntrinsicSizingFunction( + columnTracks[i].maxSizingFunction, + containerInnerWidth)) { + item.crossesIntrinsicColumn = true; + } + if (isIntrinsicSizingFunction( + columnTracks[i].minSizingFunction, containerInnerWidth)) { + item.crossesIntrinsicColumn = true; + } + } + + for (size_t i = item.rowStart; i < item.rowEnd; i++) { + if (isFlexibleSizingFunction(rowTracks[i].maxSizingFunction)) { + item.crossesFlexibleRow = true; + } else if (isIntrinsicSizingFunction( + rowTracks[i].maxSizingFunction, containerInnerHeight)) { + item.crossesIntrinsicRow = true; + } + if (isIntrinsicSizingFunction( + rowTracks[i].minSizingFunction, containerInnerHeight)) { + item.crossesIntrinsicRow = true; + } + } + } + } + + CrossDimensionEstimator makeRowHeightEstimatorUsingFixedTracks(float gap) { + auto& tracks = rowTracks; + auto containerHeight = containerInnerHeight; + return [&tracks, containerHeight, gap](const GridItem& item) -> float { + float height = 0.0f; + for (size_t i = item.rowStart; i < item.rowEnd && i < tracks.size(); + i++) { + if (isFixedSizingFunction( + tracks[i].maxSizingFunction, containerHeight)) { + height += + tracks[i].maxSizingFunction.resolve(containerHeight).unwrap(); + if (i < item.rowEnd - 1) { + height += gap; + } + } else { + return YGUndefined; + } + } + return height; + }; + } + + CrossDimensionEstimator makeCrossDimensionEstimatorUsingBaseSize( + Dimension dimension, + float gap) { + std::vector baseSizes; + auto& tracks = dimension == Dimension::Width ? columnTracks : rowTracks; + baseSizes.reserve(tracks.size()); + for (const auto& track : tracks) { + baseSizes.push_back(track.baseSize); + } + auto startIndexKey = dimension == Dimension::Width ? &GridItem::columnStart + : &GridItem::rowStart; + auto endIndexKey = dimension == Dimension::Width ? &GridItem::columnEnd + : &GridItem::rowEnd; + return [baseSizes = std::move(baseSizes), gap, startIndexKey, endIndexKey]( + const GridItem& item) -> float { + float width = 0.0f; + for (size_t i = item.*startIndexKey; + i < item.*endIndexKey && i < baseSizes.size(); + i++) { + width += baseSizes[i]; + if (i < item.*endIndexKey - 1) { + width += gap; + } + } + return width; + }; + } +}; + +} // namespace facebook::yoga diff --git a/yoga/enums/Align.h b/yoga/enums/Align.h index 3896fe2b8b..e1b8b29bd7 100644 --- a/yoga/enums/Align.h +++ b/yoga/enums/Align.h @@ -25,11 +25,13 @@ enum class Align : uint8_t { SpaceBetween = YGAlignSpaceBetween, SpaceAround = YGAlignSpaceAround, SpaceEvenly = YGAlignSpaceEvenly, + Start = YGAlignStart, + End = YGAlignEnd, }; template <> constexpr int32_t ordinalCount() { - return 9; + return 11; } constexpr Align scopedEnum(YGAlign unscoped) { diff --git a/yoga/enums/Display.h b/yoga/enums/Display.h index 9bf23c0ac7..9edbee80b5 100644 --- a/yoga/enums/Display.h +++ b/yoga/enums/Display.h @@ -19,11 +19,12 @@ enum class Display : uint8_t { Flex = YGDisplayFlex, None = YGDisplayNone, Contents = YGDisplayContents, + Grid = YGDisplayGrid, }; template <> constexpr int32_t ordinalCount() { - return 3; + return 4; } constexpr Display scopedEnum(YGDisplay unscoped) { diff --git a/yoga/enums/GridTrackType.h b/yoga/enums/GridTrackType.h new file mode 100644 index 0000000000..eb6e8332bc --- /dev/null +++ b/yoga/enums/GridTrackType.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// @generated by enums.py +// clang-format off +#pragma once + +#include +#include +#include + +namespace facebook::yoga { + +enum class GridTrackType : uint8_t { + Auto = YGGridTrackTypeAuto, + Points = YGGridTrackTypePoints, + Percent = YGGridTrackTypePercent, + Fr = YGGridTrackTypeFr, + Minmax = YGGridTrackTypeMinmax, +}; + +template <> +constexpr int32_t ordinalCount() { + return 5; +} + +constexpr GridTrackType scopedEnum(YGGridTrackType unscoped) { + return static_cast(unscoped); +} + +constexpr YGGridTrackType unscopedEnum(GridTrackType scoped) { + return static_cast(scoped); +} + +inline const char* toString(GridTrackType e) { + return YGGridTrackTypeToString(unscopedEnum(e)); +} + +} // namespace facebook::yoga diff --git a/yoga/enums/Justify.h b/yoga/enums/Justify.h index 255baa6e27..db4afece9a 100644 --- a/yoga/enums/Justify.h +++ b/yoga/enums/Justify.h @@ -16,17 +16,21 @@ namespace facebook::yoga { enum class Justify : uint8_t { + Auto = YGJustifyAuto, FlexStart = YGJustifyFlexStart, Center = YGJustifyCenter, FlexEnd = YGJustifyFlexEnd, SpaceBetween = YGJustifySpaceBetween, SpaceAround = YGJustifySpaceAround, SpaceEvenly = YGJustifySpaceEvenly, + Stretch = YGJustifyStretch, + Start = YGJustifyStart, + End = YGJustifyEnd, }; template <> constexpr int32_t ordinalCount() { - return 6; + return 10; } constexpr Justify scopedEnum(YGJustify unscoped) { diff --git a/yoga/event/event.cpp b/yoga/event/event.cpp index e286ded055..ac6735d6d4 100644 --- a/yoga/event/event.cpp +++ b/yoga/event/event.cpp @@ -29,6 +29,8 @@ const char* LayoutPassReasonToString(const LayoutPassReason value) { return "abs_measure"; case LayoutPassReason::kFlexMeasure: return "flex_measure"; + case LayoutPassReason::kGridLayout: + return "grid_layout"; default: return "unknown"; } diff --git a/yoga/event/event.h b/yoga/event/event.h index 587c1cd063..0d032240dd 100644 --- a/yoga/event/event.h +++ b/yoga/event/event.h @@ -32,6 +32,7 @@ enum struct LayoutPassReason : int { kMeasureChild = 5, kAbsMeasureChild = 6, kFlexMeasure = 7, + kGridLayout = 8, COUNT }; diff --git a/yoga/node/Node.h b/yoga/node/Node.h index 8068c81497..d22c4c1ef0 100644 --- a/yoga/node/Node.h +++ b/yoga/node/Node.h @@ -294,15 +294,15 @@ class YG_EXPORT Node : public ::YGNode { bool isNodeFlexible(); void reset(); - private: - // Used to allow resetting the node - Node& operator=(Node&&) noexcept = default; - float relativePosition( FlexDirection axis, Direction direction, float axisSize) const; + private: + // Used to allow resetting the node + Node& operator=(Node&&) noexcept = default; + void useWebDefaults() { style_.setFlexDirection(FlexDirection::Row); style_.setAlignContent(Align::Stretch); diff --git a/yoga/style/GridLine.h b/yoga/style/GridLine.h new file mode 100644 index 0000000000..a330fe1b02 --- /dev/null +++ b/yoga/style/GridLine.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include +#include +#include + +namespace facebook::yoga { + +// https://www.w3.org/TR/css-grid-1/#typedef-grid-row-start-grid-line +enum class GridLineType : uint8_t { + Auto, + Integer, + Span, +}; + +struct GridLine { + GridLineType type; + // Line position (1, 2, -1, -2, etc) + int32_t integer; + + static GridLine auto_() { + return GridLine{GridLineType::Auto, 0}; + } + + static GridLine fromInteger(int32_t value) { + return GridLine{GridLineType::Integer, value}; + } + + static GridLine span(int32_t value) { + return GridLine{GridLineType::Span, value}; + } + + bool isAuto() const { + return type == GridLineType::Auto; + } + + bool isInteger() const { + return type == GridLineType::Integer; + } + + bool isSpan() const { + return type == GridLineType::Span; + } + + bool operator==(const GridLine& other) const { + return type == other.type && integer == other.integer; + } + + bool operator!=(const GridLine& other) const { + return !(*this == other); + } +}; + +} // namespace facebook::yoga diff --git a/yoga/style/GridTrack.h b/yoga/style/GridTrack.h new file mode 100644 index 0000000000..4b4c1c1a19 --- /dev/null +++ b/yoga/style/GridTrack.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include +#include + +namespace facebook::yoga { +// https://www.w3.org/TR/css-grid-1/#typedef-track-size +struct GridTrackSize { + StyleSizeLength minSizingFunction; + StyleSizeLength maxSizingFunction; + + // These are used in the grid layout algorithm when distributing spaces among + // tracks + // TODO: maybe move them to TrackSizing since these are track states + float baseSize = 0.0f; + float growthLimit = 0.0f; + bool infinitelyGrowable = false; + + // Static factory methods for common cases + static GridTrackSize auto_() { + return GridTrackSize{StyleSizeLength::ofAuto(), StyleSizeLength::ofAuto()}; + } + + static GridTrackSize length(float points) { + auto len = StyleSizeLength::points(points); + return GridTrackSize{len, len}; + } + + static GridTrackSize fr(float fraction) { + // Flex sizing function is always a max sizing function + return GridTrackSize{ + StyleSizeLength::ofAuto(), StyleSizeLength::stretch(fraction)}; + } + + static GridTrackSize percent(float percentage) { + return GridTrackSize{ + StyleSizeLength::percent(percentage), + StyleSizeLength::percent(percentage)}; + } + + static GridTrackSize minmax(StyleSizeLength min, StyleSizeLength max) { + return GridTrackSize{min, max}; + } + + bool operator==(const GridTrackSize& other) const { + return minSizingFunction == other.minSizingFunction && + maxSizingFunction == other.maxSizingFunction; + } + + bool operator!=(const GridTrackSize& other) const { + return !(*this == other); + } +}; + +// Grid track list for grid-template-rows/columns properties +using GridTrackList = std::vector; + +} // namespace facebook::yoga diff --git a/yoga/style/Style.h b/yoga/style/Style.h index 566b6934e6..728cc283b2 100644 --- a/yoga/style/Style.h +++ b/yoga/style/Style.h @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include #include #include @@ -65,6 +67,20 @@ class YG_EXPORT Style { justifyContent_ = value; } + Justify justifyItems() const { + return justifyItems_; + } + void setJustifyItems(Justify value) { + justifyItems_ = value; + } + + Justify justifySelf() const { + return justifySelf_; + } + void setJustifySelf(Justify value) { + justifySelf_ = value; + } + Align alignContent() const { return alignContent_; } @@ -191,6 +207,64 @@ class YG_EXPORT Style { pool_.store(minDimensions_[yoga::to_underlying(axis)], value); } + // Grid Container Properties + const GridTrackList& gridTemplateColumns() const { + return gridTemplateColumns_; + } + void setGridTemplateColumns(GridTrackList value) { + gridTemplateColumns_ = std::move(value); + } + + const GridTrackList& gridTemplateRows() const { + return gridTemplateRows_; + } + void setGridTemplateRows(GridTrackList value) { + gridTemplateRows_ = std::move(value); + } + + const GridTrackList& gridAutoColumns() const { + return gridAutoColumns_; + } + void setGridAutoColumns(GridTrackList value) { + gridAutoColumns_ = std::move(value); + } + + const GridTrackList& gridAutoRows() const { + return gridAutoRows_; + } + void setGridAutoRows(GridTrackList value) { + gridAutoRows_ = std::move(value); + } + + // Grid Item Properties + const GridLine& gridColumnStart() const { + return gridColumnStart_; + } + void setGridColumnStart(GridLine value) { + gridColumnStart_ = std::move(value); + } + + const GridLine& gridColumnEnd() const { + return gridColumnEnd_; + } + void setGridColumnEnd(GridLine value) { + gridColumnEnd_ = std::move(value); + } + + const GridLine& gridRowStart() const { + return gridRowStart_; + } + void setGridRowStart(GridLine value) { + gridRowStart_ = std::move(value); + } + + const GridLine& gridRowEnd() const { + return gridRowEnd_; + } + void setGridRowEnd(GridLine value) { + gridRowEnd_ = std::move(value); + } + FloatOptional resolvedMinDimension( Direction direction, Dimension axis, @@ -515,6 +589,12 @@ class YG_EXPORT Style { return maxOrDefined(gap.resolve(ownerSize).unwrap(), 0.0f); } + float computeGapForDimension(Dimension dimension, float ownerSize) const { + auto gap = + dimension == Dimension::Width ? computeColumnGap() : computeRowGap(); + return maxOrDefined(gap.resolve(ownerSize).unwrap(), 0.0f); + } + bool flexStartMarginIsAuto(FlexDirection axis, Direction direction) const { return computeMargin(flexStartEdge(axis), direction).isAuto(); } @@ -523,10 +603,20 @@ class YG_EXPORT Style { return computeMargin(flexEndEdge(axis), direction).isAuto(); } + bool inlineStartMarginIsAuto(FlexDirection axis, Direction direction) const { + return computeMargin(inlineStartEdge(axis, direction), direction).isAuto(); + } + + bool inlineEndMarginIsAuto(FlexDirection axis, Direction direction) const { + return computeMargin(inlineEndEdge(axis, direction), direction).isAuto(); + } + bool operator==(const Style& other) const { return direction_ == other.direction_ && flexDirection_ == other.flexDirection_ && justifyContent_ == other.justifyContent_ && + justifyItems_ == other.justifyItems_ && + justifySelf_ == other.justifySelf_ && alignContent_ == other.alignContent_ && alignItems_ == other.alignItems_ && alignSelf_ == other.alignSelf_ && positionType_ == other.positionType_ && flexWrap_ == other.flexWrap_ && @@ -545,7 +635,15 @@ class YG_EXPORT Style { minDimensions_, pool_, other.minDimensions_, other.pool_) && lengthsEqual( maxDimensions_, pool_, other.maxDimensions_, other.pool_) && - numbersEqual(aspectRatio_, pool_, other.aspectRatio_, other.pool_); + numbersEqual(aspectRatio_, pool_, other.aspectRatio_, other.pool_) && + gridTemplateColumns_ == other.gridTemplateColumns_ && + gridTemplateRows_ == other.gridTemplateRows_ && + gridAutoColumns_ == other.gridAutoColumns_ && + gridAutoRows_ == other.gridAutoRows_ && + gridColumnStart_ == other.gridColumnStart_ && + gridColumnEnd_ == other.gridColumnEnd_ && + gridRowStart_ == other.gridRowStart_ && + gridRowEnd_ == other.gridRowEnd_; } bool operator!=(const Style& other) const { @@ -727,6 +825,8 @@ class YG_EXPORT Style { FlexDirection flexDirection_ : bitCount() = FlexDirection::Column; Justify justifyContent_ : bitCount() = Justify::FlexStart; + Justify justifyItems_ : bitCount() = Justify::Stretch; + Justify justifySelf_ : bitCount() = Justify::Auto; Align alignContent_ : bitCount() = Align::FlexStart; Align alignItems_ : bitCount() = Align::Stretch; Align alignSelf_ : bitCount() = Align::Auto; @@ -753,6 +853,16 @@ class YG_EXPORT Style { Dimensions maxDimensions_{}; StyleValueHandle aspectRatio_{}; + // Grid properties + GridTrackList gridTemplateColumns_{}; + GridTrackList gridTemplateRows_{}; + GridTrackList gridAutoColumns_{}; + GridTrackList gridAutoRows_{}; + GridLine gridColumnStart_{}; + GridLine gridColumnEnd_{}; + GridLine gridRowStart_{}; + GridLine gridRowEnd_{}; + StyleValuePool pool_; }; diff --git a/yoga/style/StyleSizeLength.h b/yoga/style/StyleSizeLength.h index fc4d371e42..76e079b2da 100644 --- a/yoga/style/StyleSizeLength.h +++ b/yoga/style/StyleSizeLength.h @@ -42,6 +42,12 @@ class StyleSizeLength { : StyleSizeLength{FloatOptional{value}, Unit::Percent}; } + constexpr static StyleSizeLength stretch(float fraction) { + return yoga::isUndefined(fraction) || yoga::isinf(fraction) + ? undefined() + : StyleSizeLength{FloatOptional{fraction}, Unit::Stretch}; + } + constexpr static StyleSizeLength ofAuto() { return StyleSizeLength{{}, Unit::Auto}; } @@ -98,7 +104,7 @@ class StyleSizeLength { return value_; } - constexpr FloatOptional resolve(float referenceLength) { + constexpr FloatOptional resolve(float referenceLength) const { #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wswitch-enum"