Skip to content

Commit

Permalink
Fix async assertion in test_sendable_future
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidd committed Oct 1, 2014
1 parent 8ab6fce commit 3dc32a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libstd/sync/future.rs
Expand Up @@ -201,12 +201,13 @@ mod test {
#[test]
fn test_sendable_future() {
let expected = "schlorf";
let (tx, rx) = channel();
let f = Future::spawn(proc() { expected });
task::spawn(proc() {
let mut f = f;
let actual = f.get();
assert_eq!(actual, expected);
tx.send(f.get());
});
assert_eq!(rx.recv(), expected);
}

#[test]
Expand Down

0 comments on commit 3dc32a1

Please sign in to comment.