third_party/rust/tokio-executor/tests/executor.rs
author Bastien Orivel <eijebong@bananium.fr>
Wed, 22 Aug 2018 20:19:04 +0200
changeset 488156 03df1a267ea54f1024d3f015f4bf781477262c92
child 539572 4d31fcd3085d87085a42fafeea827d41a17890d6
permissions -rw-r--r--
Bug 1484462 - Revendor Rust dependencies. r=ato

extern crate tokio_executor;
extern crate futures;

use tokio_executor::*;
use futures::future::lazy;

#[test]
fn spawn_out_of_executor_context() {
    let res = DefaultExecutor::current().spawn(Box::new(lazy(|| Ok(()))));
    assert!(res.is_err());
}