winit-sonoma-fix/tests/send_objects.rs
Victor Berger 6513351e0c
Wayland's eventloop 2.0 (#790)
* match unix common API to evl 2.0

* wayland: eventloop2.0

* make EventLoopProxy require T: 'static

* Fix linux build and tests

* wayland: update sctk & small fixes
2019-02-21 10:51:43 +01:00

26 lines
616 B
Rust

extern crate winit;
fn needs_send<T:Send>() {}
#[test]
fn event_loop_proxy_send() {
fn is_send<T: 'static + Send>() {
// ensures that `winit::EventLoopProxy` implements `Send`
needs_send::<winit::event_loop::EventLoopProxy<T>>();
}
}
#[test]
fn window_send() {
// ensures that `winit::Window` implements `Send`
needs_send::<winit::window::Window>();
}
#[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>();
}