Remove commented-out duplicate code in YGMeasureTest (#1927)
Summary: Remove three commented-out
YGNodeSetMeasureFunccalls intests/YGMeasureTest.cppthat are exact duplicates of the active calls on adjacent lines.All three were introduced in commit
fbd332d(2017-12-19) and left behind when the active lines were later updated by other authors. Each commented-out line sits directly next to its active duplicate:
- Line 248 (commented) / line 249 (active)
- Line 337 (commented) / line 336 (active)
- Line 376 (commented) / line 377 (active)
Pull Request resolved: https://github.com/facebook/yoga/pull/1927
Test Plan:
- No behavioral changes — only removes dead commented-out code
- The active
YGNodeSetMeasureFunccalls remain unchangedReviewed By: NickGerleman
Differential Revision: D100144096
Pulled By: fabriziocucci
fbshipit-source-id: 3fed15a5dc9fde0fa653e559fc0a2de2f1ce315b
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Yoga

Yoga is an embeddable and performant flexbox layout engine with bindings for multiple languages.
Building
Yoga’s main implementation targets C++ 20 with accompanying build logic in CMake. A wrapper is provided to build the main library and run unit tests.
While not required, this script will use ninja if it is installed for faster builds.
Yoga is additionally part of the vcpkg collection of ports maintained by Microsoft and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.
Adding Tests
Many of Yoga’s tests are automatically generated, using HTML fixtures describing node structure. These are rendered in Chrome to generate an expected layout result for the tree. New fixtures can be added to
gentest/fixtures.To generate new tests from added fixtures:
yarn installto install dependencies for the test generator.yarn gentestin theyogadirectory.Debugging
Yoga provides a VSCode “launch.json” configuration which allows debugging unit tests. Simply add your breakpoints, and run “Debug C++ Unit tests (lldb)” (or “Debug C++ Unit tests (vsdbg)” on Windows).