Files

27 lines
712 B
Rust
Raw Permalink Normal View History

2019-06-18 02:27:00 +08:00
#[allow(dead_code)]
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]
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>() {
// 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`
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`
needs_send::<winit::window::WindowId>();
needs_send::<winit::event::DeviceId>();
needs_send::<winit::monitor::MonitorHandle>();
2017-10-18 20:40:21 +02:00
}