18 releases (breaking)

new 0.14.0 Apr 16, 2025
0.12.0 Apr 5, 2025
0.11.0 Oct 30, 2024
0.9.0 May 11, 2024
0.1.5 Jul 15, 2022

#2446 in Algorithms

Download history 21/week @ 2024-12-27 15/week @ 2025-01-03 37/week @ 2025-01-10 40/week @ 2025-01-17 26/week @ 2025-01-24 16/week @ 2025-01-31 46/week @ 2025-02-07 101/week @ 2025-02-14 35/week @ 2025-02-21 34/week @ 2025-02-28 28/week @ 2025-03-07 51/week @ 2025-03-14 16/week @ 2025-03-21 10/week @ 2025-03-28 139/week @ 2025-04-04 274/week @ 2025-04-11

442 downloads per month
Used in 96 crates

MIT license

48KB
913 lines

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.5–9.5MB
~86K SLoC