stf-macro

Crates.iostf-macro
lib.rsstf-macro
version0.1.0
sourcesrc
created_at2022-10-07 19:33:40.7678
updated_at2022-10-07 19:33:40.7678
descriptionAn example of a simple test framework in Rust
homepagehttps://github.com/deadblackclover/simple-test-framework
repositoryhttps://github.com/deadblackclover/simple-test-framework
max_upload_size
id683039
size2,327
DEADBLACKCLOVER (deadblackclover)

documentation

README

simple-test-framework

An example of a simple test framework in Rust

Usage

#![feature(custom_test_frameworks)]
#![test_runner(stf_runner::test_runner)]

use stf_macro::simple_test;

pub fn add(left: usize, right: usize) -> usize {
    left + right
}

#[simple_test]
fn it_works() {
    let result = add(2, 2);
    assert_eq!(result, 4);
}
Commit count: 13

cargo fmt