Skip to content

Commit

Permalink
Fiddle through the module visibilities for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Feb 11, 2019
1 parent a83e73d commit 1dba7cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/libstd/sync/mpsc/select.rs
Expand Up @@ -158,7 +158,7 @@ impl Select {
}

/// Helper method for skipping the preflight checks during testing
fn wait2(&self, do_preflight_checks: bool) -> usize {
pub(super) fn wait2(&self, do_preflight_checks: bool) -> usize {
// Note that this is currently an inefficient implementation. We in
// theory have knowledge about all receivers in the set ahead of time,
// so this method shouldn't really have to iterate over all of them yet
Expand Down
14 changes: 7 additions & 7 deletions src/libstd/sync/mpsc/select_tests.rs
Expand Up @@ -210,7 +210,7 @@ fn cloning3() {
let mut h2 = s.handle(&rx2);
unsafe { h2.add(); }
unsafe { h1.add(); }
assert_eq!(s.wait(), h2.id);
assert_eq!(s.wait(), h2.id());
tx3.send(()).unwrap();
});

Expand Down Expand Up @@ -256,7 +256,7 @@ fn preflight4() {
let s = Select::new();
let mut h = s.handle(&rx);
unsafe { h.add(); }
assert_eq!(s.wait2(false), h.id);
assert_eq!(s.wait2(false), h.id());
}

#[test]
Expand All @@ -267,7 +267,7 @@ fn preflight5() {
let s = Select::new();
let mut h = s.handle(&rx);
unsafe { h.add(); }
assert_eq!(s.wait2(false), h.id);
assert_eq!(s.wait2(false), h.id());
}

#[test]
Expand All @@ -278,7 +278,7 @@ fn preflight6() {
let s = Select::new();
let mut h = s.handle(&rx);
unsafe { h.add(); }
assert_eq!(s.wait2(false), h.id);
assert_eq!(s.wait2(false), h.id());
}

#[test]
Expand All @@ -288,7 +288,7 @@ fn preflight7() {
let s = Select::new();
let mut h = s.handle(&rx);
unsafe { h.add(); }
assert_eq!(s.wait2(false), h.id);
assert_eq!(s.wait2(false), h.id());
}

#[test]
Expand All @@ -300,7 +300,7 @@ fn preflight8() {
let s = Select::new();
let mut h = s.handle(&rx);
unsafe { h.add(); }
assert_eq!(s.wait2(false), h.id);
assert_eq!(s.wait2(false), h.id());
}

#[test]
Expand All @@ -313,7 +313,7 @@ fn preflight9() {
let s = Select::new();
let mut h = s.handle(&rx);
unsafe { h.add(); }
assert_eq!(s.wait2(false), h.id);
assert_eq!(s.wait2(false), h.id());
}

#[test]
Expand Down

0 comments on commit 1dba7cb

Please sign in to comment.