1 check that blobmsg is producing expected results:
3 $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
5 $ valgrind --quiet --leak-check=full test-blobmsg
17 -9223372036854775808 (i64)
18 9223372036854775807 (i64)
22 \tdouble : 133.700000 (dbl) (esc)
24 \tpoo : 100 (i8) (esc)
25 \tmoo-min : -128 (i8) (esc)
26 \tmoo-max : 127 (i8) (esc)
27 \tbar-min : -32768 (i16) (esc)
28 \tbar-max : 32767 (i16) (esc)
29 \tbaz-min : -2147483648 (i32) (esc)
30 \tbaz-max : 2147483647 (i32) (esc)
31 \ttaz-min : -9223372036854775808 (i64) (esc)
32 \ttaz-max : 9223372036854775807 (i64) (esc)
33 \tworld : 2 (str) (esc)
36 [*] blobmsg to json: {"message":"Hello, world!","testdata":{"double":133.700000,"foo":false,"poo":true,"moo-min":true,"moo-max":true,"bar-min":-32768,"bar-max":32767,"baz-min":-2147483648,"baz-max":2147483647,"taz-min":-9223372036854775808,"taz-max":9223372036854775807,"world":"2"},"list":[false,true,true,true,-32768,32767,-2147483648,2147483647,-9223372036854775808,9223372036854775807,133.700000]}
38 [*] blobmsg from json:
39 Message: Hello, world!
54 \tdouble : 133.700000 (dbl) (esc)
57 \tmoo-min : 1 (i8) (esc)
58 \tmoo-max : 1 (i8) (esc)
59 \tbar-min : -32768 (i32) (esc)
60 \tbar-max : 32767 (i32) (esc)
61 \tbaz-min : -2147483648 (i32) (esc)
62 \tbaz-max : 2147483647 (i32) (esc)
63 \ttaz-min : -2147483648 (i32) (esc)
64 \ttaz-max : 2147483647 (i32) (esc)
65 \tworld : 2 (str) (esc)
70 Message: Hello, world!
80 -9223372036854775808 (i64)
81 9223372036854775807 (i64)
85 \tdouble : 133.700000 (dbl) (esc)
87 \tpoo : 100 (i8) (esc)
88 \tmoo-min : -128 (i8) (esc)
89 \tmoo-max : 127 (i8) (esc)
90 \tbar-min : -32768 (i16) (esc)
91 \tbar-max : 32767 (i16) (esc)
92 \tbaz-min : -2147483648 (i32) (esc)
93 \tbaz-max : 2147483647 (i32) (esc)
94 \ttaz-min : -9223372036854775808 (i64) (esc)
95 \ttaz-max : 9223372036854775807 (i64) (esc)
96 \tworld : 2 (str) (esc)
99 [*] blobmsg to json: {"message":"Hello, world!","testdata":{"double":133.700000,"foo":false,"poo":true,"moo-min":true,"moo-max":true,"bar-min":-32768,"bar-max":32767,"baz-min":-2147483648,"baz-max":2147483647,"taz-min":-9223372036854775808,"taz-max":9223372036854775807,"world":"2"},"list":[false,true,true,true,-32768,32767,-2147483648,2147483647,-9223372036854775808,9223372036854775807,133.700000]}
101 [*] blobmsg from json:
102 Message: Hello, world!
117 \tdouble : 133.700000 (dbl) (esc)
120 \tmoo-min : 1 (i8) (esc)
121 \tmoo-max : 1 (i8) (esc)
122 \tbar-min : -32768 (i32) (esc)
123 \tbar-max : 32767 (i32) (esc)
124 \tbaz-min : -2147483648 (i32) (esc)
125 \tbaz-max : 2147483647 (i32) (esc)
126 \ttaz-min : -2147483648 (i32) (esc)
127 \ttaz-max : 2147483647 (i32) (esc)
128 \tworld : 2 (str) (esc)
133 Message: Hello, world!
143 -9223372036854775808 (i64)
144 9223372036854775807 (i64)
148 \tdouble : 133.700000 (dbl) (esc)
150 \tpoo : 100 (i8) (esc)
151 \tmoo-min : -128 (i8) (esc)
152 \tmoo-max : 127 (i8) (esc)
153 \tbar-min : -32768 (i16) (esc)
154 \tbar-max : 32767 (i16) (esc)
155 \tbaz-min : -2147483648 (i32) (esc)
156 \tbaz-max : 2147483647 (i32) (esc)
157 \ttaz-min : -9223372036854775808 (i64) (esc)
158 \ttaz-max : 9223372036854775807 (i64) (esc)
159 \tworld : 2 (str) (esc)
162 [*] blobmsg to json: {"message":"Hello, world!","testdata":{"double":133.700000,"foo":false,"poo":true,"moo-min":true,"moo-max":true,"bar-min":-32768,"bar-max":32767,"baz-min":-2147483648,"baz-max":2147483647,"taz-min":-9223372036854775808,"taz-max":9223372036854775807,"world":"2"},"list":[false,true,true,true,-32768,32767,-2147483648,2147483647,-9223372036854775808,9223372036854775807,133.700000]}
164 [*] blobmsg from json:
165 Message: Hello, world!
180 \tdouble : 133.700000 (dbl) (esc)
183 \tmoo-min : 1 (i8) (esc)
184 \tmoo-max : 1 (i8) (esc)
185 \tbar-min : -32768 (i32) (esc)
186 \tbar-max : 32767 (i32) (esc)
187 \tbaz-min : -2147483648 (i32) (esc)
188 \tbaz-max : 2147483647 (i32) (esc)
189 \ttaz-min : -2147483648 (i32) (esc)
190 \ttaz-max : 2147483647 (i32) (esc)
191 \tworld : 2 (str) (esc)
196 Message: Hello, world!
206 -9223372036854775808 (i64)
207 9223372036854775807 (i64)
211 \tdouble : 133.700000 (dbl) (esc)
213 \tpoo : 100 (i8) (esc)
214 \tmoo-min : -128 (i8) (esc)
215 \tmoo-max : 127 (i8) (esc)
216 \tbar-min : -32768 (i16) (esc)
217 \tbar-max : 32767 (i16) (esc)
218 \tbaz-min : -2147483648 (i32) (esc)
219 \tbaz-max : 2147483647 (i32) (esc)
220 \ttaz-min : -9223372036854775808 (i64) (esc)
221 \ttaz-max : 9223372036854775807 (i64) (esc)
222 \tworld : 2 (str) (esc)
225 [*] blobmsg to json: {"message":"Hello, world!","testdata":{"double":133.700000,"foo":false,"poo":true,"moo-min":true,"moo-max":true,"bar-min":-32768,"bar-max":32767,"baz-min":-2147483648,"baz-max":2147483647,"taz-min":-9223372036854775808,"taz-max":9223372036854775807,"world":"2"},"list":[false,true,true,true,-32768,32767,-2147483648,2147483647,-9223372036854775808,9223372036854775807,133.700000]}
227 [*] blobmsg from json:
228 Message: Hello, world!
243 \tdouble : 133.700000 (dbl) (esc)
246 \tmoo-min : 1 (i8) (esc)
247 \tmoo-max : 1 (i8) (esc)
248 \tbar-min : -32768 (i32) (esc)
249 \tbar-max : 32767 (i32) (esc)
250 \tbaz-min : -2147483648 (i32) (esc)
251 \tbaz-max : 2147483647 (i32) (esc)
252 \ttaz-min : -2147483648 (i32) (esc)
253 \ttaz-max : 2147483647 (i32) (esc)
254 \tworld : 2 (str) (esc)