forked from mirror/async-std
Removing duplicated tests
This commit is contained in:
parent
8de9f9b8e1
commit
84b6d2b276
1 changed files with 0 additions and 27 deletions
|
@ -1,27 +0,0 @@
|
|||
#![cfg(feature = "unstable")]
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
use async_std::future;
|
||||
use async_std::prelude::*;
|
||||
use async_std::task;
|
||||
|
||||
#[test]
|
||||
fn should_timeout() {
|
||||
task::block_on(async {
|
||||
let fut = future::pending::<()>();
|
||||
let dur = Duration::from_millis(100);
|
||||
let res = fut.timeout(dur).await;
|
||||
assert!(res.is_err());
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_not_timeout() {
|
||||
task::block_on(async {
|
||||
let fut = future::ready(0);
|
||||
let dur = Duration::from_millis(100);
|
||||
let res = fut.timeout(dur).await;
|
||||
assert!(res.is_ok());
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue