#unit-testing #macro #better

yanked testy

A simple macro for testing Rust code

0.3.1 May 5, 2023
0.3.0 May 5, 2023
0.2.9 May 5, 2023
0.1.1 May 4, 2023
0.0.5 May 4, 2023

#106 in #better

Download history 214/week @ 2024-04-06 7/week @ 2024-04-13

141 downloads per month

MIT license

6KB

Testy

Crates.io Docs.rs GitHub Workflow Status License

The testy macro prints the status of the test function execution when running cargo test, in a much less verbose fashion. This allows for better looking unit testing.

Usage

To use the testy macro, add it as an attribute to any Rust test function you wish to monitor:

use testy::testy;

testy! {
    fn my_test() {
    	// Do your test here
    }
};

When you run your tests using cargo test, the testy macro will print the status of the test function execution. If the test passes, you will see a green checkmark next to the test name. If the test fails, you will see a red "X" next to the test name.

License

testy is distributed under the terms of the MIT license. See the LICENSE file for details.

Dependencies

~1.5–9MB
~58K SLoC