summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Makefile.am.inc15
-rw-r--r--test/endless/Makefile.am.inc4
-rw-r--r--test/endless/testCustomContainer.js26
3 files changed, 38 insertions, 7 deletions
diff --git a/test/Makefile.am.inc b/test/Makefile.am.inc
index 08dd5e8..74f6fe6 100644
--- a/test/Makefile.am.inc
+++ b/test/Makefile.am.inc
@@ -5,16 +5,13 @@ TEST_LIBS = @EOS_SDK_LIBS@ $(top_builddir)/libendless-@EOS_SDK_API_VERSION@.la
ENDLESS_TESTS_DIRECTORY = $(top_srcdir)/test
noinst_PROGRAMS = \
- test/endless/run-tests \
+ test/endless/run-tests \
test/smoke-tests/hello \
- test/demos/flexy-grid
-
-include test/endless/Makefile.am.inc
-include test/demos/Makefile.am.inc
-include test/smoke-tests/Makefile.am.inc
+ test/demos/flexy-grid
+# This variable will be updated in Makefile subdirs (test/endless/Makefile.am.inc)
javascript_tests = \
- test/tools/eos-application-manifest/testInit.js \
+ test/tools/eos-application-manifest/testInit.js \
test/webhelper/testTranslate.js \
test/webhelper/testWebActions.js \
test/wikipedia/models/testCategoryModel.js \
@@ -23,6 +20,10 @@ javascript_tests = \
$(NULL)
EXTRA_DIST += $(javascript_tests)
+include test/endless/Makefile.am.inc
+include test/demos/Makefile.am.inc
+include test/smoke-tests/Makefile.am.inc
+
# Run tests when running 'make check'
TESTS = \
test/endless/run-tests \
diff --git a/test/endless/Makefile.am.inc b/test/endless/Makefile.am.inc
index 8b78baf..ac030a3 100644
--- a/test/endless/Makefile.am.inc
+++ b/test/endless/Makefile.am.inc
@@ -16,3 +16,7 @@ test_endless_run_tests_SOURCES = \
$(NULL)
test_endless_run_tests_CPPFLAGS = $(TEST_FLAGS)
test_endless_run_tests_LDADD = $(TEST_LIBS)
+
+javascript_tests += \
+ test/endless/testCustomContainer.js \
+ $(NULL)
diff --git a/test/endless/testCustomContainer.js b/test/endless/testCustomContainer.js
new file mode 100644
index 0000000..7038beb
--- /dev/null
+++ b/test/endless/testCustomContainer.js
@@ -0,0 +1,26 @@
+const Endless = imports.gi.Endless;
+const Gtk = imports.gi.Gtk;
+const Lang = imports.lang;
+
+const TestContainer = new Lang.Class({
+ Name: 'TestContainer',
+ Extends: Endless.CustomContainer,
+
+ _init: function (params) {
+ this.parent(params);
+ },
+
+ vfunc_size_allocate: function (alloc) {
+ this.parent(alloc);
+ }
+});
+
+describe("CustomContainer", function () {
+ it("Instantiates a CustomContainer subclass to make sure no exceptions/segfaults", function () {
+ let createContainer = function () {
+ let container = new TestContainer();
+ };
+
+ expect(createContainer).not.toThrow();
+ });
+});