Crates.io | crate-compile-test |
lib.rs | crate-compile-test |
version | 0.2.0 |
source | src |
created_at | 2018-05-07 21:03:36.379522 |
updated_at | 2018-05-21 20:56:41.132323 |
description | Crate Compilation Test helper |
homepage | |
repository | https://github.com/denzp/rust-crate-compile-test |
max_upload_size | |
id | 64196 |
size | 30,204 |
Swiss army knife for
proc-macro
crates testing.
The library was highly inspired by laumann/compiletest-rs, and it's origin Rust's compiletest. Difference between them and this library is that latter lets to test whole crates instead of single compilation units.
This can be useful if your proc-macro
uses cargo (or xargo) or you want to test more complex scenarios.
There is a lot of work needs to be done, to get feature parity with the other Rust compilation testing libs, currently planned only:
No third party tools are needed. Just add the library to dev-dependencies
:
[dev-dependencies]
crate-compile-test = "0.1"
The example usage can be found at example
directory.
Expected messages specification is similar to original compiletest's specification, with small addition - you can specify either error code or error message:
use mod2::func3; //~ ERROR unresolved import `mod2::func3`
fn func2() -> NonExistingType {
0
}
//~^^^ ERROR E0433
TBD