[clutter] test-cogl-blend-strings: Allow single-bit rendering error
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] test-cogl-blend-strings: Allow single-bit rendering error
- Date: Sat, 14 May 2011 00:12:49 +0000 (UTC)
commit 7beb222d3f27740cb3c1a8a75859aee74712a9cd
Author: Adam Jackson <ajax redhat com>
Date: Mon May 2 12:13:57 2011 -0400
test-cogl-blend-strings: Allow single-bit rendering error
Signed-off-by: Adam Jackson <ajax redhat com>
http://bugzilla.clutter-project.org/show_bug.cgi?id=2640
tests/conform/test-cogl-blend-strings.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/conform/test-cogl-blend-strings.c b/tests/conform/test-cogl-blend-strings.c
index 0c6428a..6bec85b 100644
--- a/tests/conform/test-cogl-blend-strings.c
+++ b/tests/conform/test-cogl-blend-strings.c
@@ -2,6 +2,7 @@
#include <clutter/clutter.h>
#include <cogl/cogl.h>
#include <string.h>
+#include <stdlib.h>
#include "test-conform-common.h"
@@ -39,10 +40,9 @@ check_pixel (GLubyte *pixel, guint32 color)
if (g_test_verbose ())
g_print (" expected = %x, %x, %x, %x\n",
r, g, b, a);
- /* FIXME - allow for hardware in-precision */
- g_assert_cmpint (pixel[RED], ==, r);
- g_assert_cmpint (pixel[GREEN], ==, g);
- g_assert_cmpint (pixel[BLUE], ==, b);
+ g_assert_cmpint (abs(pixel[RED] - r), <=, 1);
+ g_assert_cmpint (abs(pixel[GREEN] - g), <=, 1);
+ g_assert_cmpint (abs(pixel[BLUE] - b), <=, 1);
/* FIXME
* We ignore the alpha, since we don't know if our render target is
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]