Skip to content

Commit

Permalink
core::rt: Add a test that rng works with new tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed May 7, 2013
1 parent 21aaa7f commit 3b6a32d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libcore/rt/local_services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,13 @@ mod test {
assert!(result.is_err());
}
}

#[test]
fn rng() {
do run_in_newsched_task() {
use rand::{rng, Rng};
let r = rng();
let _ = r.next();
}
}
}

5 comments on commit 3b6a32d

@bors
Copy link
Contributor

@bors bors commented on 3b6a32d May 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at brson@3b6a32d

@bors
Copy link
Contributor

@bors bors commented on 3b6a32d May 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging brson/rust/rng2 = 3b6a32d into auto

@bors
Copy link
Contributor

@bors bors commented on 3b6a32d May 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brson/rust/rng2 = 3b6a32d merged ok, testing candidate = e6529c3

@bors
Copy link
Contributor

@bors bors commented on 3b6a32d May 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 3b6a32d May 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = e6529c3

Please sign in to comment.