aboutsummaryrefslogtreecommitdiffstats
path: root/tests/headless.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/headless.rs')
-rw-r--r--tests/headless.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/headless.rs b/tests/headless.rs
index 3c587ea..fe82c1d 100644
--- a/tests/headless.rs
+++ b/tests/headless.rs
@@ -24,12 +24,14 @@ fn main() {
let gl = gl::Gl::load_with(|symbol| window.get_proc_address(symbol));
- gl.ClearColor(0.0, 1.0, 0.0, 1.0);
- gl.Clear(gl::COLOR_BUFFER_BIT);
-
- let mut value: (u8, u8, u8, u8) = unsafe { std::mem::uninitialized() };
- unsafe { gl.ReadPixels(0, 0, 1, 1, gl::RGBA, gl::UNSIGNED_BYTE, std::mem::transmute(&mut value)) };
-
- assert!(value == (0, 255, 0, 255) || value == (0, 64, 0, 255) ||
- value == (0, 64, 0, 255) || value == (0, 64, 0, 0));
+ unsafe {
+ gl.ClearColor(0.0, 1.0, 0.0, 1.0);
+ gl.Clear(gl::COLOR_BUFFER_BIT);
+
+ let mut value: (u8, u8, u8, u8) = std::mem::uninitialized();
+ gl.ReadPixels(0, 0, 1, 1, gl::RGBA, gl::UNSIGNED_BYTE, std::mem::transmute(&mut value));
+
+ assert!(value == (0, 255, 0, 255) || value == (0, 64, 0, 255) ||
+ value == (0, 64, 0, 255) || value == (0, 64, 0, 0));
+ }
}