[clutter] test-cogl-sub-texture: Allow single-bit rendering error
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] test-cogl-sub-texture: Allow single-bit rendering error
- Date: Sat, 14 May 2011 00:12:54 +0000 (UTC)
commit 5aa8ed93cef370be0ef2d840c3356a847fb95dbe
Author: Adam Jackson <ajax redhat com>
Date: Mon May 2 12:15:28 2011 -0400
test-cogl-sub-texture: 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-sub-texture.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/tests/conform/test-cogl-sub-texture.c b/tests/conform/test-cogl-sub-texture.c
index b876a68..6cbafbf 100644
--- a/tests/conform/test-cogl-sub-texture.c
+++ b/tests/conform/test-cogl-sub-texture.c
@@ -2,6 +2,7 @@
#include <clutter/clutter.h>
#include <cogl/cogl.h>
#include <string.h>
+#include <stdlib.h>
#include "test-conform-common.h"
@@ -226,8 +227,8 @@ validate_result (TestState *state)
for (y = 0; y < 10; y++)
for (x = 0; x < 10; x++)
{
- g_assert (*(p++) == x + 40);
- g_assert (*(p++) == y + 20);
+ g_assert_cmpint (abs(*(p++) - (x + 40)), <=, 1);
+ g_assert_cmpint (abs(*(p++) - (y + 20)), <=, 1);
p += 2;
}
g_free (texture_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]