From 9a05577df8f3e616de94635ef41e0d8601f3091c Mon Sep 17 00:00:00 2001 From: Aceeri Date: Mon, 9 Nov 2015 03:18:48 -0800 Subject: [PATCH] Not implemented asserts to prevent silent fails --- src/api/android/mod.rs | 4 ++++ src/api/cocoa/mod.rs | 4 ++++ src/api/wayland/mod.rs | 4 ++++ src/api/x11/window.rs | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/src/api/android/mod.rs b/src/api/android/mod.rs index 3dcea902..f42caeb1 100644 --- a/src/api/android/mod.rs +++ b/src/api/android/mod.rs @@ -120,6 +120,10 @@ impl Window { { use std::{mem, ptr}; + // not implemented + assert!(win_attribs.min_dimensions.is_none()); + assert!(win_attribs.max_dimensions.is_none()); + let opengl = opengl.clone().map_sharing(|w| &w.context); let native_window = unsafe { android_glue::get_native_window() }; diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs index c1b22c9b..b7e0239e 100644 --- a/src/api/cocoa/mod.rs +++ b/src/api/cocoa/mod.rs @@ -268,6 +268,10 @@ impl Window { unimplemented!() } + // not implemented + assert!(win_attribs.min_dimensions.is_none()); + assert!(win_attribs.max_dimensions.is_none()); + match opengl.robustness { Robustness::RobustNoResetNotification | Robustness::RobustLoseContextOnReset => { return Err(CreationError::RobustnessNotSupported); diff --git a/src/api/wayland/mod.rs b/src/api/wayland/mod.rs index 2877713e..8084516b 100644 --- a/src/api/wayland/mod.rs +++ b/src/api/wayland/mod.rs @@ -257,6 +257,10 @@ impl Window { { use self::wayland::internals::FFI; + // not implemented + assert!(win_attribs.min_dimensions.is_none()); + assert!(win_attribs.max_dimensions.is_none()); + let wayland_context = match *WAYLAND_CONTEXT { Some(ref c) => c, None => return Err(CreationError::NotSupported), diff --git a/src/api/x11/window.rs b/src/api/x11/window.rs index b964fed6..4d2dfb24 100644 --- a/src/api/x11/window.rs +++ b/src/api/x11/window.rs @@ -304,6 +304,10 @@ impl Window { { let dimensions = window_attrs.dimensions.unwrap_or((800, 600)); + // not implemented + assert!(win_attribs.min_dimensions.is_none()); + assert!(win_attribs.max_dimensions.is_none()); + let screen_id = match window_attrs.monitor { Some(PlatformMonitorId::X(MonitorId(_, monitor))) => monitor as i32, _ => unsafe { (display.xlib.XDefaultScreen)(display.display) },