diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-28 16:16:39 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-28 16:16:39 +0000 |
commit | 714b29d53626279211108bb74b1ee17af3378ba2 (patch) | |
tree | 7fcd35ff92b7d412fdee86b26ca803e64cf1df60 /tests/README.md | |
parent | 4ca06cb8436b3e7e5b7ca59d2aaf7213bd0c8d25 (diff) | |
parent | 97174d06e99fa6c8332d88be9224d612439b3e20 (diff) | |
download | pin-project-lite-android13-frc-neuralnetworks-release.tar.gz |
Snap for 8512216 from 97174d06e99fa6c8332d88be9224d612439b3e20 to tm-frc-neuralnetworks-releaset_frc_neu_330443030t_frc_neu_330443000android13-frc-neuralnetworks-release
Change-Id: I4bdab1aa608633fa4e11006ad2fccd7438db32c5
Diffstat (limited to 'tests/README.md')
-rw-r--r-- | tests/README.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..4721616 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,46 @@ +# Tests + +Many of the tests in this repository are based on [pin-project's tests](https://github.com/taiki-e/pin-project/tree/HEAD/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 pin-project's [examples](https://github.com/taiki-e/pin-project/tree/HEAD/examples) +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). |