Skip to content
Permalink
Browse files

Fiddle through the module visibilities for tests

  • Loading branch information...
oli-obk committed Feb 6, 2019
1 parent a83e73d commit 1dba7cb20224b5bb3a22641b2f4f2f73e5157dee
Showing with 8 additions and 8 deletions.
  1. +1 −1 src/libstd/sync/mpsc/select.rs
  2. +7 −7 src/libstd/sync/mpsc/select_tests.rs
@@ -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
@@ -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();
});

@@ -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]
@@ -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]
@@ -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]
@@ -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]
@@ -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]
@@ -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]

0 comments on commit 1dba7cb

Please sign in to comment.
You can’t perform that action at this time.