[gjs] Add test for System.addressOf()
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] Add test for System.addressOf()
- Date: Wed, 13 Mar 2013 16:46:23 +0000 (UTC)
commit 4b5b21ba36ec880e083a187f1dd03eee81ab2bfe
Author: Pavel Vasin <rat4vier gmail com>
Date: Tue Mar 5 10:42:28 2013 +0400
Add test for System.addressOf()
https://bugzilla.gnome.org/show_bug.cgi?id=695186
Makefile-test.am | 1 +
test/js/testSystem.js | 13 +++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/Makefile-test.am b/Makefile-test.am
index 11bb0a3..60beeab 100644
--- a/Makefile-test.am
+++ b/Makefile-test.am
@@ -177,6 +177,7 @@ EXTRA_DIST += \
test/js/testLocale.js \
test/js/testMainloop.js \
test/js/testSignals.js \
+ test/js/testSystem.js \
test/js/testTweener.js \
test/js/testUnicode.js \
test/run-with-dbus \
diff --git a/test/js/testSystem.js b/test/js/testSystem.js
new file mode 100644
index 0000000..c668c89
--- /dev/null
+++ b/test/js/testSystem.js
@@ -0,0 +1,13 @@
+// application/javascript;version=1.8
+
+const System = imports.system;
+
+function testAddressOf() {
+ let o1 = new Object();
+ let o2 = new Object();
+
+ assert(System.addressOf(o1) == System.addressOf(o1));
+ assert(System.addressOf(o1) != System.addressOf(o2));
+}
+
+gjstestRun();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]