tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 231Rust 8TOML 3CSS 1317 Sutichaykuna

⎇ 7e8d5b1d733ed84c0db8e8d359f84df371bdaadc scripts/import-yoga-tests/README.md Markdown · 13 siq'ikuna · 1.2 KB Ñawpa willay ch'uya

Import yoga tests (#320) e05b9093d · Nico Burns ·

1# Import Yoga Tests script
2
3This is a rough and ready script for the purpose of syncing test fixtures from the [Yoga](https://github.com/facebook/yoga/) which Taffy's predecessor Stretch was originally descended from, and whose tests are compatible with Taffy's generated test infrastructure.
4
5## Usage
6
7- Clone the [yoga](https://github.com/facebook/yoga/) repo locally
8- Set the `YOGA_FIXTURE_DIR` environment variable to the absolute path of `gentest/fixtures` directory within your local copy of the repo
9- Run `cargo run` in this directory (or `cargo import-yoga-tests` in the root directory of the Taffy repo)
10- Manually inspect the imported tests (if any - there may not be any new tests since the last sync) to check that they make sense for Taffy (and that they're not for example testing features we don't implement)
11- Run `cargo gentest` in the root directory of the Taffy repo to generate actual tests from the fixtures
12- Run `cargo test` to ensure that the new tests pass
13- If any tests do not pass, either fix them or prefix the fixture file with an `x` to disable it (e.g. `align_content_stretch.html` would become `xalign_content_stretch.html`) and rerun `cargo gentest` to automatically remove the generated tests for that fixture.

README.md

Import Yoga Tests script

This is a rough and ready script for the purpose of syncing test fixtures from the Yoga which Taffy's predecessor Stretch was originally descended from, and whose tests are compatible with Taffy's generated test infrastructure.

Usage