summaryrefslogtreecommitdiffstats
path: root/test/data/valid-messages
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2003-04-10 11:04:24 +0000
committerAlexander Larsson <alexl@redhat.com>2003-04-10 11:04:24 +0000
commite84c3a03b3be9cfc351ca8e0b9b935cca455e672 (patch)
tree55faf4c7cdead5cb59e8c36c3e8fe136673b89cf /test/data/valid-messages
parent51781f541094a4936d47119cd62682e0431c41e9 (diff)
2003-04-10 Alexander Larsson <alexl@redhat.com>
* dbus/dbus-marshal.[ch]: Add array_type_pos argument to _dbus_marshal_validate_arg. Let you pass a NULL end_pos to _dbus_marshal_validate_type. * dbus/dbus-message.[ch]: Multi-dimensional arrays have full type specification in the outermost array. Iter code re-arranged to handle this. Added some more iter tests. * doc/dbus-specification.sgml: Add me to authors. Remove old FIXME. Update new array encoding description. Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description. * test/data/invalid-messages/array-with-mixed-types.message: * test/data/valid-messages/array-of-array-of-uint32.message: Change to the new array format. * test/data/invalid-messages/too-short-dict.message: Fix bug in test. * test/data/valid-messages/recursive-types.message: Fix up and extend test.
Diffstat (limited to 'test/data/valid-messages')
-rw-r--r--test/data/valid-messages/array-of-array-of-uint32.message3
-rw-r--r--test/data/valid-messages/recursive-types.message79
2 files changed, 58 insertions, 24 deletions
diff --git a/test/data/valid-messages/array-of-array-of-uint32.message b/test/data/valid-messages/array-of-array-of-uint32.message
index 6baf4c36..82b8273d 100644
--- a/test/data/valid-messages/array-of-array-of-uint32.message
+++ b/test/data/valid-messages/array-of-array-of-uint32.message
@@ -10,12 +10,12 @@ START_LENGTH Body
TYPE ARRAY
TYPE ARRAY
+TYPE UINT32
LENGTH Array
START_LENGTH Array
## array of uint32
-TYPE UINT32
LENGTH SubArray1
START_LENGTH SubArray1
UINT32 1
@@ -24,7 +24,6 @@ UINT32 3
END_LENGTH SubArray1
## array of uint32
-TYPE UINT32
LENGTH SubArray2
START_LENGTH SubArray2
UINT32 4
diff --git a/test/data/valid-messages/recursive-types.message b/test/data/valid-messages/recursive-types.message
index b7608041..2ac6ad13 100644
--- a/test/data/valid-messages/recursive-types.message
+++ b/test/data/valid-messages/recursive-types.message
@@ -10,56 +10,91 @@ STRING 'org.freedesktop.Foo'
END_LENGTH Header
START_LENGTH Body
+# Everything is inside a dict
+TYPE DICT
+LENGTH Dict1
+START_LENGTH Dict1
+
+# first dict entry is an array of array of uint32
+STRING 'mega-uint-array'
+TYPE ARRAY
TYPE ARRAY
TYPE ARRAY
+TYPE UINT32
LENGTH Array1
START_LENGTH Array1
-
-TYPE UINT32
+LENGTH Array1_1
+START_LENGTH Array1_1
UINT32_ARRAY { 1, 2, 3, 4, 5}
+UINT32_ARRAY { 2, 3, 4, 5, 1}
+UINT32_ARRAY { 3, 4, 5, 1, 2}
+END_LENGTH Array1_1
+LENGTH Array1_2
+START_LENGTH Array1_2
+UINT32_ARRAY { 4, 5, 6, 7, 8}
+UINT32_ARRAY { 5, 6, 7, 8, 4}
+END_LENGTH Array1_2
+
+END_LENGTH Array1
+# second dict entry is an array of strings
+STRING 'string-array'
+TYPE ARRAY
TYPE STRING
STRING_ARRAY { 'a', 'string', 'array'}
-
+# third dict entry is another dict
+STRING 'nested-dict'
TYPE DICT
-LENGTH Array2
-START_LENGTH Array2
-
-LENGTH Dict1
-START_LENGTH Dict1
-STRING 'uint32'
-TYPE UINT32
-UINT32 1234
-STRING uint32'
-TYPE INT32
-INT32 1234
-END_LENGTH Dict1
-
LENGTH Dict2
START_LENGTH Dict2
-STRING 'dict'
+STRING 'string'
+TYPE STRING
+STRING 'a deeply nested string'
+
+STRING 'super-nested-dict'
TYPE DICT
LENGTH Dict3
START_LENGTH Dict3
+
STRING 'double-array'
TYPE ARRAY
TYPE DOUBLE
DOUBLE_ARRAY {1.0, 2.0, 3.0}
+
+STRING 'dict-array'
+TYPE ARRAY
+TYPE DICT
+LENGTH Array2
+START_LENGTH Array2
+
+LENGTH Dict4
+START_LENGTH Dict4
+STRING 'key4'
+TYPE BYTE
+BYTE '4'
+END_LENGTH Dict4
+
+LENGTH Dict5
+START_LENGTH Dict5
+STRING 'key5'
+TYPE BYTE
+BYTE '5'
+END_LENGTH Dict5
+
+END_LENGTH Array2
+
STRING 'boolean'
TYPE BOOLEAN
BOOLEAN false
+
END_LENGTH Dict3
END_LENGTH Dict2
-END_LENGTH Array2
-
-
-END_LENGTH Array1
-
+END_LENGTH Dict1
END_LENGTH Body