Crate generic_tests[][src]

Support for generic test definitions with a procedural attribute macro.

The define macro provided by this crate allows the test writer to reuse code between test cases or benchmarks that use the same test protocol with different types under test. As in general programming with Rust, this is achieved by using generic parameters and trait bounds. Generic test functions in a module processed by the define macro are annotated with attributes consumed by the test framework, such as test or bench, however the actual test cases can be instantiated in multiple submodules annotated with the instantiate_tests attribute providing specific argument types for the tests.

Attribute Macros

define

Populates a module tree with test cases parameterizing generic definitions.