3 releases
Uses old Rust 2015
0.1.2 | Apr 30, 2015 |
---|---|
0.1.1 | Apr 26, 2015 |
0.1.0 | Apr 26, 2015 |
#17 in #ms
357 downloads per month
Used in fewer than 9 crates
5KB
Timebomb
This is a simple timeout mechanism for Rust that is intended for use with unit tests.
extern crate timebomb;
use timebomb::timeout_ms;
#[test]
fn something_bad() {
// This will timeout in 1 second if the test did not pass
timeout_ms(|| {
// oops infinite loop
loop {}
}, 1000);
}
Dependencies
~0.9–1.3MB
~18K SLoC