[seed] Fixing the signal-connect.js test
- From: Danilo Cesar Lemes de Paula <danilocesar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed] Fixing the signal-connect.js test
- Date: Thu, 6 Oct 2016 17:47:34 +0000 (UTC)
commit 30c3efbe2c5d444ec38468f27a4d83eabdc002ef
Author: Danilo Cesar Lemes de Paula <danilo cesar collabora co uk>
Date: Thu Oct 6 09:47:16 2016 -0300
Fixing the signal-connect.js test
It was failing due to what I believe be a bug in GTK.
After calling widget_set_opacity(X), widget_get_opacity() won't
return X as the set_opacity rounds the value.
tests/javascript/signals/Makefile.am | 1 -
tests/javascript/signals/signal-connect.js | 6 +++++-
2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/tests/javascript/signals/Makefile.am b/tests/javascript/signals/Makefile.am
index bb56407..f5416ad 100644
--- a/tests/javascript/signals/Makefile.am
+++ b/tests/javascript/signals/Makefile.am
@@ -24,7 +24,6 @@ TESTS = \
signal-userdata.js
XFAIL_TESTS = \
- signal-connect.js \
$(NULL)
-include $(top_srcdir)/git.mk
diff --git a/tests/javascript/signals/signal-connect.js b/tests/javascript/signals/signal-connect.js
index 38b717a..33b3f2d 100755
--- a/tests/javascript/signals/signal-connect.js
+++ b/tests/javascript/signals/signal-connect.js
@@ -8,7 +8,11 @@ function handle_opacity_change(obj, gobject, user_data)
{
testsuite.assert(user_data instanceof Gtk.Button)
testsuite.assert(user_data === button)
- testsuite.assert(obj.opacity == 0.5)
+ // XXX: The following test got replaced because of a probably bug in Gtk.
+ // widget_set_opacity(X) gets rounded, so when you ask for get_opacity the
+ // number might not be the same
+ //testsuite.assert(obj.opacity == 0.5)
+ testsuite.assert(Math.abs(obj.opacity - 0.5) < 0.01)
}
win = new Gtk.Window()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]