From 7a6353b9714646556ac7a7c1ebf8ea47ce794fae Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 18 Nov 2008 12:54:34 +0000 Subject: [PATCH] 2008-11-18 Emmanuele Bassi * tests/conform/test-mesh-contiguous.c: * tests/conform/test-mesh-interleved.c: * tests/conform/test-mesh-mutability.c: Remove the last bare g_print() from the conformance test suite. --- ChangeLog | 7 +++++++ tests/conform/test-mesh-contiguous.c | 17 ++++++++++++----- tests/conform/test-mesh-interleved.c | 7 +++++-- tests/conform/test-mesh-mutability.c | 9 ++++++--- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0fd137309..648bfdc90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-18 Emmanuele Bassi + + * tests/conform/test-mesh-contiguous.c: + * tests/conform/test-mesh-interleved.c: + * tests/conform/test-mesh-mutability.c: Remove the last bare + g_print() from the conformance test suite. + 2008-11-18 Emmanuele Bassi * clutter/clutter-alpha.h: diff --git a/tests/conform/test-mesh-contiguous.c b/tests/conform/test-mesh-contiguous.c index 8e94eec57..f411b755f 100644 --- a/tests/conform/test-mesh-contiguous.c +++ b/tests/conform/test-mesh-contiguous.c @@ -27,8 +27,11 @@ validate_result (TestState *state) { GLubyte pixel[4]; GLint y_off = state->stage_geom.height - 90; + /* NB: glReadPixels is done in GL screen space so y = 0 is at the bottom */ - g_print ("y_off = %d\n", y_off); + if (g_test_verbose ()) + g_print ("y_off = %d\n", y_off); + /* NB: We ignore the alpha, since we don't know if our render target is * RGB or RGBA */ @@ -38,17 +41,20 @@ validate_result (TestState *state) /* Should see a blue pixel */ glReadPixels (10, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel); - g_print ("pixel 0 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); + if (g_test_verbose ()) + g_print ("pixel 0 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); g_assert (pixel[RED] == 0 && pixel[GREEN] == 0 && pixel[BLUE] != 0); /* Should see a red pixel */ glReadPixels (110, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel); - g_print ("pixel 1 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); + if (g_test_verbose ()) + g_print ("pixel 1 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); g_assert (pixel[RED] != 0 && pixel[GREEN] == 0 && pixel[BLUE] == 0); /* Should see a blue pixel */ glReadPixels (210, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel); - g_print ("pixel 2 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); + if (g_test_verbose ()) + g_print ("pixel 2 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); g_assert (pixel[RED] == 0 && pixel[GREEN] == 0 && pixel[BLUE] != 0); #undef RED @@ -180,6 +186,7 @@ test_mesh_contiguous (TestConformSimpleFixture *fixture, cogl_mesh_unref (state.mesh); - g_print ("OK\n"); + if (g_test_verbose ()) + g_print ("OK\n"); } diff --git a/tests/conform/test-mesh-interleved.c b/tests/conform/test-mesh-interleved.c index e8e393f7d..ea4cafdc3 100644 --- a/tests/conform/test-mesh-interleved.c +++ b/tests/conform/test-mesh-interleved.c @@ -36,6 +36,7 @@ validate_result (TestState *state) { GLubyte pixel[4]; GLint y_off = state->stage_geom.height - 90; + /* NB: glReadPixels is done in GL screen space so y = 0 is at the bottom */ /* NB: We ignore the alpha, since we don't know if our render target is @@ -47,7 +48,8 @@ validate_result (TestState *state) /* Should see a blue pixel */ glReadPixels (10, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel); - g_print ("pixel 0 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); + if (g_test_verbose ()) + g_print ("pixel 0 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); g_assert (pixel[RED] == 0 && pixel[GREEN] == 0 && pixel[BLUE] != 0); #undef RED @@ -162,6 +164,7 @@ test_mesh_interleved (TestConformSimpleFixture *fixture, cogl_mesh_unref (state.mesh); - g_print ("OK\n"); + if (g_test_verbose ()) + g_print ("OK\n"); } diff --git a/tests/conform/test-mesh-mutability.c b/tests/conform/test-mesh-mutability.c index c9f9260bf..08bd88abc 100644 --- a/tests/conform/test-mesh-mutability.c +++ b/tests/conform/test-mesh-mutability.c @@ -34,12 +34,14 @@ validate_result (TestState *state) /* Should see a red pixel */ glReadPixels (110, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel); - g_print ("pixel 0 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); + if (g_test_verbose ()) + g_print ("pixel 0 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); g_assert (pixel[RED] != 0 && pixel[GREEN] == 0 && pixel[BLUE] == 0); /* Should see a green pixel */ glReadPixels (210, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel); - g_print ("pixel 1 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); + if (g_test_verbose ()) + g_print ("pixel 1 = %x, %x, %x\n", pixel[RED], pixel[GREEN], pixel[BLUE]); g_assert (pixel[RED] == 0 && pixel[GREEN] != 0 && pixel[BLUE] == 0); #undef RED @@ -195,6 +197,7 @@ test_mesh_mutability (TestConformSimpleFixture *fixture, cogl_mesh_unref (state.mesh); - g_print ("OK\n"); + if (g_test_verbose ()) + g_print ("OK\n"); }