Crate tests_bin

source ·
Expand description

This crate is aimed toward Rustacean who wish to have a bin folder where they can easily organize all their unit tests to clean their src folder. VSCode extension included! Visit Wiki for more informations.

Usage

use tests_bin::{ unit__tests, unit_tests };

// Will link a module to `tests/unit/global_tests.rs` 
// with a module named `global_test_rs`.
unit__tests!("global_tests.rs");
  
// Will link a module to `tests/unit/add.rs` 
// with a module named `pub_fn_add_usize`.
#[unit_tests("add.rs")]
pub fn add(left: usize, right: usize) -> usize {
    left + right
}

Macros

Attribute Macros