aboutsummaryrefslogtreecommitdiffstats
path: root/tests/headless.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2014-11-05 15:39:20 +0100
committertomaka <pierre.krieger1708@gmail.com>2014-11-05 15:39:20 +0100
commitc63511e9e670e865b891b6097546fcafeac6446f (patch)
tree54f1b395234484522b34994b2d4ae36292d916af /tests/headless.rs
parent2e44edea60a19919be467a1228ae971e7b988fec (diff)
parent7ce851dad9102c28ee2fd372ed9fd62e73364da9 (diff)
downloadglutin-c63511e9e670e865b891b6097546fcafeac6446f.tar.gz
glutin-c63511e9e670e865b891b6097546fcafeac6446f.zip
Merge pull request #99 from tomaka/update-glrs
Update for changes in gl-rs
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));
+ }
}