#testing #general-purpose #fundamental

no-std dev test_tools

Tools for writing and running tests

13 releases (7 breaking)

new 0.9.0 May 11, 2024
0.8.0 Mar 16, 2024
0.7.0 Mar 16, 2024
0.5.0 Oct 29, 2023
0.1.5 Jul 15, 2022

#2120 in Development tools

Download history 57/week @ 2024-01-19 49/week @ 2024-01-26 37/week @ 2024-02-02 84/week @ 2024-02-09 112/week @ 2024-02-16 109/week @ 2024-02-23 262/week @ 2024-03-01 121/week @ 2024-03-08 451/week @ 2024-03-15 186/week @ 2024-03-22 217/week @ 2024-03-29 255/week @ 2024-04-05 133/week @ 2024-04-12 137/week @ 2024-04-19 133/week @ 2024-04-26 100/week @ 2024-05-03

643 downloads per month
Used in 76 crates

MIT license

120KB
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

~3–12MB
~124K SLoC