[gjs: 5/6] testGDbus: Use a verbatim string for interface definition
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 5/6] testGDbus: Use a verbatim string for interface definition
- Date: Thu, 20 Jun 2019 05:12:00 +0000 (UTC)
commit 2e2157fedf954d70c6408f7404e53d3a3927fff8
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Mon Jun 17 17:11:24 2019 +0200
testGDbus: Use a verbatim string for interface definition
installed-tests/js/testGDBus.js | 185 ++++++++++++++++++++--------------------
1 file changed, 93 insertions(+), 92 deletions(-)
---
diff --git a/installed-tests/js/testGDBus.js b/installed-tests/js/testGDBus.js
index 61786b01..36d71c47 100644
--- a/installed-tests/js/testGDBus.js
+++ b/installed-tests/js/testGDBus.js
@@ -5,98 +5,99 @@ const {Gio, GjsPrivate, GLib} = imports.gi;
*
* *** NOTE: If you add stuff here, you need to update the Test class below.
*/
-var TestIface = '<node> \
-<interface name="org.gnome.gjs.Test"> \
-<method name="nonJsonFrobateStuff"> \
- <arg type="i" direction="in"/> \
- <arg type="s" direction="out"/> \
-</method> \
-<method name="frobateStuff"> \
- <arg type="a{sv}" direction="in"/> \
- <arg type="a{sv}" direction="out"/> \
-</method> \
-<method name="alwaysThrowException"> \
- <arg type="a{sv}" direction="in"/> \
- <arg type="a{sv}" direction="out"/> \
-</method> \
-<method name="thisDoesNotExist"/> \
-<method name="noInParameter"> \
- <arg type="s" direction="out"/> \
-</method> \
-<method name="multipleInArgs"> \
- <arg type="i" direction="in"/> \
- <arg type="i" direction="in"/> \
- <arg type="i" direction="in"/> \
- <arg type="i" direction="in"/> \
- <arg type="i" direction="in"/> \
- <arg type="s" direction="out"/> \
-</method> \
-<method name="noReturnValue"/> \
-<method name="emitSignal"/> \
-<method name="multipleOutValues"> \
- <arg type="s" direction="out"/> \
- <arg type="s" direction="out"/> \
- <arg type="s" direction="out"/> \
-</method> \
-<method name="oneArrayOut"> \
- <arg type="as" direction="out"/> \
-</method> \
-<method name="arrayOfArrayOut"> \
- <arg type="aas" direction="out"/> \
-</method> \
-<method name="multipleArrayOut"> \
- <arg type="as" direction="out"/> \
- <arg type="as" direction="out"/> \
-</method> \
-<method name="arrayOutBadSig"> \
- <arg type="i" direction="out"/> \
-</method> \
-<method name="byteArrayEcho"> \
- <arg type="ay" direction="in"/> \
- <arg type="ay" direction="out"/> \
-</method> \
-<method name="byteEcho"> \
- <arg type="y" direction="in"/> \
- <arg type="y" direction="out"/> \
-</method> \
-<method name="dictEcho"> \
- <arg type="a{sv}" direction="in"/> \
- <arg type="a{sv}" direction="out"/> \
-</method> \
-<method name="echo"> \
- <arg type="s" direction="in"/> \
- <arg type="i" direction="in"/> \
- <arg type="s" direction="out"/> \
- <arg type="i" direction="out"/> \
-</method> \
-<method name="structArray"> \
- <arg type="a(ii)" direction="out"/> \
-</method> \
-<method name="fdIn"> \
- <arg type="h" direction="in"/> \
- <arg type="ay" direction="out"/> \
-</method> \
-<method name="fdIn2"> \
- <arg type="h" direction="in"/> \
- <arg type="ay" direction="out"/> \
-</method> \
-<method name="fdOut"> \
- <arg type="ay" direction="in"/> \
- <arg type="h" direction="out"/> \
-</method> \
-<method name="fdOut2"> \
- <arg type="ay" direction="in"/> \
- <arg type="h" direction="out"/> \
-</method> \
-<signal name="signalFoo"> \
- <arg type="s" direction="out"/> \
-</signal> \
-<property name="PropReadOnly" type="b" access="read" /> \
-<property name="PropWriteOnly" type="s" access="write" /> \
-<property name="PropReadWrite" type="v" access="readwrite" /> \
-</interface> \
-</node>';
-
+var TestIface = `<node>
+<interface name="org.gnome.gjs.Test">
+<method name="nonJsonFrobateStuff">
+ <arg type="i" direction="in"/>
+ <arg type="s" direction="out"/>
+</method>
+<method name="frobateStuff">
+ <arg type="a{sv}" direction="in"/>
+ <arg type="a{sv}" direction="out"/>
+</method>
+<method name="alwaysThrowException">
+ <arg type="a{sv}" direction="in"/>
+ <arg type="a{sv}" direction="out"/>
+</method>
+<method name="thisDoesNotExist"/>
+<method name="noInParameter">
+ <arg type="s" direction="out"/>
+</method>
+<method name="multipleInArgs">
+ <arg type="i" direction="in"/>
+ <arg type="i" direction="in"/>
+ <arg type="i" direction="in"/>
+ <arg type="i" direction="in"/>
+ <arg type="i" direction="in"/>
+ <arg type="s" direction="out"/>
+</method>
+<method name="noReturnValue"/>
+<method name="emitSignal"/>
+<method name="multipleOutValues">
+ <arg type="s" direction="out"/>
+ <arg type="s" direction="out"/>
+ <arg type="s" direction="out"/>
+</method>
+<method name="oneArrayOut">
+ <arg type="as" direction="out"/>
+</method>
+<method name="arrayOfArrayOut">
+ <arg type="aas" direction="out"/>
+</method>
+<method name="multipleArrayOut">
+ <arg type="as" direction="out"/>
+ <arg type="as" direction="out"/>
+</method>
+<method name="arrayOutBadSig">
+ <arg type="i" direction="out"/>
+</method>
+<method name="byteArrayEcho">
+ <arg type="ay" direction="in"/>
+ <arg type="ay" direction="out"/>
+</method>
+<method name="byteEcho">
+ <arg type="y" direction="in"/>
+ <arg type="y" direction="out"/>
+</method>
+<method name="dictEcho">
+ <arg type="a{sv}" direction="in"/>
+ <arg type="a{sv}" direction="out"/>
+</method>
+<method name="echo">
+ <arg type="s" direction="in"/>
+ <arg type="i" direction="in"/>
+ <arg type="s" direction="out"/>
+ <arg type="i" direction="out"/>
+</method>
+<method name="structArray">
+ <arg type="a(ii)" direction="out"/>
+</method>
+<method name="fdIn">
+ <arg type="h" direction="in"/>
+ <arg type="ay" direction="out"/>
+</method>
+<method name="fdIn2">
+ <arg type="h" direction="in"/>
+ <arg type="ay" direction="out"/>
+</method>
+<method name="fdOut">
+ <arg type="ay" direction="in"/>
+ <arg type="h" direction="out"/>
+</method>
+<method name="fdOut2">
+ <arg type="ay" direction="in"/>
+ <arg type="h" direction="out"/>
+</method>
+<signal name="signalFoo">
+ <arg type="s" direction="out"/>
+</signal>
+<property name="PropReadOnly" type="d" access="read" />
+<property name="PropWriteOnly" type="s" access="write" />
+<property name="PropReadWrite" type="v" access="readwrite" />
+</interface>
+</node>`;
+
+const PROP_READ_ONLY_INITIAL_VALUE = Math.random();
const PROP_READ_WRITE_INITIAL_VALUE = 58;
const PROP_WRITE_ONLY_INITIAL_VALUE = "Initial value";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]