#testing #running #general-purpose

no-std dev test_tools

Tools for writing and running tests

20 releases (breaking)

0.16.0 Jun 21, 2025
0.14.0 Apr 16, 2025
0.11.0 Oct 30, 2024
0.9.0 May 11, 2024
0.1.5 Jul 15, 2022

#2822 in Algorithms

Download history 350/week @ 2025-06-18 166/week @ 2025-06-25 139/week @ 2025-07-02 72/week @ 2025-07-09 80/week @ 2025-07-16 101/week @ 2025-07-23 60/week @ 2025-07-30 73/week @ 2025-08-06 31/week @ 2025-08-13 228/week @ 2025-08-20 243/week @ 2025-08-27 416/week @ 2025-09-03 242/week @ 2025-09-10 162/week @ 2025-09-17 274/week @ 2025-09-24 296/week @ 2025-10-01

1,023 downloads per month
Used in 111 crates

MIT license

94KB
1.5K SLoC

Module :: test_tools

experimental rust-status docs.rs Open in Gitpod discord

Tools for writing and running tests.

Basic use-case

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

cargo add test_tools --dev

Try out from the repository

git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/test_trivial
cargo run

Sample

discord Open in Gitpod docs.rs

Dependencies

~1.7–5.5MB
~103K SLoC