react-nitro-yoga 0.0.0-stage → 0.0.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Generated/.gitattributes +1 -0
- package/Generated/api.d.ts +100 -0
- package/Generated/ffigen_yoga_adapters.h +52 -0
- package/Generated/native.d.ts +84 -0
- package/Generated/native.ts +283 -0
- package/Generated/yoga.c +1087 -0
- package/LICENSE +21 -0
- package/Package.swift +57 -0
- package/README.md +61 -2
- package/Sources/ReactNitroYoga/InstallHermesBindings.cpp +11 -0
- package/Sources/ReactNitroYoga/SHUnit.h +16 -0
- package/include/ReactNitroYoga/InstallHermesBindings.hpp +12 -0
- package/package.json +26 -4
- package/yoga/.clang-format +109 -0
- package/yoga/.clang-tidy +217 -0
- package/yoga/.editorconfig +11 -0
- package/yoga/.eslintrc.cjs +84 -0
- package/yoga/.github/ISSUE_TEMPLATE.md +21 -0
- package/yoga/.github/actions/black/action.yml +25 -0
- package/yoga/.github/actions/cache-emsdk/action.yml +10 -0
- package/yoga/.github/actions/install-ninja/action.yml +14 -0
- package/yoga/.github/actions/setup-android/action.yml +12 -0
- package/yoga/.github/actions/setup-apple/action.yml +8 -0
- package/yoga/.github/actions/setup-cpp/action.yml +34 -0
- package/yoga/.github/actions/setup-js/action.yml +18 -0
- package/yoga/.github/workflows/publish-android-release.yml +38 -0
- package/yoga/.github/workflows/publish-android-snashot.yml +36 -0
- package/yoga/.github/workflows/publish-npm-release.yml +25 -0
- package/yoga/.github/workflows/validate-android.yml +30 -0
- package/yoga/.github/workflows/validate-cpp.yml +101 -0
- package/yoga/.github/workflows/validate-format.yml +36 -0
- package/yoga/.github/workflows/validate-js.yml +119 -0
- package/yoga/.github/workflows/validate-swiftpm.yml +29 -0
- package/yoga/.github/workflows/validate-tests.yml +35 -0
- package/yoga/.github/workflows/validate-website.yml +45 -0
- package/yoga/.prettierignore +3 -0
- package/yoga/.prettierrc.js +16 -0
- package/yoga/.vscode/extensions.json +7 -0
- package/yoga/.vscode/launch.json +25 -0
- package/yoga/.vscode/settings.json +20 -0
- package/yoga/.vscode/tasks.json +23 -0
- package/yoga/CMakeLists.txt +58 -0
- package/yoga/CODE_OF_CONDUCT.md +76 -0
- package/yoga/CONTRIBUTING.md +44 -0
- package/yoga/LICENSE +21 -0
- package/yoga/LICENSE-examples +9 -0
- package/yoga/Package.swift +32 -0
- package/yoga/README.md +36 -0
- package/yoga/benchmark/Benchmark.cpp +400 -0
- package/yoga/benchmark/Benchmark.h +39 -0
- package/yoga/benchmark/CMakeLists.txt +27 -0
- package/yoga/benchmark/TreeDeserialization.cpp +248 -0
- package/yoga/benchmark/TreeDeserialization.h +52 -0
- package/yoga/benchmark/YGBenchmark.c +183 -0
- package/yoga/benchmark/benchmark +15 -0
- package/yoga/benchmark/captures/chat-mac.json +24426 -0
- package/yoga/benchmark/captures/feed-android.json +10335 -0
- package/yoga/benchmark/captures/profile-ios.json +1955 -0
- package/yoga/benchmark/captures/rendering-sample-mac.json +1927 -0
- package/yoga/build.gradle +46 -0
- package/yoga/build_fuzz_tests +28 -0
- package/yoga/capture/CMakeLists.txt +23 -0
- package/yoga/capture/CaptureTree.cpp +100 -0
- package/yoga/capture/CaptureTree.h +47 -0
- package/yoga/capture/NodeToString.cpp +359 -0
- package/yoga/capture/NodeToString.h +40 -0
- package/yoga/cmake/project-defaults.cmake +50 -0
- package/yoga/cmake/yoga-config.cmake.in +10 -0
- package/yoga/enums.py +394 -0
- package/yoga/fuzz/CMakeLists.txt +21 -0
- package/yoga/fuzz/FuzzLayout.cpp +57 -0
- package/yoga/gentest/babel.config.cjs +12 -0
- package/yoga/gentest/fixtures/YGAbsolutePositionTest.html +168 -0
- package/yoga/gentest/fixtures/YGAlignContentTest.html +479 -0
- package/yoga/gentest/fixtures/YGAlignItemsTest.html +227 -0
- package/yoga/gentest/fixtures/YGAlignSelfTest.html +23 -0
- package/yoga/gentest/fixtures/YGAndroidNewsFeed.html +28 -0
- package/yoga/gentest/fixtures/YGAspectRatioTest.html +3 -0
- package/yoga/gentest/fixtures/YGAutoTest.html +25 -0
- package/yoga/gentest/fixtures/YGBorderTest.html +18 -0
- package/yoga/gentest/fixtures/YGBoxSizingTest.html +240 -0
- package/yoga/gentest/fixtures/YGDimensionTest.html +9 -0
- package/yoga/gentest/fixtures/YGDisplayTest.html +89 -0
- package/yoga/gentest/fixtures/YGFlexBasisFitContentTest.html +55 -0
- package/yoga/gentest/fixtures/YGFlexDirectionTest.html +391 -0
- package/yoga/gentest/fixtures/YGFlexTest.html +53 -0
- package/yoga/gentest/fixtures/YGFlexWrapTest.html +160 -0
- package/yoga/gentest/fixtures/YGGapTest.html +233 -0
- package/yoga/gentest/fixtures/YGIntrinsicSizeTest.html +295 -0
- package/yoga/gentest/fixtures/YGJustifyContentTest.html +164 -0
- package/yoga/gentest/fixtures/YGMarginTest.html +157 -0
- package/yoga/gentest/fixtures/YGMinMaxDimensionTest.html +116 -0
- package/yoga/gentest/fixtures/YGPaddingTest.html +29 -0
- package/yoga/gentest/fixtures/YGPercentageTest.html +125 -0
- package/yoga/gentest/fixtures/YGRoundingTest.html +95 -0
- package/yoga/gentest/fixtures/YGSizeOverflowTest.html +17 -0
- package/yoga/gentest/fixtures/YGStaticPositionTest.html +712 -0
- package/yoga/gentest/fonts/Ahem.ttf +0 -0
- package/yoga/gentest/gentest-driver.ts +141 -0
- package/yoga/gentest/gentest-validate.ts +43 -0
- package/yoga/gentest/package.json +24 -0
- package/yoga/gentest/scripts/gentest-validate.ts +43 -0
- package/yoga/gentest/signedsource.d.ts +10 -0
- package/yoga/gentest/src/ChromePool.ts +78 -0
- package/yoga/gentest/src/CssToYoga.ts +958 -0
- package/yoga/gentest/src/buildLayoutTree.ts +98 -0
- package/yoga/gentest/src/cli.ts +163 -0
- package/yoga/gentest/src/emitters/CppEmitter.ts +452 -0
- package/yoga/gentest/src/emitters/Emitter.ts +204 -0
- package/yoga/gentest/src/emitters/JavaEmitter.ts +469 -0
- package/yoga/gentest/src/emitters/JavascriptEmitter.ts +353 -0
- package/yoga/gentest/src/types.ts +41 -0
- package/yoga/gentest/test-template.html +42 -0
- package/yoga/gentest/tsconfig.json +13 -0
- package/yoga/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/yoga/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/yoga/gradle.properties +14 -0
- package/yoga/gradlew +251 -0
- package/yoga/gradlew.bat +94 -0
- package/yoga/java/AndroidManifest.xml +14 -0
- package/yoga/java/CMakeLists.txt +22 -0
- package/yoga/java/build.gradle.kts +127 -0
- package/yoga/java/com/facebook/yoga/LayoutPassReason.kt +35 -0
- package/yoga/java/com/facebook/yoga/YogaAlign.kt +45 -0
- package/yoga/java/com/facebook/yoga/YogaBaselineFunction.kt +16 -0
- package/yoga/java/com/facebook/yoga/YogaBoxSizing.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaConfig.kt +48 -0
- package/yoga/java/com/facebook/yoga/YogaConfigFactory.kt +12 -0
- package/yoga/java/com/facebook/yoga/YogaConfigJNIBase.kt +70 -0
- package/yoga/java/com/facebook/yoga/YogaConfigJNIFinalizer.kt +30 -0
- package/yoga/java/com/facebook/yoga/YogaConstants.kt +18 -0
- package/yoga/java/com/facebook/yoga/YogaDimension.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaDirection.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaDisplay.kt +31 -0
- package/yoga/java/com/facebook/yoga/YogaEdge.kt +41 -0
- package/yoga/java/com/facebook/yoga/YogaErrata.kt +39 -0
- package/yoga/java/com/facebook/yoga/YogaExperimentalFeature.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaFlexDirection.kt +31 -0
- package/yoga/java/com/facebook/yoga/YogaGridTrackType.kt +33 -0
- package/yoga/java/com/facebook/yoga/YogaGutter.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaJustify.kt +43 -0
- package/yoga/java/com/facebook/yoga/YogaLayoutType.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaLogLevel.kt +39 -0
- package/yoga/java/com/facebook/yoga/YogaLogger.kt +19 -0
- package/yoga/java/com/facebook/yoga/YogaMeasureFunction.kt +19 -0
- package/yoga/java/com/facebook/yoga/YogaMeasureMode.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaMeasureOutput.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaNative.kt +347 -0
- package/yoga/java/com/facebook/yoga/YogaNode.kt +254 -0
- package/yoga/java/com/facebook/yoga/YogaNodeFactory.kt +14 -0
- package/yoga/java/com/facebook/yoga/YogaNodeJNIBase.kt +762 -0
- package/yoga/java/com/facebook/yoga/YogaNodeJNIFinalizer.kt +33 -0
- package/yoga/java/com/facebook/yoga/YogaNodeType.kt +27 -0
- package/yoga/java/com/facebook/yoga/YogaOverflow.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaPositionType.kt +29 -0
- package/yoga/java/com/facebook/yoga/YogaProps.kt +205 -0
- package/yoga/java/com/facebook/yoga/YogaStyleInputs.kt +51 -0
- package/yoga/java/com/facebook/yoga/YogaUnit.kt +37 -0
- package/yoga/java/com/facebook/yoga/YogaValue.kt +66 -0
- package/yoga/java/com/facebook/yoga/YogaWrap.kt +29 -0
- package/yoga/java/com/facebook/yoga/annotations/DoNotStrip.kt +19 -0
- package/yoga/java/gen/com/facebook/yoga/BuildConfig.java +15 -0
- package/yoga/java/jni/LayoutContext.cpp +34 -0
- package/yoga/java/jni/LayoutContext.h +29 -0
- package/yoga/java/jni/ScopedGlobalRef.h +140 -0
- package/yoga/java/jni/ScopedLocalRef.h +141 -0
- package/yoga/java/jni/YGJNI.h +77 -0
- package/yoga/java/jni/YGJNIVanilla.cpp +1178 -0
- package/yoga/java/jni/YGJNIVanilla.h +12 -0
- package/yoga/java/jni/YGJTypesVanilla.h +52 -0
- package/yoga/java/jni/YogaJniException.cpp +49 -0
- package/yoga/java/jni/YogaJniException.h +35 -0
- package/yoga/java/jni/common.cpp +109 -0
- package/yoga/java/jni/common.h +73 -0
- package/yoga/java/jni/corefunctions.cpp +91 -0
- package/yoga/java/jni/corefunctions.h +50 -0
- package/yoga/java/jni/macros.h +23 -0
- package/yoga/java/jni/tests/corefunctionsTest.cpp +247 -0
- package/yoga/java/jni/yogajni.cpp +18 -0
- package/yoga/java/proguard-rules.pro +10 -0
- package/yoga/java/res/values/strings.xml +12 -0
- package/yoga/java/tests/com/facebook/yoga/TestParametrization.kt +29 -0
- package/yoga/java/tests/com/facebook/yoga/YGAlignBaselineTest.kt +117 -0
- package/yoga/java/tests/com/facebook/yoga/YogaExceptionTest.kt +140 -0
- package/yoga/java/tests/com/facebook/yoga/YogaLoggerTest.kt +77 -0
- package/yoga/java/tests/com/facebook/yoga/YogaNodeStylePropertiesTest.kt +1020 -0
- package/yoga/java/tests/com/facebook/yoga/YogaNodeTest.kt +319 -0
- package/yoga/java/tests/com/facebook/yoga/YogaValueTest.kt +23 -0
- package/yoga/java/tests/com/facebook/yoga/utils/TestUtils.kt +99 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAbsolutePositionTest.java +1670 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAlignContentTest.java +5440 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAlignItemsTest.java +2132 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAlignSelfTest.java +271 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAndroidNewsFeed.java +313 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAspectRatioTest.java +73 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGAutoTest.java +326 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGBorderTest.java +222 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGBoxSizingTest.java +2165 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGDimensionTest.java +122 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGDisplayContentsTest.java +107 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGDisplayTest.java +1021 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGFlexBasisFitContentTest.java +391 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGFlexDirectionTest.java +4118 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGFlexTest.java +630 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGFlexWrapTest.java +1863 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGGapTest.java +2988 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGIntrinsicSizeTest.java +926 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGJustifyContentTest.java +1865 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGMarginTest.java +1796 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGMinMaxDimensionTest.java +1210 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGPaddingTest.java +307 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGPercentageTest.java +1345 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGRoundingTest.java +1099 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGSizeOverflowTest.java +195 -0
- package/yoga/java/tests/generated/com/facebook/yoga/YGStaticPositionTest.java +5992 -0
- package/yoga/java/yogajni.version +13 -0
- package/yoga/javascript/CMakeLists.txt +59 -0
- package/yoga/javascript/README.md +27 -0
- package/yoga/javascript/babel.config.cjs +30 -0
- package/yoga/javascript/jest.config.js +14 -0
- package/yoga/javascript/jest.setup.js +12 -0
- package/yoga/javascript/just.config.cjs +258 -0
- package/yoga/javascript/package.json +52 -0
- package/yoga/javascript/src/generated/YGEnums.ts +249 -0
- package/yoga/javascript/src/index.ts +23 -0
- package/yoga/javascript/src/load.ts +25 -0
- package/yoga/javascript/src/wasm_bridge.c +155 -0
- package/yoga/javascript/src/wrapAssembly.ts +1025 -0
- package/yoga/javascript/tests/Benchmarks/YGBenchmark.test.ts +110 -0
- package/yoga/javascript/tests/YGAlignBaselineTest.test.ts +104 -0
- package/yoga/javascript/tests/YGComputedBorderTest.test.ts +25 -0
- package/yoga/javascript/tests/YGComputedMarginTest.test.ts +25 -0
- package/yoga/javascript/tests/YGComputedPaddingTest.test.ts +25 -0
- package/yoga/javascript/tests/YGDirtiedTest.test.ts +149 -0
- package/yoga/javascript/tests/YGErrataTest.test.ts +34 -0
- package/yoga/javascript/tests/YGFlexBasisAuto.test.ts +21 -0
- package/yoga/javascript/tests/YGHadOverflowTest.test.ts +110 -0
- package/yoga/javascript/tests/YGHasNewLayout.test.ts +81 -0
- package/yoga/javascript/tests/YGMeasureCacheTest.test.ts +29 -0
- package/yoga/javascript/tests/YGMeasureTest.test.ts +66 -0
- package/yoga/javascript/tests/bin/run-bench.ts +60 -0
- package/yoga/javascript/tests/generated/YGAbsolutePositionTest.test.ts +1531 -0
- package/yoga/javascript/tests/generated/YGAlignContentTest.test.ts +5181 -0
- package/yoga/javascript/tests/generated/YGAlignItemsTest.test.ts +2013 -0
- package/yoga/javascript/tests/generated/YGAlignSelfTest.test.ts +248 -0
- package/yoga/javascript/tests/generated/YGAndroidNewsFeed.test.ts +306 -0
- package/yoga/javascript/tests/generated/YGAspectRatioTest.test.ts +66 -0
- package/yoga/javascript/tests/generated/YGAutoTest.test.ts +303 -0
- package/yoga/javascript/tests/generated/YGBorderTest.test.ts +199 -0
- package/yoga/javascript/tests/generated/YGBoxSizingTest.test.ts +1978 -0
- package/yoga/javascript/tests/generated/YGDimensionTest.test.ts +111 -0
- package/yoga/javascript/tests/generated/YGDisplayContentsTest.test.ts +99 -0
- package/yoga/javascript/tests/generated/YGDisplayTest.test.ts +962 -0
- package/yoga/javascript/tests/generated/YGFlexBasisFitContentTest.test.ts +364 -0
- package/yoga/javascript/tests/generated/YGFlexDirectionTest.test.ts +3903 -0
- package/yoga/javascript/tests/generated/YGFlexTest.test.ts +587 -0
- package/yoga/javascript/tests/generated/YGFlexWrapTest.test.ts +1768 -0
- package/yoga/javascript/tests/generated/YGGapTest.test.ts +2857 -0
- package/yoga/javascript/tests/generated/YGIntrinsicSizeTest.test.ts +843 -0
- package/yoga/javascript/tests/generated/YGJustifyContentTest.test.ts +1750 -0
- package/yoga/javascript/tests/generated/YGMarginTest.test.ts +1657 -0
- package/yoga/javascript/tests/generated/YGMinMaxDimensionTest.test.ts +1111 -0
- package/yoga/javascript/tests/generated/YGPaddingTest.test.ts +276 -0
- package/yoga/javascript/tests/generated/YGPercentageTest.test.ts +1246 -0
- package/yoga/javascript/tests/generated/YGRoundingTest.test.ts +1044 -0
- package/yoga/javascript/tests/generated/YGSizeOverflowTest.test.ts +180 -0
- package/yoga/javascript/tests/generated/YGStaticPositionTest.test.ts +5741 -0
- package/yoga/javascript/tests/tools/MeasureCounter.ts +66 -0
- package/yoga/javascript/tests/tools/globals.ts +19 -0
- package/yoga/javascript/tests/tools/utils.ts +90 -0
- package/yoga/javascript/tsconfig.json +23 -0
- package/yoga/lib/jni/jni.h +13 -0
- package/yoga/lib/jni/real/jni.h +1141 -0
- package/yoga/lib/jsr-305/jsr305.jar +0 -0
- package/yoga/lib/nlohmann/json.hpp +24766 -0
- package/yoga/lib/soloader/soloader-0.5.1.aar +0 -0
- package/yoga/package.json +44 -0
- package/yoga/scripts/clang-format +52 -0
- package/yoga/scripts/clang-format.js +93 -0
- package/yoga/scripts/format-kotlin.js +88 -0
- package/yoga/scripts/format-python.js +150 -0
- package/yoga/scripts/format-utils.js +82 -0
- package/yoga/set-version.py +37 -0
- package/yoga/settings.gradle.kts +29 -0
- package/yoga/test/AssertFatalTest.cpp +70 -0
- package/yoga/tests/.clang-tidy +7 -0
- package/yoga/tests/CMakeLists.txt +35 -0
- package/yoga/tests/CacheTest.cpp +229 -0
- package/yoga/tests/EventPublisherTest.cpp +162 -0
- package/yoga/tests/EventsTest.cpp +362 -0
- package/yoga/tests/FlexGapTest.cpp +93 -0
- package/yoga/tests/FloatOptionalTest.cpp +214 -0
- package/yoga/tests/GridStyleTest.cpp +103 -0
- package/yoga/tests/OrdinalsTest.cpp +35 -0
- package/yoga/tests/SmallValueBufferTest.cpp +161 -0
- package/yoga/tests/StyleTest.cpp +48 -0
- package/yoga/tests/StyleValuePoolTest.cpp +146 -0
- package/yoga/tests/YGAlignBaselineTest.cpp +837 -0
- package/yoga/tests/YGAspectRatioTest.cpp +898 -0
- package/yoga/tests/YGAutoMinSizeTest.cpp +581 -0
- package/yoga/tests/YGBaselineFuncTest.cpp +62 -0
- package/yoga/tests/YGCloneNodeTest.cpp +131 -0
- package/yoga/tests/YGComputedMarginTest.cpp +117 -0
- package/yoga/tests/YGComputedPaddingTest.cpp +119 -0
- package/yoga/tests/YGConfigTest.cpp +239 -0
- package/yoga/tests/YGContentsNodeHasNewLayoutTest.cpp +190 -0
- package/yoga/tests/YGDefaultValuesTest.cpp +175 -0
- package/yoga/tests/YGDirtiedTest.cpp +110 -0
- package/yoga/tests/YGDirtyMarkingTest.cpp +341 -0
- package/yoga/tests/YGEdgeTest.cpp +161 -0
- package/yoga/tests/YGFirstChildMinWidthTest.cpp +133 -0
- package/yoga/tests/YGFlexBasisFitContentTest.cpp +241 -0
- package/yoga/tests/YGFlexShrinkBorderBugTest.cpp +48 -0
- package/yoga/tests/YGHadOverflowTest.cpp +135 -0
- package/yoga/tests/YGLayoutableChildrenTest.cpp +191 -0
- package/yoga/tests/YGMeasureCacheTest.cpp +178 -0
- package/yoga/tests/YGMeasureModeTest.cpp +332 -0
- package/yoga/tests/YGMeasureTest.cpp +1010 -0
- package/yoga/tests/YGNodeCallbackTest.cpp +80 -0
- package/yoga/tests/YGNodeChildTest.cpp +68 -0
- package/yoga/tests/YGPersistenceTest.cpp +291 -0
- package/yoga/tests/YGPersistentNodeCloningTest.cpp +214 -0
- package/yoga/tests/YGRelayoutTest.cpp +255 -0
- package/yoga/tests/YGRoundingFunctionTest.cpp +186 -0
- package/yoga/tests/YGRoundingMeasureFuncTest.cpp +139 -0
- package/yoga/tests/YGScaleChangeTest.cpp +176 -0
- package/yoga/tests/YGStyleTest.cpp +75 -0
- package/yoga/tests/YGTreeMutationTest.cpp +115 -0
- package/yoga/tests/YGValueTest.cpp +23 -0
- package/yoga/tests/YGZeroOutLayoutRecursivelyTest.cpp +37 -0
- package/yoga/tests/generated/YGAbsolutePositionTest.cpp +1685 -0
- package/yoga/tests/generated/YGAlignContentTest.cpp +5485 -0
- package/yoga/tests/generated/YGAlignItemsTest.cpp +2142 -0
- package/yoga/tests/generated/YGAlignSelfTest.cpp +257 -0
- package/yoga/tests/generated/YGAndroidNewsFeed.cpp +295 -0
- package/yoga/tests/generated/YGAspectRatioTest.cpp +55 -0
- package/yoga/tests/generated/YGAutoTest.cpp +312 -0
- package/yoga/tests/generated/YGBorderTest.cpp +208 -0
- package/yoga/tests/generated/YGBoxSizingTest.cpp +2192 -0
- package/yoga/tests/generated/YGDimensionTest.cpp +105 -0
- package/yoga/tests/generated/YGDisplayContentsTest.cpp +89 -0
- package/yoga/tests/generated/YGDisplayTest.cpp +1016 -0
- package/yoga/tests/generated/YGFlexBasisFitContentTest.cpp +378 -0
- package/yoga/tests/generated/YGFlexDirectionTest.cpp +4152 -0
- package/yoga/tests/generated/YGFlexTest.cpp +621 -0
- package/yoga/tests/generated/YGFlexWrapTest.cpp +1867 -0
- package/yoga/tests/generated/YGGapTest.cpp +3001 -0
- package/yoga/tests/generated/YGIntrinsicSizeTest.cpp +924 -0
- package/yoga/tests/generated/YGJustifyContentTest.cpp +1874 -0
- package/yoga/tests/generated/YGMarginTest.cpp +1811 -0
- package/yoga/tests/generated/YGMinMaxDimensionTest.cpp +1215 -0
- package/yoga/tests/generated/YGPaddingTest.cpp +295 -0
- package/yoga/tests/generated/YGPercentageTest.cpp +1350 -0
- package/yoga/tests/generated/YGRoundingTest.cpp +1093 -0
- package/yoga/tests/generated/YGSizeOverflowTest.cpp +179 -0
- package/yoga/tests/generated/YGStaticPositionTest.cpp +6035 -0
- package/yoga/tests/util/TestUtil.cpp +164 -0
- package/yoga/tests/util/TestUtil.h +43 -0
- package/yoga/unit_tests +25 -0
- package/yoga/unit_tests.bat +28 -0
- package/yoga/website/.eslintrc.cjs +26 -0
- package/yoga/website/README.md +41 -0
- package/yoga/website/babel.config.cjs +10 -0
- package/yoga/website/blog/2023-06-30-announcing-yoga-2.0.md +183 -0
- package/yoga/website/blog/2024-06-24-announcing-yoga-3.1.md +67 -0
- package/yoga/website/blog/2024-12-02-announcing-yoga-3.2.md +84 -0
- package/yoga/website/blog/authors.yml +10 -0
- package/yoga/website/blog/yoga-3-release/2024-03-14-announcing-yoga-3.0.md +586 -0
- package/yoga/website/blog/yoga-3-release/img/image1.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image10.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image11.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image12.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image13.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image14.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image15.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image16.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image17.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image2.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image3.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image4.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image5.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image6.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image7.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image8.png +0 -0
- package/yoga/website/blog/yoga-3-release/img/image9.png +0 -0
- package/yoga/website/docs/about-yoga.md +13 -0
- package/yoga/website/docs/advanced/_category_.json +4 -0
- package/yoga/website/docs/advanced/containing-block.md +89 -0
- package/yoga/website/docs/advanced/external-layout-systems.mdx +106 -0
- package/yoga/website/docs/advanced/incremental-layout.mdx +87 -0
- package/yoga/website/docs/getting-started/_category_.json +4 -0
- package/yoga/website/docs/getting-started/configuring-yoga.mdx +165 -0
- package/yoga/website/docs/getting-started/laying-out-a-tree.mdx +178 -0
- package/yoga/website/docs/img/config-contextual.svg +17 -0
- package/yoga/website/docs/img/config-per-node.svg +17 -0
- package/yoga/website/docs/img/config-uniform.svg +17 -0
- package/yoga/website/docs/img/invalidation-clean-tree.svg +17 -0
- package/yoga/website/docs/img/invalidation-dirtied-tree.svg +17 -0
- package/yoga/website/docs/img/invalidation-new-layout-tree.svg +17 -0
- package/yoga/website/docs/img/pixel-grid-after.png +0 -0
- package/yoga/website/docs/img/pixel-grid-before.png +0 -0
- package/yoga/website/docs/img/wireframe-example.svg +105 -0
- package/yoga/website/docs/styling/_category_.json +4 -0
- package/yoga/website/docs/styling/align-content.mdx +47 -0
- package/yoga/website/docs/styling/align-items-self.mdx +48 -0
- package/yoga/website/docs/styling/aspect-ratio.mdx +27 -0
- package/yoga/website/docs/styling/display.mdx +25 -0
- package/yoga/website/docs/styling/flex-basis-grow-shrink.mdx +65 -0
- package/yoga/website/docs/styling/flex-direction.mdx +37 -0
- package/yoga/website/docs/styling/flex-wrap.mdx +33 -0
- package/yoga/website/docs/styling/gap.mdx +49 -0
- package/yoga/website/docs/styling/index.md +48 -0
- package/yoga/website/docs/styling/insets.mdx +62 -0
- package/yoga/website/docs/styling/justify-content.mdx +43 -0
- package/yoga/website/docs/styling/layout-direction.mdx +34 -0
- package/yoga/website/docs/styling/margin-padding-border.mdx +41 -0
- package/yoga/website/docs/styling/min-max-width-height.mdx +52 -0
- package/yoga/website/docs/styling/position.mdx +37 -0
- package/yoga/website/docs/styling/width-height.mdx +37 -0
- package/yoga/website/docusaurus.config.js +113 -0
- package/yoga/website/package.json +43 -0
- package/yoga/website/sidebars.cjs +27 -0
- package/yoga/website/src/components/EditorToolbar.module.css +77 -0
- package/yoga/website/src/components/EditorToolbar.tsx +72 -0
- package/yoga/website/src/components/FlexStyle.ts +439 -0
- package/yoga/website/src/components/LayoutBox.module.css +68 -0
- package/yoga/website/src/components/LayoutBox.tsx +61 -0
- package/yoga/website/src/components/Playground.module.css +130 -0
- package/yoga/website/src/components/Playground.tsx +187 -0
- package/yoga/website/src/components/YogaViewer.tsx +128 -0
- package/yoga/website/src/css/custom.css +37 -0
- package/yoga/website/src/pages/index.module.css +34 -0
- package/yoga/website/src/pages/index.tsx +84 -0
- package/yoga/website/src/pages/markdown-page.md +7 -0
- package/yoga/website/src/pages/playground.module.css +11 -0
- package/yoga/website/src/pages/playground.tsx +56 -0
- package/yoga/website/static/.nojekyll +0 -0
- package/yoga/website/static/img/docusaurus.png +0 -0
- package/yoga/website/static/img/favicon.svg +17 -0
- package/yoga/website/static/img/link.svg +4 -0
- package/yoga/website/static/img/logo.svg +17 -0
- package/yoga/website/static/img/meta_oss.svg +1 -0
- package/yoga/website/static/img/opengraph.png +0 -0
- package/yoga/website/static/img/undraw_docusaurus_mountain.svg +171 -0
- package/yoga/website/static/img/undraw_docusaurus_react.svg +170 -0
- package/yoga/website/static/img/undraw_docusaurus_tree.svg +40 -0
- package/yoga/website/tsconfig.json +10 -0
- package/yoga/yarn.lock +11499 -0
- package/yoga/yoga/CMakeLists.txt +41 -0
- package/yoga/yoga/YGConfig.cpp +92 -0
- package/yoga/yoga/YGConfig.h +158 -0
- package/yoga/yoga/YGEnums.cpp +304 -0
- package/yoga/yoga/YGEnums.h +163 -0
- package/yoga/yoga/YGMacros.h +101 -0
- package/yoga/yoga/YGNode.cpp +407 -0
- package/yoga/yoga/YGNode.h +373 -0
- package/yoga/yoga/YGNodeLayout.cpp +100 -0
- package/yoga/yoga/YGNodeLayout.h +43 -0
- package/yoga/yoga/YGNodeStyle.cpp +774 -0
- package/yoga/yoga/YGNodeStyle.h +243 -0
- package/yoga/yoga/YGPixelGrid.cpp +22 -0
- package/yoga/yoga/YGPixelGrid.h +29 -0
- package/yoga/yoga/YGValue.cpp +20 -0
- package/yoga/yoga/YGValue.h +83 -0
- package/yoga/yoga/Yoga.h +21 -0
- package/yoga/yoga/algorithm/AbsoluteLayout.cpp +595 -0
- package/yoga/yoga/algorithm/AbsoluteLayout.h +41 -0
- package/yoga/yoga/algorithm/Align.h +83 -0
- package/yoga/yoga/algorithm/Baseline.cpp +78 -0
- package/yoga/yoga/algorithm/Baseline.h +21 -0
- package/yoga/yoga/algorithm/BoundAxis.h +79 -0
- package/yoga/yoga/algorithm/Cache.cpp +121 -0
- package/yoga/yoga/algorithm/Cache.h +30 -0
- package/yoga/yoga/algorithm/CalculateLayout.cpp +2968 -0
- package/yoga/yoga/algorithm/CalculateLayout.h +60 -0
- package/yoga/yoga/algorithm/FlexDirection.h +120 -0
- package/yoga/yoga/algorithm/FlexLine.cpp +124 -0
- package/yoga/yoga/algorithm/FlexLine.h +75 -0
- package/yoga/yoga/algorithm/PixelGrid.cpp +138 -0
- package/yoga/yoga/algorithm/PixelGrid.h +29 -0
- package/yoga/yoga/algorithm/SizingMode.h +73 -0
- package/yoga/yoga/algorithm/TrailingPosition.h +44 -0
- package/yoga/yoga/config/Config.cpp +135 -0
- package/yoga/yoga/config/Config.h +93 -0
- package/yoga/yoga/debug/AssertFatal.cpp +54 -0
- package/yoga/yoga/debug/AssertFatal.h +29 -0
- package/yoga/yoga/debug/Log.cpp +107 -0
- package/yoga/yoga/debug/Log.h +34 -0
- package/yoga/yoga/enums/Align.h +49 -0
- package/yoga/yoga/enums/BoxSizing.h +40 -0
- package/yoga/yoga/enums/Dimension.h +40 -0
- package/yoga/yoga/enums/Direction.h +41 -0
- package/yoga/yoga/enums/Display.h +42 -0
- package/yoga/yoga/enums/Edge.h +47 -0
- package/yoga/yoga/enums/Errata.h +43 -0
- package/yoga/yoga/enums/ExperimentalFeature.h +40 -0
- package/yoga/yoga/enums/FlexDirection.h +42 -0
- package/yoga/yoga/enums/GridTrackType.h +43 -0
- package/yoga/yoga/enums/Gutter.h +41 -0
- package/yoga/yoga/enums/Justify.h +48 -0
- package/yoga/yoga/enums/LogLevel.h +44 -0
- package/yoga/yoga/enums/MeasureMode.h +41 -0
- package/yoga/yoga/enums/NodeType.h +40 -0
- package/yoga/yoga/enums/Overflow.h +41 -0
- package/yoga/yoga/enums/PhysicalEdge.h +21 -0
- package/yoga/yoga/enums/PositionType.h +41 -0
- package/yoga/yoga/enums/Unit.h +45 -0
- package/yoga/yoga/enums/Wrap.h +41 -0
- package/yoga/yoga/enums/YogaEnums.h +84 -0
- package/yoga/yoga/event/event.cpp +89 -0
- package/yoga/yoga/event/event.h +131 -0
- package/yoga/yoga/module.modulemap +21 -0
- package/yoga/yoga/node/CachedMeasurement.h +53 -0
- package/yoga/yoga/node/LayoutResults.cpp +48 -0
- package/yoga/yoga/node/LayoutResults.h +136 -0
- package/yoga/yoga/node/LayoutableChildren.h +148 -0
- package/yoga/yoga/node/Node.cpp +509 -0
- package/yoga/yoga/node/Node.h +372 -0
- package/yoga/yoga/numeric/Comparison.h +81 -0
- package/yoga/yoga/numeric/FloatOptional.h +84 -0
- package/yoga/yoga/style/GridLine.h +53 -0
- package/yoga/yoga/style/GridStyle.h +80 -0
- package/yoga/yoga/style/GridTrack.h +63 -0
- package/yoga/yoga/style/SmallValueBuffer.h +133 -0
- package/yoga/yoga/style/Style.h +932 -0
- package/yoga/yoga/style/StyleLength.h +121 -0
- package/yoga/yoga/style/StyleSizeLength.h +152 -0
- package/yoga/yoga/style/StyleValueHandle.h +114 -0
- package/yoga/yoga/style/StyleValuePool.h +194 -0
|
Binary file
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "yoga-repo",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"format": "yarn format-javascript && yarn format-cpp && yarn format-kotlin && yarn format-python",
|
|
7
|
+
"format-check": "yarn format-check-javascript && yarn format-check-cpp && yarn format-check-kotlin && yarn format-check-python",
|
|
8
|
+
"format-check-cpp": "node ./scripts/clang-format.js --check",
|
|
9
|
+
"format-check-javascript": "prettier --check \"./**/*.{cjs,cts,flow,js,jsx,md,mjs,mts,ts,tsx,yaml,yml}\"",
|
|
10
|
+
"format-check-kotlin": "node ./scripts/format-kotlin.js --check",
|
|
11
|
+
"format-check-python": "node ./scripts/format-python.js --check",
|
|
12
|
+
"format-cpp": "node ./scripts/clang-format.js",
|
|
13
|
+
"format-javascript": "prettier --write \"./**/*.{cjs,cts,flow,js,jsx,md,mjs,mts,ts,tsx,yaml,yml}\"",
|
|
14
|
+
"format-kotlin": "node ./scripts/format-kotlin.js",
|
|
15
|
+
"format-python": "node ./scripts/format-python.js",
|
|
16
|
+
"lint": "eslint .",
|
|
17
|
+
"lint:fix": "eslint . --fix",
|
|
18
|
+
"tsc": "yarn workspaces run tsc",
|
|
19
|
+
"gentest": "yarn workspace gentest run gentest",
|
|
20
|
+
"gentest-validate": "yarn workspace gentest run gentest-validate"
|
|
21
|
+
},
|
|
22
|
+
"workspaces": [
|
|
23
|
+
"javascript",
|
|
24
|
+
"gentest",
|
|
25
|
+
"website"
|
|
26
|
+
],
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
|
29
|
+
"@typescript-eslint/parser": "^5.30.5",
|
|
30
|
+
"eslint": "^8.30.0",
|
|
31
|
+
"eslint-config-prettier": "^8.5.0",
|
|
32
|
+
"eslint-plugin-jest": "^27.1.7",
|
|
33
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
34
|
+
"fb-dotslash": "0.5.8",
|
|
35
|
+
"glob": "^10.4.2",
|
|
36
|
+
"ktfmt": "0.59.0",
|
|
37
|
+
"prettier": "3.9.4",
|
|
38
|
+
"typescript": "5.0.4"
|
|
39
|
+
},
|
|
40
|
+
"resolutions": {
|
|
41
|
+
"cliui/wrap-ansi": "7.0.0",
|
|
42
|
+
"qs": "6.15.2"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env dotslash
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the MIT license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
|
|
8
|
+
{
|
|
9
|
+
"name": "clang-format 21.1.2",
|
|
10
|
+
"platforms": {
|
|
11
|
+
"linux-aarch64": {
|
|
12
|
+
"size": 1725525,
|
|
13
|
+
"hash": "sha256",
|
|
14
|
+
"digest": "f66d2bcf98df1373df6ab4544a2b881e9816985b606e1144e4c77dc8ac87b826",
|
|
15
|
+
"providers": [{"type": "http", "url": "https://files.pythonhosted.org/packages/c5/83/61fadfa8d62a288d778e0a1ad2f73b01abca64574ee34c5d6d078e0821da/clang_format-21.1.2-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl"}],
|
|
16
|
+
"format": "zip",
|
|
17
|
+
"path": "clang_format/data/bin/clang-format"
|
|
18
|
+
},
|
|
19
|
+
"linux-x86_64": {
|
|
20
|
+
"size": 1805060,
|
|
21
|
+
"hash": "sha256",
|
|
22
|
+
"digest": "6d7caf74fe89154258ddfd63984c98ffe902ef98f013ac517178fc44d72861ff",
|
|
23
|
+
"providers": [{"type": "http", "url": "https://files.pythonhosted.org/packages/fb/ac/3c04772acc0257f5730e83adb542b2603c1a62d1315010ab593a980af404/clang_format-21.1.2-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl"}],
|
|
24
|
+
"format": "zip",
|
|
25
|
+
"path": "clang_format/data/bin/clang-format"
|
|
26
|
+
},
|
|
27
|
+
"macos-aarch64": {
|
|
28
|
+
"size": 1458874,
|
|
29
|
+
"hash": "sha256",
|
|
30
|
+
"digest": "fc034652dee24583633177d800bc9deebcc9c65eb7ab53b25bbd0fbd443392a9",
|
|
31
|
+
"providers": [{"type": "http", "url": "https://files.pythonhosted.org/packages/ba/90/b8230efcff90a8543da3fb7fc09d7077afebaba019eceb1686d4db94cac3/clang_format-21.1.2-py2.py3-none-macosx_11_0_arm64.whl"}],
|
|
32
|
+
"format": "zip",
|
|
33
|
+
"path": "clang_format/data/bin/clang-format"
|
|
34
|
+
},
|
|
35
|
+
"macos-x86_64": {
|
|
36
|
+
"size": 1440163,
|
|
37
|
+
"hash": "sha256",
|
|
38
|
+
"digest": "00498efb43d60d7ac4195362009a79936d26145a9a90cdfa7a6013a62ab3c40c",
|
|
39
|
+
"providers": [{"type": "http", "url": "https://files.pythonhosted.org/packages/7d/97/0bb5a6866dfb5f55f7e6ca79466cb0b0081fccbc9f57887949ff23b5c38a/clang_format-21.1.2-py2.py3-none-macosx_10_9_x86_64.whl"}],
|
|
40
|
+
"format": "zip",
|
|
41
|
+
"path": "clang_format/data/bin/clang-format"
|
|
42
|
+
},
|
|
43
|
+
"windows-x86_64": {
|
|
44
|
+
"size": 1426244,
|
|
45
|
+
"hash": "sha256",
|
|
46
|
+
"digest": "c98e195a50c0fa40bb058449511b1b681ca7ad553579aa32425f0cfeca8d81ce",
|
|
47
|
+
"providers": [{"type": "http", "url": "https://files.pythonhosted.org/packages/fe/0d/3b9c6a41a9eed2d45431d91c0e8608da315cd44d0c24c517bfb686db4b6b/clang_format-21.1.2-py2.py3-none-win_amd64.whl"}],
|
|
48
|
+
"format": "zip",
|
|
49
|
+
"path": "clang_format/data/bin/clang-format.exe"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @noflow
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
const {findMetaTool, REPO_ROOT} = require('./format-utils');
|
|
14
|
+
const {spawnSync} = require('node:child_process');
|
|
15
|
+
const fs = require('node:fs');
|
|
16
|
+
const path = require('node:path');
|
|
17
|
+
const {globSync} = require('glob');
|
|
18
|
+
|
|
19
|
+
const OSS_CLANG_FORMAT_DOTSLASH = path.join(__dirname, 'clang-format');
|
|
20
|
+
const GENERATED_MARKER = Buffer.from('@' + 'generated');
|
|
21
|
+
const MAX_HEADER_BYTES = 4096;
|
|
22
|
+
const MAX_FILES_PER_PROCESS = 30;
|
|
23
|
+
const SOURCE_GLOB = '**/*.{c,cc,cpp,cu,cuh,cxx,h,hh,hpp,hxx,m,mm,proto,tcc}';
|
|
24
|
+
const IGNORE = [
|
|
25
|
+
'**/.cxx/**',
|
|
26
|
+
'**/build/**',
|
|
27
|
+
'**/node_modules/**',
|
|
28
|
+
'**/Pods/**',
|
|
29
|
+
'lib/**',
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
function findClangFormat() {
|
|
33
|
+
if (process.env.CLANG_FORMAT != null && process.env.CLANG_FORMAT !== '') {
|
|
34
|
+
return {command: process.env.CLANG_FORMAT, prefixArguments: []};
|
|
35
|
+
}
|
|
36
|
+
return (
|
|
37
|
+
findMetaTool('tools', 'third-party', 'clang-format', 'clang-format') ?? {
|
|
38
|
+
command: require('fb-dotslash'),
|
|
39
|
+
prefixArguments: [OSS_CLANG_FORMAT_DOTSLASH],
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function isGenerated(file) {
|
|
45
|
+
let fd;
|
|
46
|
+
try {
|
|
47
|
+
fd = fs.openSync(path.resolve(REPO_ROOT, file), 'r');
|
|
48
|
+
const header = Buffer.alloc(MAX_HEADER_BYTES);
|
|
49
|
+
const bytesRead = fs.readSync(fd, header, 0, header.length, 0);
|
|
50
|
+
return header.subarray(0, bytesRead).includes(GENERATED_MARKER);
|
|
51
|
+
} catch (error) {
|
|
52
|
+
console.warn(`Unable to inspect ${file}: ${String(error)}`);
|
|
53
|
+
return false;
|
|
54
|
+
} finally {
|
|
55
|
+
if (fd != null) {
|
|
56
|
+
fs.closeSync(fd);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function main() {
|
|
62
|
+
const check = process.argv.includes('--check');
|
|
63
|
+
const files = globSync(SOURCE_GLOB, {
|
|
64
|
+
cwd: REPO_ROOT,
|
|
65
|
+
ignore: IGNORE,
|
|
66
|
+
}).filter(file => !isGenerated(file));
|
|
67
|
+
const clangFormat = findClangFormat();
|
|
68
|
+
let exitStatus = 0;
|
|
69
|
+
|
|
70
|
+
for (let index = 0; index < files.length; index += MAX_FILES_PER_PROCESS) {
|
|
71
|
+
const result = spawnSync(
|
|
72
|
+
clangFormat.command,
|
|
73
|
+
[
|
|
74
|
+
...clangFormat.prefixArguments,
|
|
75
|
+
...(check ? ['--dry-run', '--Werror'] : ['-i']),
|
|
76
|
+
...files.slice(index, index + MAX_FILES_PER_PROCESS),
|
|
77
|
+
],
|
|
78
|
+
{cwd: REPO_ROOT, stdio: 'inherit'},
|
|
79
|
+
);
|
|
80
|
+
if (result.error != null) {
|
|
81
|
+
throw result.error;
|
|
82
|
+
}
|
|
83
|
+
if (result.signal != null) {
|
|
84
|
+
throw new Error(`clang-format was terminated by ${result.signal}`);
|
|
85
|
+
}
|
|
86
|
+
if (result.status !== 0) {
|
|
87
|
+
exitStatus = result.status ?? 1;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
process.exitCode = exitStatus;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
main();
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @noflow
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
const {findJava, REPO_ROOT} = require('./format-utils');
|
|
14
|
+
const {spawnSync} = require('node:child_process');
|
|
15
|
+
const fs = require('node:fs');
|
|
16
|
+
const path = require('node:path');
|
|
17
|
+
const {globSync} = require('glob');
|
|
18
|
+
|
|
19
|
+
const GENERATED_MARKER = Buffer.from('@' + 'generated');
|
|
20
|
+
const MAX_HEADER_BYTES = 4096;
|
|
21
|
+
const MAX_FILES_PER_PROCESS = 100;
|
|
22
|
+
|
|
23
|
+
function isGenerated(file) {
|
|
24
|
+
let fd;
|
|
25
|
+
try {
|
|
26
|
+
fd = fs.openSync(path.resolve(REPO_ROOT, file), 'r');
|
|
27
|
+
const header = Buffer.alloc(MAX_HEADER_BYTES);
|
|
28
|
+
const bytesRead = fs.readSync(fd, header, 0, header.length, 0);
|
|
29
|
+
return header.subarray(0, bytesRead).includes(GENERATED_MARKER);
|
|
30
|
+
} catch (error) {
|
|
31
|
+
console.warn(`Unable to inspect ${file}: ${String(error)}`);
|
|
32
|
+
return false;
|
|
33
|
+
} finally {
|
|
34
|
+
if (fd != null) {
|
|
35
|
+
fs.closeSync(fd);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function main() {
|
|
41
|
+
const check = process.argv.includes('--check');
|
|
42
|
+
const ktfmt =
|
|
43
|
+
process.env.KTFMT != null && process.env.KTFMT !== ''
|
|
44
|
+
? {command: process.env.KTFMT, prefixArguments: []}
|
|
45
|
+
: (() => {
|
|
46
|
+
const java = findJava(17);
|
|
47
|
+
if (java == null) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
'Kotlin formatting requires Java 17 or newer. Install a JDK or set JAVA=/path/to/java.',
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const jar =
|
|
53
|
+
process.env.KTFMT_JAR != null && process.env.KTFMT_JAR !== ''
|
|
54
|
+
? process.env.KTFMT_JAR
|
|
55
|
+
: require.resolve('ktfmt/lib/ktfmt.jar');
|
|
56
|
+
return {command: java, prefixArguments: ['-jar', jar]};
|
|
57
|
+
})();
|
|
58
|
+
const files = globSync('**/*.{kt,kts}', {
|
|
59
|
+
cwd: REPO_ROOT,
|
|
60
|
+
ignore: ['**/.gradle/**', '**/build/**', '**/node_modules/**'],
|
|
61
|
+
}).filter(file => !isGenerated(file));
|
|
62
|
+
let exitStatus = 0;
|
|
63
|
+
|
|
64
|
+
for (let index = 0; index < files.length; index += MAX_FILES_PER_PROCESS) {
|
|
65
|
+
const result = spawnSync(
|
|
66
|
+
ktfmt.command,
|
|
67
|
+
[
|
|
68
|
+
...ktfmt.prefixArguments,
|
|
69
|
+
'--do-not-remove-unused-imports',
|
|
70
|
+
...(check ? ['--dry-run', '--set-exit-if-changed'] : []),
|
|
71
|
+
...files.slice(index, index + MAX_FILES_PER_PROCESS),
|
|
72
|
+
],
|
|
73
|
+
{cwd: REPO_ROOT, stdio: 'inherit'},
|
|
74
|
+
);
|
|
75
|
+
if (result.error != null) {
|
|
76
|
+
throw result.error;
|
|
77
|
+
}
|
|
78
|
+
if (result.signal != null) {
|
|
79
|
+
throw new Error(`ktfmt was terminated by ${result.signal}`);
|
|
80
|
+
}
|
|
81
|
+
if (result.status !== 0) {
|
|
82
|
+
exitStatus = result.status ?? 1;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
process.exitCode = exitStatus;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
main();
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @noflow
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
const {findMetaTool, REPO_ROOT} = require('./format-utils');
|
|
14
|
+
const {spawnSync} = require('node:child_process');
|
|
15
|
+
const fs = require('node:fs');
|
|
16
|
+
const path = require('node:path');
|
|
17
|
+
const {globSync} = require('glob');
|
|
18
|
+
|
|
19
|
+
const RUFF_VERSION = '0.14.0';
|
|
20
|
+
const RUFF_ROOT = path.join(
|
|
21
|
+
REPO_ROOT,
|
|
22
|
+
'node_modules',
|
|
23
|
+
'.cache',
|
|
24
|
+
'yoga-format',
|
|
25
|
+
`ruff-${RUFF_VERSION}`,
|
|
26
|
+
);
|
|
27
|
+
const PYTHON_GLOB = '**/*.py';
|
|
28
|
+
const IGNORE = ['**/build/**', '**/node_modules/**'];
|
|
29
|
+
|
|
30
|
+
function run(command, arguments_, options = {}) {
|
|
31
|
+
const result = spawnSync(command, arguments_, {
|
|
32
|
+
cwd: REPO_ROOT,
|
|
33
|
+
stdio: options.quiet === true ? 'ignore' : 'inherit',
|
|
34
|
+
...options,
|
|
35
|
+
env: {...(options.env ?? process.env), PWD: REPO_ROOT},
|
|
36
|
+
});
|
|
37
|
+
if (result.error != null) {
|
|
38
|
+
if (
|
|
39
|
+
options.allowMissingCommand === true &&
|
|
40
|
+
result.error.code === 'ENOENT'
|
|
41
|
+
) {
|
|
42
|
+
return 1;
|
|
43
|
+
}
|
|
44
|
+
throw result.error;
|
|
45
|
+
}
|
|
46
|
+
if (result.signal != null) {
|
|
47
|
+
throw new Error(`${command} was terminated by ${result.signal}`);
|
|
48
|
+
}
|
|
49
|
+
return result.status ?? 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function findPython() {
|
|
53
|
+
const candidates =
|
|
54
|
+
process.platform === 'win32'
|
|
55
|
+
? [
|
|
56
|
+
['py', ['-3']],
|
|
57
|
+
['python', []],
|
|
58
|
+
]
|
|
59
|
+
: [
|
|
60
|
+
['python3', []],
|
|
61
|
+
['python', []],
|
|
62
|
+
];
|
|
63
|
+
return (
|
|
64
|
+
candidates.find(
|
|
65
|
+
([command, prefixArguments]) =>
|
|
66
|
+
run(
|
|
67
|
+
command,
|
|
68
|
+
[
|
|
69
|
+
...prefixArguments,
|
|
70
|
+
'-c',
|
|
71
|
+
'import sys; raise SystemExit(sys.version_info.major != 3)',
|
|
72
|
+
],
|
|
73
|
+
{allowMissingCommand: true, quiet: true},
|
|
74
|
+
) === 0,
|
|
75
|
+
) ?? null
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function runRuff(command, prefixArguments, check, environment) {
|
|
80
|
+
const files = globSync(PYTHON_GLOB, {cwd: REPO_ROOT, ignore: IGNORE});
|
|
81
|
+
return run(
|
|
82
|
+
command,
|
|
83
|
+
[...prefixArguments, 'format', ...(check ? ['--check'] : []), ...files],
|
|
84
|
+
{env: environment},
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function main() {
|
|
89
|
+
const check = process.argv.includes('--check');
|
|
90
|
+
if (process.env.RUFF != null && process.env.RUFF !== '') {
|
|
91
|
+
process.exitCode = runRuff(process.env.RUFF, [], check, process.env);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const metaRuff = findMetaTool('tools', 'third-party', 'ruff', 'ruff');
|
|
96
|
+
if (metaRuff != null) {
|
|
97
|
+
process.exitCode = runRuff(
|
|
98
|
+
metaRuff.command,
|
|
99
|
+
metaRuff.prefixArguments,
|
|
100
|
+
check,
|
|
101
|
+
process.env,
|
|
102
|
+
);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const python = findPython();
|
|
107
|
+
if (python == null) {
|
|
108
|
+
throw new Error('Python formatting requires Python 3 with pip.');
|
|
109
|
+
}
|
|
110
|
+
const [command, prefixArguments] = python;
|
|
111
|
+
const pythonPath = [RUFF_ROOT, process.env.PYTHONPATH]
|
|
112
|
+
.filter(Boolean)
|
|
113
|
+
.join(path.delimiter);
|
|
114
|
+
const environment = {...process.env, PYTHONPATH: pythonPath};
|
|
115
|
+
if (
|
|
116
|
+
run(
|
|
117
|
+
command,
|
|
118
|
+
[
|
|
119
|
+
...prefixArguments,
|
|
120
|
+
'-c',
|
|
121
|
+
`from importlib.metadata import version; raise SystemExit(version('ruff') != '${RUFF_VERSION}')`,
|
|
122
|
+
],
|
|
123
|
+
{env: environment, quiet: true},
|
|
124
|
+
) !== 0
|
|
125
|
+
) {
|
|
126
|
+
fs.mkdirSync(RUFF_ROOT, {recursive: true});
|
|
127
|
+
const installStatus = run(command, [
|
|
128
|
+
...prefixArguments,
|
|
129
|
+
'-m',
|
|
130
|
+
'pip',
|
|
131
|
+
'install',
|
|
132
|
+
'--disable-pip-version-check',
|
|
133
|
+
'--only-binary=:all:',
|
|
134
|
+
`--target=${RUFF_ROOT}`,
|
|
135
|
+
`ruff==${RUFF_VERSION}`,
|
|
136
|
+
]);
|
|
137
|
+
if (installStatus !== 0) {
|
|
138
|
+
process.exitCode = installStatus;
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
process.exitCode = runRuff(
|
|
143
|
+
command,
|
|
144
|
+
[...prefixArguments, '-m', 'ruff'],
|
|
145
|
+
check,
|
|
146
|
+
environment,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
main();
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @noflow
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
const {spawnSync} = require('node:child_process');
|
|
14
|
+
const fs = require('node:fs');
|
|
15
|
+
const path = require('node:path');
|
|
16
|
+
|
|
17
|
+
const REPO_ROOT = path.resolve(__dirname, '..');
|
|
18
|
+
const FBSOURCE_ROOT = path.resolve(REPO_ROOT, '../..');
|
|
19
|
+
|
|
20
|
+
function findMetaTool(...relativePath) {
|
|
21
|
+
const manifest = path.join(FBSOURCE_ROOT, ...relativePath);
|
|
22
|
+
const dotslash = ['/usr/bin/dotslash', '/usr/local/bin/dotslash'].find(
|
|
23
|
+
candidate => fs.existsSync(candidate),
|
|
24
|
+
);
|
|
25
|
+
return dotslash != null && fs.existsSync(manifest)
|
|
26
|
+
? {command: dotslash, prefixArguments: [manifest]}
|
|
27
|
+
: null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function javaMajorVersion(command) {
|
|
31
|
+
const result = spawnSync(command, ['-version'], {encoding: 'utf8'});
|
|
32
|
+
const output = `${result.stdout ?? ''}\n${result.stderr ?? ''}`;
|
|
33
|
+
const version = /version "(?:1\.)?(\d+)/.exec(output);
|
|
34
|
+
return result.status === 0 && version != null ? Number(version[1]) : null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function findJava(minimumVersion) {
|
|
38
|
+
if (process.env.JAVA != null && process.env.JAVA !== '') {
|
|
39
|
+
const version = javaMajorVersion(process.env.JAVA);
|
|
40
|
+
if (version == null) {
|
|
41
|
+
throw new Error(
|
|
42
|
+
`JAVA=${process.env.JAVA} did not run or report a recognizable Java version.`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
if (version < minimumVersion) {
|
|
46
|
+
throw new Error(
|
|
47
|
+
`JAVA=${process.env.JAVA} is Java ${version}; Java ${minimumVersion} or newer is required.`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
return process.env.JAVA;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const candidates = ['java'];
|
|
54
|
+
if (process.platform === 'darwin') {
|
|
55
|
+
for (const version of [17, 21]) {
|
|
56
|
+
const result = spawnSync(
|
|
57
|
+
'/usr/libexec/java_home',
|
|
58
|
+
['-v', String(version)],
|
|
59
|
+
{
|
|
60
|
+
encoding: 'utf8',
|
|
61
|
+
},
|
|
62
|
+
);
|
|
63
|
+
if (result.status === 0 && result.stdout.trim() !== '') {
|
|
64
|
+
candidates.unshift(path.join(result.stdout.trim(), 'bin', 'java'));
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
candidates.unshift(
|
|
69
|
+
'/usr/local/java-runtime/impl/17/bin/java',
|
|
70
|
+
'/usr/local/java-runtime/17/bin/java',
|
|
71
|
+
'/usr/local/java-runtime/impl/21/bin/java',
|
|
72
|
+
'/usr/local/java-runtime/21/bin/java',
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
candidates.find(command => javaMajorVersion(command) >= minimumVersion) ??
|
|
78
|
+
null
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
module.exports = {findJava, findMetaTool, REPO_ROOT};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
#
|
|
4
|
+
# This source code is licensed under the MIT license found in the
|
|
5
|
+
# LICENSE file in the root directory of this source tree.
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import re
|
|
9
|
+
import sys
|
|
10
|
+
|
|
11
|
+
os.chdir(os.path.dirname(__file__))
|
|
12
|
+
|
|
13
|
+
if len(sys.argv) != 2:
|
|
14
|
+
print("usage: ./set-version <version>", file=sys.stderr)
|
|
15
|
+
sys.exit(1)
|
|
16
|
+
|
|
17
|
+
version = sys.argv[1]
|
|
18
|
+
|
|
19
|
+
with open("gradle.properties", "r+") as f:
|
|
20
|
+
new_contents = re.sub(r"VERSION_NAME=.*", f"VERSION_NAME={version}", f.read())
|
|
21
|
+
f.seek(0)
|
|
22
|
+
f.truncate()
|
|
23
|
+
f.write(new_contents)
|
|
24
|
+
|
|
25
|
+
with open("javascript/package.json", "r+") as f:
|
|
26
|
+
new_contents = re.sub(r'"version": ".*",', f'"version": "{version}",', f.read())
|
|
27
|
+
f.seek(0)
|
|
28
|
+
f.truncate()
|
|
29
|
+
f.write(new_contents)
|
|
30
|
+
|
|
31
|
+
with open("website/package.json", "r+") as f:
|
|
32
|
+
new_contents = re.sub(
|
|
33
|
+
r'"yoga-layout": ".*"', f'"yoga-layout": "{version}"', f.read()
|
|
34
|
+
)
|
|
35
|
+
f.seek(0)
|
|
36
|
+
f.truncate()
|
|
37
|
+
f.write(new_contents)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
pluginManagement {
|
|
9
|
+
repositories {
|
|
10
|
+
gradlePluginPortal()
|
|
11
|
+
mavenCentral()
|
|
12
|
+
google()
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
plugins { id("com.gradle.enterprise").version("3.7.1") }
|
|
17
|
+
|
|
18
|
+
include(":yoga")
|
|
19
|
+
|
|
20
|
+
project(":yoga").projectDir = file("java")
|
|
21
|
+
|
|
22
|
+
gradleEnterprise {
|
|
23
|
+
buildScan {
|
|
24
|
+
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
|
25
|
+
termsOfServiceAgree = "yes"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
rootProject.name = "yoga-github"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#include <stdexcept>
|
|
9
|
+
|
|
10
|
+
#include <gtest/gtest.h>
|
|
11
|
+
|
|
12
|
+
namespace facebook::yoga {
|
|
13
|
+
|
|
14
|
+
class Config;
|
|
15
|
+
class Node;
|
|
16
|
+
|
|
17
|
+
[[noreturn]] void fatalWithMessage(const char* message);
|
|
18
|
+
void assertFatal(bool condition, const char* message);
|
|
19
|
+
void assertFatalWithNode(
|
|
20
|
+
const yoga::Node* node,
|
|
21
|
+
bool condition,
|
|
22
|
+
const char* message);
|
|
23
|
+
void assertFatalWithConfig(
|
|
24
|
+
const yoga::Config* config,
|
|
25
|
+
bool condition,
|
|
26
|
+
const char* message);
|
|
27
|
+
|
|
28
|
+
namespace {
|
|
29
|
+
|
|
30
|
+
template <typename Callback>
|
|
31
|
+
void expectLogicErrorMessage(Callback callback, const char* expectedMessage) {
|
|
32
|
+
try {
|
|
33
|
+
callback();
|
|
34
|
+
FAIL() << "Expected std::logic_error";
|
|
35
|
+
} catch (const std::logic_error& error) {
|
|
36
|
+
EXPECT_STREQ(error.what(), expectedMessage);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
} // namespace
|
|
41
|
+
|
|
42
|
+
TEST(AssertFatalTest, testFatalWithMessageThrowsLogicErrorMessage) {
|
|
43
|
+
expectLogicErrorMessage(
|
|
44
|
+
[] { fatalWithMessage("fatal message"); }, "fatal message");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
TEST(AssertFatalTest, testAssertFatalFalseThrowsLogicErrorMessage) {
|
|
48
|
+
expectLogicErrorMessage(
|
|
49
|
+
[] { assertFatal(false, "global failure"); }, "global failure");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
TEST(AssertFatalTest, testAssertFatalWithNodeFalseThrowsLogicErrorMessage) {
|
|
53
|
+
expectLogicErrorMessage(
|
|
54
|
+
[] { assertFatalWithNode(nullptr, false, "node failure"); },
|
|
55
|
+
"node failure");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
TEST(AssertFatalTest, testAssertFatalWithConfigFalseThrowsLogicErrorMessage) {
|
|
59
|
+
expectLogicErrorMessage(
|
|
60
|
+
[] { assertFatalWithConfig(nullptr, false, "config failure"); },
|
|
61
|
+
"config failure");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
TEST(AssertFatalTest, testPassingConditionsDoNotThrow) {
|
|
65
|
+
EXPECT_NO_THROW(assertFatal(true, "global success"));
|
|
66
|
+
EXPECT_NO_THROW(assertFatalWithNode(nullptr, true, "node success"));
|
|
67
|
+
EXPECT_NO_THROW(assertFatalWithConfig(nullptr, true, "config success"));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
} // namespace facebook::yoga
|