Crates.io | stf-macro |
lib.rs | stf-macro |
version | 0.1.0 |
source | src |
created_at | 2022-10-07 19:33:40.7678 |
updated_at | 2022-10-07 19:33:40.7678 |
description | An example of a simple test framework in Rust |
homepage | https://github.com/deadblackclover/simple-test-framework |
repository | https://github.com/deadblackclover/simple-test-framework |
max_upload_size | |
id | 683039 |
size | 2,327 |
An example of a simple test framework in Rust
#![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);
}