diff options
Diffstat (limited to 'tests/complex_struct_test.sh')
-rwxr-xr-x | tests/complex_struct_test.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/complex_struct_test.sh b/tests/complex_struct_test.sh new file mode 100755 index 0000000..5d939b2 --- /dev/null +++ b/tests/complex_struct_test.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# json dbus bridge +# +# Copyright (c) 2010 by Rolf Offermanns <roffermanns@sysgo.com> +# +# To the extent possible under law, SYSGO AG has waived all copyright +# and related or neighboring rights to JSON-DBus-Bridge Demo Code. +# + +. `dirname $0`/test_setup.sh "com.pengutronix.jdb.Test.Complex" || exit + +jdb_test_echo EchoStruct "(aiuaiu)" "[ [ 1, 2, 3, 42, 99, -42 ], 4711, [ -42, 99, 42, 3, 2, 1 ], 1701 ]" && +jdb_test_echo EchoStructArray "a(aiu)" "[ [ [ 1, 2, 3, 42, 99, -42 ], 4711 ], [ [ -42, 99, 42, 3, 2, 1 ], 1701 ] ]" && +jdb_test_echo CountStructIntegerValues "a(aiu)" "[ [ [ 1, 2, 3, 42, 99, -42 ], 4711 ], [ [ -42, 99, 42, 3, 2, 1 ], 1701 ] ]" 6622 && +jdb_test_echo EchoStruct "(aiuaiu)" "[ [ 1, 2, null, 42, 99, -42 ], 4711, [ -42, 99, 42, 3, 2, 1 ], 1701 ]" null "unexpected 'null' element in json array." && +jdb_test_echo EchoStruct "(aiuaiu)" "[ [ 1, 2, 3, 42, 99, -42 ], 4711, [ -42, 99, 42, 3, 2, 1 ] ]" null "Aditional parameter expexted." && +jdb_test_echo EchoStruct "(aiuaiu)" "[ [ 1, 2, 3, 42, 99, -42 ], 4711, [ -42, 99, 42, 3, 2, 1 ], 1701, 12 ]" null "Unexpected extra parameter found." |