diff options
author | Havoc Pennington <hp@redhat.com> | 2003-04-08 22:07:09 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-04-08 22:07:09 +0000 |
commit | 0366385618ccc26789fdf3a9cc35ee038de071f6 (patch) | |
tree | f8974c9c04bc6a6692b50567ac5354664895d3e3 /test/data/invalid-messages | |
parent | 6c241c1035a74f9ad4a526424a0be5c816bc61cb (diff) |
2003-04-08 Havoc Pennington <hp@redhat.com>
* test/data/invalid-messages/array-with-mixed-types.message:
regression test that fails for the moment
* dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
tests for convenience
* dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
array of nil, it broke things.
* test/data/invalid-messages/array-of-nil.message: regression test
* test/data/valid-messages/array-of-array-of-uint32.message:
happened to write this so added it to suite
Diffstat (limited to 'test/data/invalid-messages')
-rw-r--r-- | test/data/invalid-messages/array-of-nil.message | 22 | ||||
-rw-r--r-- | test/data/invalid-messages/array-with-mixed-types.message | 47 |
2 files changed, 69 insertions, 0 deletions
diff --git a/test/data/invalid-messages/array-of-nil.message b/test/data/invalid-messages/array-of-nil.message new file mode 100644 index 00000000..e86e6a10 --- /dev/null +++ b/test/data/invalid-messages/array-of-nil.message @@ -0,0 +1,22 @@ +# Message with an array of NIL (not allowed) + +VALID_HEADER +FIELD_NAME name +TYPE STRING +STRING 'org.freedesktop.Foo' +END_LENGTH Header +ALIGN 8 +START_LENGTH Body +TYPE ARRAY +TYPE NIL +UINT32 5 + +## we want it to fail because of type nil, not because the length is no good +## so pad out the message with 5 bytes +BYTE 1 +BYTE 2 +BYTE 3 +BYTE 4 +BYTE 5 + +END_LENGTH Body diff --git a/test/data/invalid-messages/array-with-mixed-types.message b/test/data/invalid-messages/array-with-mixed-types.message new file mode 100644 index 00000000..a7ff1e69 --- /dev/null +++ b/test/data/invalid-messages/array-with-mixed-types.message @@ -0,0 +1,47 @@ +# Message with an array of array where the child arrays are of +# different types + +VALID_HEADER +FIELD_NAME name +TYPE STRING +STRING 'org.freedesktop.Foo' +END_LENGTH Header +ALIGN 8 +START_LENGTH Body + +TYPE ARRAY +TYPE ARRAY + +LENGTH Array +START_LENGTH Array + +## array of uint32 +TYPE UINT32 +LENGTH SubArray1 +START_LENGTH SubArray1 +UINT32 1 +UINT32 2 +UINT32 3 +END_LENGTH SubArray1 + +## array of uint32 +TYPE UINT32 +LENGTH SubArray2 +START_LENGTH SubArray2 +UINT32 4 +UINT32 5 +END_LENGTH SubArray2 + +## array of boolean +TYPE BOOLEAN +LENGTH SubArray3 +START_LENGTH SubArray3 +BOOLEAN false +BOOLEAN true +BOOLEAN false +BOOLEAN true +END_LENGTH SubArray3 + +END_LENGTH Array + +END_LENGTH Body |