From 97874a15ac059f69d0c36a080262c4d92b3fc57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 23 Jan 2014 20:18:32 +0100 Subject: [PATCH] Fix BufferImage test to pass and retrieve data with proper alignment. --- src/Magnum/Test/BufferImageGLTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Test/BufferImageGLTest.cpp b/src/Magnum/Test/BufferImageGLTest.cpp index 0290d7901..8fdc73a10 100644 --- a/src/Magnum/Test/BufferImageGLTest.cpp +++ b/src/Magnum/Test/BufferImageGLTest.cpp @@ -51,7 +51,7 @@ BufferImageTest::BufferImageTest() { } void BufferImageTest::construct() { - const unsigned char data[] = { 'a', 'b', 'c' }; + const unsigned char data[] = { 'a', 0, 0, 0, 'b', 0, 0, 0, 'c', 0, 0, 0 }; BufferImage2D a(ColorFormat::Red, ColorType::UnsignedByte, {1, 3}, data, BufferUsage::StaticDraw); #ifndef MAGNUM_TARGET_GLES @@ -67,7 +67,7 @@ void BufferImageTest::construct() { /** @todo How to verify the contents in ES? */ #ifndef MAGNUM_TARGET_GLES CORRADE_COMPARE_AS(std::vector(imageData.begin(), imageData.end()), - std::vector(data, data + 3), + std::vector(data, data + 12), TestSuite::Compare::Container); #endif }