1 extern crate futures;
2 
3 use futures::prelude::*;
4 use futures::future::{ok, err};
5 
6 #[test]
smoke()7 fn smoke() {
8     let mut counter = 0;
9 
10     {
11         let work = ok::<u32, u32>(40).inspect(|val| { counter += *val; });
12         assert_eq!(work.wait(), Ok(40));
13     }
14 
15     assert_eq!(counter, 40);
16 
17     {
18         let work = err::<u32, u32>(4).inspect(|val| { counter += *val; });
19         assert_eq!(work.wait(), Err(4));
20     }
21 
22     assert_eq!(counter, 40);
23 }
24