this proc macro wraps your tests with any function that accepts a function with your test's signature. Your test function can accept any number of arguments and return anything, as long as you call it with the correct arguments in the harness.
```rust use test_harness::test;
fn mytestharness
fn mytest(randomstring: String) -> Result<(), &'static str> { assert_eq!(string.len(), 10); Ok(()) } ```
This expands to the following, with no further macro magic
```rust
fn mytestharness
fn mytest() { fn mytest(randomstring: String) -> Result<(), &'static str> { asserteq!(string.len(), 10); Ok(()) } mytestharness(my_test); } ```
You can use this to set up an async runtime and spawn or block on the test.
```rust use test_harness::test;
mod mymod {
pub fn setup
async fn mytest(s: &'static str) -> Result<(), Box
If this macro is used without any additional arguments, it works identically to the built-in #[test]
macro.
```rust use test_harness::test;
fn normal_test() { assert!(true); } ```