Open 0x-r4bbit opened 9 years ago
We don't have any yet. But there are several convenient ways to write tests in Rust. We can use cargo integration tests by adding a tests/
directory, unit level testing via a mod tests { }
or function level testing with #[test]
directive (or a combination of all three). Some good reading on the subject is can be found the relevant section of the book.
It's all relatively easy...just time consuming.
Also as of clap
v1.0.0 arguments can be parsed from arbitrary locations (i.e. simulated command line usage), meaning we could even add CLI testing.
Couldn't find any tests in the source yet (if there are any, please point me to them). Is there already a convenient way of writing (unit) tests for Rust libraries?