}
}
-#[cfg(test)]
+#[cfg(all(test, not(target_os = "emscripten")))]
mod tests {
use net::*;
use net::test::{tsa, sa6, sa4};
}
// Tests for this module
-#[cfg(test)]
+#[cfg(all(test, not(target_os = "emscripten")))]
mod tests {
use net::*;
use net::Ipv6MulticastScope::*;
mod tcp;
mod udp;
mod parser;
-#[cfg(test)] mod test;
+#[cfg(all(test, not(target_os = "emscripten")))]
+mod test;
/// Possible values which can be passed to the [`shutdown`] method of
/// [`TcpStream`].
}
}
-#[cfg(test)]
+#[cfg(all(test, not(target_os = "emscripten")))]
mod tests {
use io::ErrorKind;
use io::prelude::*;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn bind_error() {
match TcpListener::bind("1.1.1.1:9999") {
Ok(..) => panic!(),
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn connect_error() {
match TcpStream::connect("0.0.0.0:1") {
Ok(..) => panic!(),
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn listen_localhost() {
let socket_addr = next_test_ip4();
let listener = t!(TcpListener::bind(&socket_addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn connect_loopback() {
each_ip(&mut |addr| {
let acceptor = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn smoke_test() {
each_ip(&mut |addr| {
let acceptor = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn read_eof() {
each_ip(&mut |addr| {
let acceptor = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn write_close() {
each_ip(&mut |addr| {
let acceptor = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn multiple_connect_serial() {
each_ip(&mut |addr| {
let max = 10;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn multiple_connect_interleaved_greedy_schedule() {
const MAX: usize = 10;
each_ip(&mut |addr| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn multiple_connect_interleaved_lazy_schedule() {
const MAX: usize = 10;
each_ip(&mut |addr| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn socket_and_peer_name() {
each_ip(&mut |addr| {
let listener = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn partial_read() {
each_ip(&mut |addr| {
let (tx, rx) = channel();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn double_bind() {
each_ip(&mut |addr| {
let _listener = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn fast_rebind() {
each_ip(&mut |addr| {
let acceptor = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn tcp_clone_smoke() {
each_ip(&mut |addr| {
let acceptor = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn tcp_clone_two_read() {
each_ip(&mut |addr| {
let acceptor = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn tcp_clone_two_write() {
each_ip(&mut |addr| {
let acceptor = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn shutdown_smoke() {
each_ip(&mut |addr| {
let a = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn close_readwrite_smoke() {
each_ip(&mut |addr| {
let a = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn close_read_wakes_up() {
each_ip(&mut |addr| {
let a = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn clone_while_reading() {
each_ip(&mut |addr| {
let accept = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn clone_accept_smoke() {
each_ip(&mut |addr| {
let a = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn clone_accept_concurrent() {
each_ip(&mut |addr| {
let a = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn debug() {
let name = if cfg!(windows) {"socket"} else {"fd"};
let socket_addr = next_test_ip4();
// no longer has rounding errors.
#[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)]
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn timeouts() {
let addr = next_test_ip4();
let listener = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_read_timeout() {
let addr = next_test_ip4();
let listener = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_read_with_timeout() {
let addr = next_test_ip4();
let listener = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn nodelay() {
let addr = next_test_ip4();
let _listener = t!(TcpListener::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn ttl() {
let ttl = 100;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn set_nonblocking() {
let addr = next_test_ip4();
let listener = t!(TcpListener::bind(&addr));
}
}
-#[cfg(test)]
+#[cfg(all(test, not(target_os = "emscripten")))]
mod tests {
use io::ErrorKind;
use net::*;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn bind_error() {
match UdpSocket::bind("1.1.1.1:9999") {
Ok(..) => panic!(),
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn socket_smoke_test_ip4() {
each_ip(&mut |server_ip, client_ip| {
let (tx1, rx1) = channel();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn socket_name_ip4() {
each_ip(&mut |addr, _| {
let server = t!(UdpSocket::bind(&addr));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn udp_clone_smoke() {
each_ip(&mut |addr1, addr2| {
let sock1 = t!(UdpSocket::bind(&addr1));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn udp_clone_two_read() {
each_ip(&mut |addr1, addr2| {
let sock1 = t!(UdpSocket::bind(&addr1));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn udp_clone_two_write() {
each_ip(&mut |addr1, addr2| {
let sock1 = t!(UdpSocket::bind(&addr1));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn debug() {
let name = if cfg!(windows) {"socket"} else {"fd"};
let socket_addr = next_test_ip4();
// no longer has rounding errors.
#[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)]
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn timeouts() {
let addr = next_test_ip4();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_read_timeout() {
let addr = next_test_ip4();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_read_with_timeout() {
let addr = next_test_ip4();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn connect_send_recv() {
let addr = next_test_ip4();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn ttl() {
let ttl = 100;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn set_nonblocking() {
let addr = next_test_ip4();
::sys::os::exit(code)
}
-#[cfg(test)]
+#[cfg(all(test, not(target_os = "emscripten")))]
mod tests {
use io::prelude::*;
#[test]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn smoke() {
let p = Command::new("true").spawn();
assert!(p.is_ok());
#[test]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn exit_reported_right() {
let p = Command::new("false").spawn();
assert!(p.is_ok());
#[test]
#[cfg(unix)]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn signal_reported_right() {
use os::unix::process::ExitStatusExt;
#[test]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stdout_works() {
let mut cmd = Command::new("echo");
cmd.arg("foobar").stdout(Stdio::piped());
#[test]
#[cfg_attr(any(windows, target_os = "android"), ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn set_current_dir_works() {
let mut cmd = Command::new("/bin/sh");
cmd.arg("-c").arg("pwd")
#[test]
#[cfg_attr(any(windows, target_os = "android"), ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stdin_works() {
let mut p = Command::new("/bin/sh")
.arg("-c").arg("read line; echo $line")
#[test]
#[cfg_attr(target_os = "android", ignore)]
#[cfg(unix)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn uid_works() {
use os::unix::prelude::*;
use libc;
#[test]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_process_status() {
let mut status = Command::new("false").status().unwrap();
assert!(status.code() == Some(1));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_process_output_fail_to_start() {
match Command::new("/no-binary-by-this-name-should-exist").output() {
Err(e) => assert_eq!(e.kind(), ErrorKind::NotFound),
#[test]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_process_output_output() {
let Output {status, stdout, stderr}
= Command::new("echo").arg("hello").output().unwrap();
#[test]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_process_output_error() {
let Output {status, stdout, stderr}
= Command::new("mkdir").arg(".").output().unwrap();
#[test]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_finish_once() {
let mut prog = Command::new("false").spawn().unwrap();
assert!(prog.wait().unwrap().code() == Some(1));
#[test]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_finish_twice() {
let mut prog = Command::new("false").spawn().unwrap();
assert!(prog.wait().unwrap().code() == Some(1));
#[test]
#[cfg_attr(target_os = "android", ignore)]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_wait_with_output_once() {
let prog = Command::new("echo").arg("hello").stdout(Stdio::piped())
.spawn().unwrap();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_inherit_env() {
use env;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_override_env() {
use env;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_add_to_env() {
let result = env_cmd().env("RUN_TEST_NEW_ENV", "123").output().unwrap();
let output = String::from_utf8_lossy(&result.stdout).to_string();
}
}
-#[cfg(test)]
+#[cfg(all(test, not(target_os = "emscripten")))]
mod tests {
use env;
use super::*;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn smoke_threads() {
let (tx, rx) = channel::<i32>();
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn port_gone_concurrent() {
let (tx, rx) = channel::<i32>();
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn port_gone_concurrent_shared() {
let (tx, rx) = channel::<i32>();
let tx2 = tx.clone();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn chan_gone_concurrent() {
let (tx, rx) = channel::<i32>();
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stress() {
let (tx, rx) = channel::<i32>();
let t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stress_shared() {
const AMT: u32 = 10000;
const NTHREADS: u32 = 8;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn send_from_outside_runtime() {
let (tx1, rx1) = channel::<()>();
let (tx2, rx2) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn recv_from_outside_runtime() {
let (tx, rx) = channel::<i32>();
let t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn no_runtime() {
let (tx1, rx1) = channel::<i32>();
let (tx2, rx2) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_single_thread_recv_chan_close() {
// Receiving on a closed chan will panic
let res = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_task_recv_then_send() {
let (tx, rx) = channel::<Box<i32>>();
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_task_recv_then_close() {
let (tx, rx) = channel::<Box<i32>>();
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_thread_close_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_thread_send_close_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_thread_recv_close_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_thread_send_recv_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = channel::<Box<isize>>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stream_send_recv_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = channel();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stress_recv_timeout_two_threads() {
let (tx, rx) = channel();
let stress = stress_factor() + 100;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stress_recv_timeout_shared() {
let (tx, rx) = channel();
let stress = stress_factor() + 100;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn shared_recv_timeout() {
let (tx, rx) = channel();
let total = 5;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn shared_chan_stress() {
let (tx, rx) = channel();
let total = stress_factor() + 100;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_nested_recv_iter() {
let (tx, rx) = channel::<i32>();
let (total_tx, total_rx) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_recv_iter_break() {
let (tx, rx) = channel::<i32>();
let (count_tx, count_rx) = channel();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_recv_try_iter() {
let (request_tx, request_rx) = channel();
let (response_tx, response_rx) = channel();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn try_recv_states() {
let (tx1, rx1) = channel::<i32>();
let (tx2, rx2) = channel::<()>();
// This bug used to end up in a livelock inside of the Receiver destructor
// because the internal state of the Shared packet was corrupted
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn destroy_upgraded_shared_port_when_sender_still_active() {
let (tx, rx) = channel();
let (tx2, rx2) = channel();
}
}
-#[cfg(test)]
+#[cfg(all(test, not(target_os = "emscripten")))]
mod sync_tests {
use env;
use thread;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn smoke_threads() {
let (tx, rx) = sync_channel::<i32>(0);
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn port_gone_concurrent() {
let (tx, rx) = sync_channel::<i32>(0);
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn port_gone_concurrent_shared() {
let (tx, rx) = sync_channel::<i32>(0);
let tx2 = tx.clone();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn chan_gone_concurrent() {
let (tx, rx) = sync_channel::<i32>(0);
thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stress() {
let (tx, rx) = sync_channel::<i32>(0);
thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stress_recv_timeout_two_threads() {
let (tx, rx) = sync_channel::<i32>(0);
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stress_recv_timeout_shared() {
const AMT: u32 = 1000;
const NTHREADS: u32 = 8;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stress_shared() {
const AMT: u32 = 1000;
const NTHREADS: u32 = 8;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_single_thread_recv_chan_close() {
// Receiving on a closed chan will panic
let res = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_task_recv_then_send() {
let (tx, rx) = sync_channel::<Box<i32>>(0);
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_task_recv_then_close() {
let (tx, rx) = sync_channel::<Box<i32>>(0);
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_thread_close_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = sync_channel::<i32>(0);
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_thread_send_close_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = sync_channel::<i32>(0);
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_thread_recv_close_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = sync_channel::<i32>(0);
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_multi_thread_send_recv_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = sync_channel::<Box<i32>>(0);
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stream_send_recv_stress() {
for _ in 0..stress_factor() {
let (tx, rx) = sync_channel::<Box<i32>>(0);
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn shared_chan_stress() {
let (tx, rx) = sync_channel(0);
let total = stress_factor() + 100;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_nested_recv_iter() {
let (tx, rx) = sync_channel::<i32>(0);
let (total_tx, total_rx) = sync_channel::<i32>(0);
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn test_recv_iter_break() {
let (tx, rx) = sync_channel::<i32>(0);
let (count_tx, count_rx) = sync_channel(0);
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn try_recv_states() {
let (tx1, rx1) = sync_channel::<i32>(1);
let (tx2, rx2) = sync_channel::<()>(1);
// This bug used to end up in a livelock inside of the Receiver destructor
// because the internal state of the Shared packet was corrupted
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn destroy_upgraded_shared_port_when_sender_still_active() {
let (tx, rx) = sync_channel::<()>(0);
let (tx2, rx2) = sync_channel::<()>(0);
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn send1() {
let (tx, rx) = sync_channel::<i32>(0);
let _t = thread::spawn(move|| { rx.recv().unwrap(); });
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn send2() {
let (tx, rx) = sync_channel::<i32>(0);
let _t = thread::spawn(move|| { drop(rx); });
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn send3() {
let (tx, rx) = sync_channel::<i32>(1);
assert_eq!(tx.send(1), Ok(()));
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn send4() {
let (tx, rx) = sync_channel::<i32>(0);
let tx2 = tx.clone();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn issue_15761() {
fn repro() {
let (tx1, rx1) = sync_channel::<()>(3);
}
}
-#[cfg(test)]
+#[cfg(all(test, not(target_os = "emscripten")))]
#[allow(unused_imports)]
mod tests {
use thread;
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn unblocks() {
let (tx1, rx1) = channel::<i32>();
let (_tx2, rx2) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn both_ready() {
let (tx1, rx1) = channel::<i32>();
let (tx2, rx2) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stress() {
const AMT: i32 = 10000;
let (tx1, rx1) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn cloning() {
let (tx1, rx1) = channel::<i32>();
let (_tx2, rx2) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn cloning2() {
let (tx1, rx1) = channel::<i32>();
let (_tx2, rx2) = channel::<i32>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn cloning3() {
let (tx1, rx1) = channel::<()>();
let (tx2, rx2) = channel::<()>();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn oneshot_data_waiting() {
let (tx1, rx1) = channel();
let (tx2, rx2) = channel();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn stream_data_waiting() {
let (tx1, rx1) = channel();
let (tx2, rx2) = channel();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn shared_data_waiting() {
let (tx1, rx1) = channel();
let (tx2, rx2) = channel();
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn sync2() {
let (tx, rx) = sync_channel::<i32>(0);
let _t = thread::spawn(move|| {
}
#[test]
- #[cfg_attr(target_os = "emscripten", ignore)]
fn sync3() {
let (tx1, rx1) = sync_channel::<i32>(0);
let (tx2, rx2): (Sender<i32>, Receiver<i32>) = channel();