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