Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

killercup/timebomb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timebomb

Build Status

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);
}

About

A simple timeout for your unit tests.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages