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 1252064 commit 33c40b9
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();
}
}
}

4 comments on commit 33c40b9

@bors
Copy link
Contributor

@bors bors commented on 33c40b9 May 7, 2013

Choose a reason for hiding this comment

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

saw approval from graydon
at brson@33c40b9

@bors
Copy link
Contributor

@bors bors commented on 33c40b9 May 7, 2013

Choose a reason for hiding this comment

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

merging brson/rust/rng = 33c40b9 into auto

@bors
Copy link
Contributor

@bors bors commented on 33c40b9 May 7, 2013

Choose a reason for hiding this comment

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

brson/rust/rng = 33c40b9 merged ok, testing candidate = aa173b8

@bors
Copy link
Contributor

@bors bors commented on 33c40b9 May 7, 2013

Choose a reason for hiding this comment

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

Please sign in to comment.