aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTomaka17 <pierre.krieger1708@gmail.com>2014-11-05 15:22:21 +0100
committerTomaka17 <pierre.krieger1708@gmail.com>2014-11-05 15:32:01 +0100
commit7ce851dad9102c28ee2fd372ed9fd62e73364da9 (patch)
tree54f1b395234484522b34994b2d4ae36292d916af /tests
parent2e44edea60a19919be467a1228ae971e7b988fec (diff)
downloadglutin-7ce851dad9102c28ee2fd372ed9fd62e73364da9.tar.gz
glutin-7ce851dad9102c28ee2fd372ed9fd62e73364da9.zip
Update for changes in gl-rs
Diffstat (limited to 'tests')
-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));
+ }
}