Crate wtest_basic
source · [−]Expand description
Tools for writing and running tests.
Module :: wtest_basic
Tools for writing and running tests. The most basic things.
Sample
use wtest_basic::*;
//
fn pass1_test()
{
assert_eq!( true, true );
}
//
fn pass2_test()
{
assert_eq!( 1, 1 );
}
//
test_suite!
{
pass1,
pass2,
}
To add to your project
cargo add wtest_basic --dev
Try out from the repository
git clone https://github.com/Wandalen/wTools
cd wTools
cd sample/rust/test_basic_trivial
cargo run
Re-exports
pub use dependencies::*;
pub use ::meta_tools as meta;
pub use ::typing_tools as typing;
pub use super::prelude::*;
pub use super::private::test_suite;
pub use super::prelude::*;
Modules
Basics.
Dependencies.
Exposed namespace of the module.
Helpers.
Prelude to use essentials: use my_module::prelude::*
.
Macros
Compile-time assertion that two values have the same size.
Compile-time assertion that memory behind two references have the same size.
Macro to compar meta condition is true at compile-time.
Compile-time assertion of having the same align.
Compile-time assertion that two types have the same size.
Macro implements
to answer the question: does it implement a trait?
Define implementation putting each function under a macro.
Index of items.
Required to convert integets to floats.
Mechanism to define test suite. This macro encourages refactoring the code of the test in the most readable way, gathering a list of all test routines at the end of the test file.
Define implementation putting each function under a macro and adding attribute #[ test ]
.
Define implementation putting each function under a macro and adding attribute #[ test ]
.
Index of items.