[gjs] build: Fix distcheck
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] build: Fix distcheck
- Date: Mon, 29 Sep 2014 13:15:13 +0000 (UTC)
commit 79a17ac96f9a8698c8da8afeaf60aea7a6b19bad
Author: Bastien Nocera <hadess hadess net>
Date: Mon Sep 29 14:28:56 2014 +0200
build: Fix distcheck
And move the testGtk.js interactive test to be an installed test.
Makefile-insttest.am | 1 +
Makefile-test.am | 4 ---
.../interactive => installed-tests/js}/testGtk.js | 23 +++++++++----------
3 files changed, 12 insertions(+), 16 deletions(-)
---
diff --git a/Makefile-insttest.am b/Makefile-insttest.am
index ca69021..fb27c36 100644
--- a/Makefile-insttest.am
+++ b/Makefile-insttest.am
@@ -117,6 +117,7 @@ dist_jstests_DATA += \
installed-tests/js/testFundamental.js \
installed-tests/js/testGIMarshalling.js \
installed-tests/js/testGObjectClass.js \
+ installed-tests/js/testGtk.js \
installed-tests/js/testGTypeClass.js \
installed-tests/js/testJS1_8.js \
installed-tests/js/testLang.js \
diff --git a/Makefile-test.am b/Makefile-test.am
index df68ef9..b91840b 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -2,10 +2,6 @@ EXTRA_DIST += \
test/run-with-dbus \
test/test-bus.conf
-# Other custom tests, not automated
-dist_noinst_DATA = \
- test/interactive/testGtk.js
-
RUN_WITH_DBUS = ${top_srcdir}/test/run-with-dbus --session --system
GTESTER = ${TESTS_ENVIRONMENT} ${RUN_WITH_DBUS} gtester
CLEANFILES += uninstalled-system-test-bus.conf uninstalled-test-bus.conf
diff --git a/test/interactive/testGtk.js b/installed-tests/js/testGtk.js
similarity index 71%
rename from test/interactive/testGtk.js
rename to installed-tests/js/testGtk.js
index acaf457..5f66486 100755
--- a/test/interactive/testGtk.js
+++ b/installed-tests/js/testGtk.js
@@ -4,6 +4,9 @@ const ByteArray = imports.byteArray;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
+const System = imports.system;
+
+const JSUnit = imports.jsUnit;
// This is ugly here, but usually it would be in a resource
const template = ' \
@@ -33,22 +36,18 @@ const MyComplexGtkSubclass = new Lang.Class({
this.parent(params);
this._internalLabel = this.get_template_child(MyComplexGtkSubclass, 'label-child');
- log(this._internalLabel);
+ JSUnit.assertNotEquals(this._internalLabel, null);
}
});
-function main() {
- let app = new Gtk.Application({ application_id: 'org.gnome.gjs.TestApplication' });
-
- app.connect('activate', function() {
- let win = new Gtk.ApplicationWindow({ application: app });
- let content = new MyComplexGtkSubclass();
+function testGtk() {
+ Gtk.init(null);
+ let win = new Gtk.Window({ type: Gtk.WindowType.TOPLEVEL });
+ let content = new MyComplexGtkSubclass();
- win.add(content);
- win.show();
- });
+ win.add(content);
- app.run(null);
+ JSUnit.assertEquals("label is set to 'Complex!'", 'Complex!', content._internalLabel.get_label());
}
-main();
+JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]