[Piglit] [PATCH] fbo-fragcoord2: Convert asserts to failure reports.

Vinson Lee vlee at freedesktop.org
Wed Mar 30 23:58:16 UTC 2016


Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 tests/fbo/fbo-fragcoord2.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/fbo/fbo-fragcoord2.c b/tests/fbo/fbo-fragcoord2.c
index 34a5c6cf7802..e816a9800cd6 100644
--- a/tests/fbo/fbo-fragcoord2.c
+++ b/tests/fbo/fbo-fragcoord2.c
@@ -220,11 +220,17 @@ piglit_init(int argc, char**argv)
    piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
 
    vs = piglit_compile_shader_text(GL_VERTEX_SHADER, VertShaderText);
-   assert(vs);
+   if (!vs) {
+      piglit_report_result(PIGLIT_FAIL);
+   }
 
    fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, FragShaderText);
-   assert(fs);
+   if (!fs) {
+      piglit_report_result(PIGLIT_FAIL);
+   }
 
    prog = piglit_link_simple_program(vs, fs);
-   assert(prog);
+   if (!prog) {
+      piglit_report_result(PIGLIT_FAIL);
+   }
 }
-- 
2.5.0



More information about the Piglit mailing list