test_tools

Crates.iotest_tools
lib.rstest_tools
version0.9.0
sourcesrc
created_at2022-05-07 08:54:54.023349
updated_at2024-05-11 22:36:50.404956
descriptionTools for writing and running tests.
homepagehttps://github.com/Wandalen/wTools/tree/master/module/core/test_tools
repositoryhttps://github.com/Wandalen/wTools/tree/master/module/core/test_tools
max_upload_size
id582023
size49,202
Wandalen (Wandalen)

documentation

https://docs.rs/test_tools

README

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

Commit count: 0

cargo fmt