2019-06-18 02:27:00 +08:00
|
|
|
#[allow(dead_code)]
|
2019-06-21 11:33:15 -04:00
|
|
|
fn needs_sync<T: Sync>() {}
|
2018-04-21 11:53:57 -04:00
|
|
|
|
2024-02-01 14:27:44 +01:00
|
|
|
#[test]
|
|
|
|
|
fn event_loop_proxy_send() {
|
|
|
|
|
#[allow(dead_code)]
|
|
|
|
|
fn is_send<T: 'static + Send>() {
|
|
|
|
|
// ensures that `winit::EventLoopProxy<T: Send>` implements `Sync`
|
|
|
|
|
needs_sync::<winit::event_loop::EventLoopProxy<T>>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-21 11:53:57 -04:00
|
|
|
#[test]
|
|
|
|
|
fn window_sync() {
|
|
|
|
|
// ensures that `winit::Window` implements `Sync`
|
2019-02-05 10:30:33 -05:00
|
|
|
needs_sync::<winit::window::Window>();
|
2018-04-21 11:53:57 -04:00
|
|
|
}
|
2023-10-17 04:54:12 +04:00
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn window_builder_sync() {
|
|
|
|
|
needs_sync::<winit::window::WindowBuilder>();
|
|
|
|
|
}
|
2023-12-16 22:02:17 +02:00
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn custom_cursor_sync() {
|
2023-12-22 22:20:41 +01:00
|
|
|
needs_sync::<winit::window::CustomCursorBuilder>();
|
2023-12-16 22:02:17 +02:00
|
|
|
needs_sync::<winit::window::CustomCursor>();
|
|
|
|
|
}
|