2019-06-18 02:27:00 +08:00
|
|
|
#[allow(dead_code)]
|
2019-06-21 11:33:15 -04:00
|
|
|
fn needs_send<T: Send>() {}
|
2017-10-18 20:40:21 +02:00
|
|
|
|
2019-07-11 00:54:54 +02:00
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
2017-10-18 20:40:21 +02:00
|
|
|
#[test]
|
2019-02-05 10:30:33 -05:00
|
|
|
fn event_loop_proxy_send() {
|
2019-06-19 21:12:01 +02:00
|
|
|
#[allow(dead_code)]
|
2019-02-21 10:51:43 +01:00
|
|
|
fn is_send<T: 'static + Send>() {
|
2019-02-05 10:30:33 -05:00
|
|
|
// ensures that `winit::EventLoopProxy` implements `Send`
|
|
|
|
needs_send::<winit::event_loop::EventLoopProxy<T>>();
|
|
|
|
}
|
2017-10-18 20:40:21 +02:00
|
|
|
}
|
|
|
|
|
2019-07-11 00:54:54 +02:00
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
2017-10-18 20:40:21 +02:00
|
|
|
#[test]
|
|
|
|
fn window_send() {
|
|
|
|
// ensures that `winit::Window` implements `Send`
|
2019-02-05 10:30:33 -05:00
|
|
|
needs_send::<winit::window::Window>();
|
2017-10-18 20:40:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn ids_send() {
|
|
|
|
// ensures that the various `..Id` types implement `Send`
|
2019-02-05 10:30:33 -05:00
|
|
|
needs_send::<winit::window::WindowId>();
|
|
|
|
needs_send::<winit::event::DeviceId>();
|
|
|
|
needs_send::<winit::monitor::MonitorHandle>();
|
2017-10-18 20:40:21 +02:00
|
|
|
}
|