#testing #general-purpose #fundamental

no-std dev test_tools

Tools for writing and running tests

12 releases (6 breaking)

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

#2344 in Development tools

Download history 139/week @ 2023-12-18 47/week @ 2023-12-25 23/week @ 2024-01-01 150/week @ 2024-01-08 91/week @ 2024-01-15 40/week @ 2024-01-22 34/week @ 2024-01-29 63/week @ 2024-02-05 117/week @ 2024-02-12 63/week @ 2024-02-19 304/week @ 2024-02-26 119/week @ 2024-03-04 375/week @ 2024-03-11 228/week @ 2024-03-18 150/week @ 2024-03-25 404/week @ 2024-04-01

1,187 downloads per month
Used in 76 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–13MB
~130K SLoC