Skip to content

Commit 3b6a32d

Browse files
committed
core::rt: Add a test that rng works with new tasks
1 parent 21aaa7f commit 3b6a32d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/libcore/rt/local_services.rs

+9
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,13 @@ mod test {
220220
assert!(result.is_err());
221221
}
222222
}
223+
224+
#[test]
225+
fn rng() {
226+
do run_in_newsched_task() {
227+
use rand::{rng, Rng};
228+
let r = rng();
229+
let _ = r.next();
230+
}
231+
}
223232
}

0 commit comments

Comments
 (0)