tests: add test for null struct return values
authorTim Horton <hortont424@gmail.com>
Mon, 11 Jan 2010 22:15:26 +0000 (17:15 -0500)
committerTim Horton <hortont424@gmail.com>
Mon, 11 Jan 2010 22:15:47 +0000 (17:15 -0500)
tests/javascript/structs/Makefile.am
tests/javascript/structs/struct-null.js [new file with mode: 0755]

index 81044ea..79fefef 100644 (file)
@@ -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 (executable)
index 0000000..5785711
--- /dev/null
@@ -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)
+