<!-- {{# generate.module_header{} #}} -->
# Module :: test_tools
<!--{ generate.module_header.start() }-->
[](https://github.com/emersion/stability-badges#experimental) [](https://github.com/Wandalen/wTools/actions/workflows/module_test_tools_push.yml) [](https://docs.rs/test_tools) [](https://gitpod.io/#RUN_PATH=.,SAMPLE_FILE=module%2Fcore%2Ftest_tools%2Fexamples%2Ftest_tools_trivial.rs,RUN_POSTFIX=--example%20module%2Fcore%2Ftest_tools%2Fexamples%2Ftest_tools_trivial.rs/https://github.com/Wandalen/wTools) [](https://discord.gg/m3YfbXpUUY)
<!--{ generate.module_header.end }-->
Tools for writing and running tests.
### Basic use-case
<!-- {{# generate.module{} #}} -->
```rust
use test_tools::*;
#[ cfg( feature = "enabled" ) ]
#[ cfg( not( feature = "no_std" ) ) ]
tests_impls!
{
fn pass1()
{
assert_eq!( true, true );
}
//
fn pass2()
{
assert_eq!( 1, 1 );
}
}
//
#[ cfg( feature = "enabled" ) ]
#[ cfg( not( feature = "no_std" ) ) ]
tests_index!
{
pass1,
pass2,
}
```
### To add to your project
```sh
cargo add test_tools --dev
```
### Try out from the repository
```sh
git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/test_trivial
cargo run
```
# Sample
[](https://discord.gg/m3YfbXpUUY)
[](https://gitpod.io/#RUN_PATH=sample%2Frust%2Ftest_tools_trivial,SAMPLE_FILE=.%2Fsrc%2Fmain.rs/https://github.com/Wandalen/wTools)
[](https://docs.rs/test_tools)