webmetro/src/lib.rs

19 lines
351 B
Rust
Raw Normal View History

2017-01-10 03:40:21 +00:00
extern crate futures;
#[cfg(test)]
mod tests {
use futures::future::{ok, Future};
#[test]
fn hello_futures() {
let my_future = ok::<String, ()>("Hello".into())
.map(|hello| hello + ", Futures!");
let string_result = my_future.wait().unwrap();
assert_eq!(string_result, "Hello, Futures!");
}
}