2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>

* 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.
This commit is contained in:
Emmanuele Bassi 2008-11-18 12:54:34 +00:00
parent 34cc7fe21c
commit 7a6353b971
4 changed files with 30 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* 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 <ebassi@linux.intel.com> 2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-alpha.h: * clutter/clutter-alpha.h:

View File

@ -27,8 +27,11 @@ validate_result (TestState *state)
{ {
GLubyte pixel[4]; GLubyte pixel[4];
GLint y_off = state->stage_geom.height - 90; GLint y_off = state->stage_geom.height - 90;
/* NB: glReadPixels is done in GL screen space so y = 0 is at the bottom */ /* 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 /* NB: We ignore the alpha, since we don't know if our render target is
* RGB or RGBA */ * RGB or RGBA */
@ -38,17 +41,20 @@ validate_result (TestState *state)
/* Should see a blue pixel */ /* Should see a blue pixel */
glReadPixels (10, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &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); g_assert (pixel[RED] == 0 && pixel[GREEN] == 0 && pixel[BLUE] != 0);
/* Should see a red pixel */ /* Should see a red pixel */
glReadPixels (110, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &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); g_assert (pixel[RED] != 0 && pixel[GREEN] == 0 && pixel[BLUE] == 0);
/* Should see a blue pixel */ /* Should see a blue pixel */
glReadPixels (210, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &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); g_assert (pixel[RED] == 0 && pixel[GREEN] == 0 && pixel[BLUE] != 0);
#undef RED #undef RED
@ -180,6 +186,7 @@ test_mesh_contiguous (TestConformSimpleFixture *fixture,
cogl_mesh_unref (state.mesh); cogl_mesh_unref (state.mesh);
g_print ("OK\n"); if (g_test_verbose ())
g_print ("OK\n");
} }

View File

@ -36,6 +36,7 @@ validate_result (TestState *state)
{ {
GLubyte pixel[4]; GLubyte pixel[4];
GLint y_off = state->stage_geom.height - 90; GLint y_off = state->stage_geom.height - 90;
/* NB: glReadPixels is done in GL screen space so y = 0 is at the bottom */ /* 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 /* 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 */ /* Should see a blue pixel */
glReadPixels (10, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &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); g_assert (pixel[RED] == 0 && pixel[GREEN] == 0 && pixel[BLUE] != 0);
#undef RED #undef RED
@ -162,6 +164,7 @@ test_mesh_interleved (TestConformSimpleFixture *fixture,
cogl_mesh_unref (state.mesh); cogl_mesh_unref (state.mesh);
g_print ("OK\n"); if (g_test_verbose ())
g_print ("OK\n");
} }

View File

@ -34,12 +34,14 @@ validate_result (TestState *state)
/* Should see a red pixel */ /* Should see a red pixel */
glReadPixels (110, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &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); g_assert (pixel[RED] != 0 && pixel[GREEN] == 0 && pixel[BLUE] == 0);
/* Should see a green pixel */ /* Should see a green pixel */
glReadPixels (210, y_off, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &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); g_assert (pixel[RED] == 0 && pixel[GREEN] != 0 && pixel[BLUE] == 0);
#undef RED #undef RED
@ -195,6 +197,7 @@ test_mesh_mutability (TestConformSimpleFixture *fixture,
cogl_mesh_unref (state.mesh); cogl_mesh_unref (state.mesh);
g_print ("OK\n"); if (g_test_verbose ())
g_print ("OK\n");
} }