#testing #general-purpose #fundamental

no-std dev test_tools

Tools for writing and running tests

12 releases (6 breaking)

new 0.8.0 Mar 16, 2024
0.6.0 Mar 1, 2024
0.5.0 Oct 29, 2023
0.1.5 Jul 15, 2022

#2347 in Development tools

Download history 140/week @ 2023-11-22 49/week @ 2023-11-29 72/week @ 2023-12-06 138/week @ 2023-12-13 115/week @ 2023-12-20 26/week @ 2023-12-27 50/week @ 2024-01-03 144/week @ 2024-01-10 90/week @ 2024-01-17 36/week @ 2024-01-24 34/week @ 2024-01-31 71/week @ 2024-02-07 121/week @ 2024-02-14 78/week @ 2024-02-21 296/week @ 2024-02-28 112/week @ 2024-03-06

631 downloads per month
Used in 74 crates

MIT license

110KB
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
~125K SLoC