diff options
author | David LeGare <legare@google.com> | 2022-03-02 21:37:58 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-03-02 21:37:58 +0000 |
commit | 365fe11dc7cf47ae04d945af513246d19dfc00e8 (patch) | |
tree | 80c46c7f97eb0158db00b2c4710dd54073c36733 /tests/README.md | |
parent | 23cdec702c0235804c847247f16c7bc73f9d9fce (diff) | |
parent | ac81d17ea0cce1b865bbecae5677eeef7b1703e4 (diff) | |
download | pin-project-365fe11dc7cf47ae04d945af513246d19dfc00e8.tar.gz |
Update pin-project to 1.0.10 am: 8915193b0d am: ac81d17ea0
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/pin-project/+/2005953
Change-Id: I44e3dfdc6c005d46e30a740e77bb74955ccdfbd8
Diffstat (limited to 'tests/README.md')
-rw-r--r-- | tests/README.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..b109e71 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,44 @@ +# Tests + +To run all tests, run the following command: + +```sh +cargo +nightly test --all +``` + +## UI tests (`ui`, `compiletest.rs`) + +This checks errors detected by the macro or the Rust compiler in the resulting +expanded code. + +To run this test, run the following command: + +```sh +cargo +nightly test --test compiletest +``` + +Locally, this test updates the files in the `ui` directory if there are +changes to the generated code. If there are any changes to the files in the +`ui` directory after running the test, please commit them. + +See also [`trybuild` documentation](https://docs.rs/trybuild). + +## Expansion tests (`expand`, `expandtest.rs`) + +Similar to ui tests, but instead of checking the compiler output, this checks +the code generated by macros. + +See [examples](../examples/README.md) for descriptions of what the generated +code does, and why it needs to be generated. + +To run this test, run the following command: + +```sh +cargo +nightly test --test expandtest +``` + +Locally, this test updates the files in the `expand` directory if there are +changes to the generated code. If there are any changes to the files in the +`expand` directory after running the test, please commit them. + +See also [`macrotest` documentation](https://docs.rs/macrotest). |