[seed] tests: add test for null struct return values
- From: Tim Horton <hortont src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [seed] tests: add test for null struct return values
- Date: Mon, 11 Jan 2010 22:27:11 +0000 (UTC)
commit 707c97582d337de732d404ad6575712827f9f636
Author: Tim Horton <hortont424 gmail com>
Date: Mon Jan 11 17:15:26 2010 -0500
tests: add test for null struct return values
tests/javascript/structs/Makefile.am | 2 ++
tests/javascript/structs/struct-null.js | 14 ++++++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/tests/javascript/structs/Makefile.am b/tests/javascript/structs/Makefile.am
index 81044ea..79fefef 100644
--- a/tests/javascript/structs/Makefile.am
+++ b/tests/javascript/structs/Makefile.am
@@ -3,6 +3,7 @@ EXTRA_DIST = \
struct-set-member.js \
struct-constructor.js \
struct-nested-set.js \
+ struct-null.js \
struct-union-enumerate.js \
struct-enumerate.js \
struct-offsets.js \
@@ -13,6 +14,7 @@ TESTS = \
struct-set-member.js \
struct-constructor.js \
struct-nested-set.js \
+ struct-null.js \
struct-union-enumerate.js \
struct-enumerate.js \
struct-offsets.js
diff --git a/tests/javascript/structs/struct-null.js b/tests/javascript/structs/struct-null.js
new file mode 100755
index 0000000..5785711
--- /dev/null
+++ b/tests/javascript/structs/struct-null.js
@@ -0,0 +1,14 @@
+#!../../../src/seed
+
+testsuite = imports.testsuite;
+Gtk = imports.gi.Gtk;
+
+Gtk.init(Seed.argv);
+
+var iconTheme = Gtk.IconTheme.get_default();
+
+// returns NULL if icon not found
+var iconInfo = iconTheme.lookup_icon("fake icon name", 32);
+
+testsuite.assert(iconInfo === null)
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]