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:
parent
34cc7fe21c
commit
7a6353b971
@ -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>
|
||||
|
||||
* clutter/clutter-alpha.h:
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user