tryexpand
Similar to trybuild, but allows you to test how declarative or procedural macros are expanded.
Documentation
Please refer to the documentation on docs.rs.
Usage
Install Rust and cargo expand.
Add to your crate's Cargo.toml:
[]
= "0.1.0"
Under your crate's tests/ directory, create tests.rs file containing the following code:
Populate the tests/expand_pass//tests/expand_fail/ directories with Rust source files.
Each source file is a macro expansion test case.
See tests/macro-tests and tests/proc-macro-tests for the reference.
Contributing
Please read CONTRIBUTING.md for details on our code of conduct,
and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the MIT or Apache-2.0 – see the LICENSE-MIT.md/LICENSE-APACHE.md files for details.
Provenance
The tryexpand crate originated as a fork of eupn's macrotest (crates.io).