summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
author Jamie Gennis <jgennis@google.com> 2013-04-25 13:50:38 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2013-04-25 13:50:38 -0700
commit748b696c052d0f5e095e1dce34ae6650cd8cb5e4 (patch)
tree046c106ae121e70062f768337cf42f4389c4b223 /libs
parent743ec69e51ba798677366ad7dc92053120625490 (diff)
parent83ad89579e22228c1a48a2a488b86fc0d41057a6 (diff)
am 83ad8957: am 5b6ebd71: Merge "libgui_test: fix a couple minor test issues" into jb-mr2-dev
* commit '83ad89579e22228c1a48a2a488b86fc0d41057a6': libgui_test: fix a couple minor test issues
Diffstat (limited to 'libs')
-rw-r--r--libs/gui/tests/SurfaceTexture_test.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/libs/gui/tests/SurfaceTexture_test.cpp b/libs/gui/tests/SurfaceTexture_test.cpp
index 47f6df7b39..dd6c43551d 100644
--- a/libs/gui/tests/SurfaceTexture_test.cpp
+++ b/libs/gui/tests/SurfaceTexture_test.cpp
@@ -463,19 +463,12 @@ TEST_F(MultiTextureConsumerTest, EGLImageTargetWorks) {
glVertexPointer(2, GL_FLOAT, 0, vertices);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
- ASSERT_EQ( glGetError(), GL_NO_ERROR );
+ ASSERT_EQ(GLenum(GL_NO_ERROR), glGetError());
}
- ASSERT_TRUE( eglSwapBuffers(mEglDisplay, mEglSurface) );
-
- uint32_t* pixels = new uint32_t[8*16*16];
- glReadPixels(0, 0, 8*16, 16, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
for (int i=0 ; i<8 ; i++) {
- uint32_t p = pixels[i*16 + 8 + 8*(8*16)]; // center of each square
- EXPECT_EQ(p, (i&7) * 0x10101010);
+ EXPECT_TRUE(checkPixel(i*16 + 8, 8, i*16, i*16, i*16, i*16, 0));
}
-
- delete [] pixels;
}