Count used RAMBlock pages for migration_dirty_pages
[qemu-kvm.git] / tests / test-qmp-input-visitor.c
blob1729667a6fd1216982eb476dca7215fc1f067364
1 /*
2 * QMP Input Visitor unit-tests.
4 * Copyright (C) 2011 Red Hat Inc.
6 * Authors:
7 * Luiz Capitulino <lcapitulino@redhat.com>
9 * This work is licensed under the terms of the GNU GPL, version 2 or later.
10 * See the COPYING file in the top-level directory.
13 #include <glib.h>
14 #include <stdarg.h>
16 #include "qemu-common.h"
17 #include "qapi/qmp-input-visitor.h"
18 #include "test-qapi-types.h"
19 #include "test-qapi-visit.h"
20 #include "qapi/qmp/types.h"
22 typedef struct TestInputVisitorData {
23 QObject *obj;
24 QmpInputVisitor *qiv;
25 } TestInputVisitorData;
27 static void visitor_input_teardown(TestInputVisitorData *data,
28 const void *unused)
30 qobject_decref(data->obj);
31 data->obj = NULL;
33 if (data->qiv) {
34 qmp_input_visitor_cleanup(data->qiv);
35 data->qiv = NULL;
39 /* This is provided instead of a test setup function so that the JSON
40 string used by the tests are kept in the test functions (and not
41 int main()) */
42 static GCC_FMT_ATTR(2, 3)
43 Visitor *visitor_input_test_init(TestInputVisitorData *data,
44 const char *json_string, ...)
46 Visitor *v;
47 va_list ap;
49 va_start(ap, json_string);
50 data->obj = qobject_from_jsonv(json_string, &ap);
51 va_end(ap);
53 g_assert(data->obj != NULL);
55 data->qiv = qmp_input_visitor_new(data->obj);
56 g_assert(data->qiv != NULL);
58 v = qmp_input_get_visitor(data->qiv);
59 g_assert(v != NULL);
61 return v;
64 /* similar to visitor_input_test_init(), but does not expect a string
65 * literal/format json_string argument and so can be used for
66 * programatically generated strings (and we can't pass in programatically
67 * generated strings via %s format parameters since qobject_from_jsonv()
68 * will wrap those in double-quotes and treat the entire object as a
69 * string)
71 static Visitor *visitor_input_test_init_raw(TestInputVisitorData *data,
72 const char *json_string)
74 Visitor *v;
76 data->obj = qobject_from_json(json_string);
78 g_assert(data->obj != NULL);
80 data->qiv = qmp_input_visitor_new(data->obj);
81 g_assert(data->qiv != NULL);
83 v = qmp_input_get_visitor(data->qiv);
84 g_assert(v != NULL);
86 return v;
89 static void test_visitor_in_int(TestInputVisitorData *data,
90 const void *unused)
92 int64_t res = 0, value = -42;
93 Error *errp = NULL;
94 Visitor *v;
96 v = visitor_input_test_init(data, "%" PRId64, value);
98 visit_type_int(v, &res, NULL, &errp);
99 g_assert(!errp);
100 g_assert_cmpint(res, ==, value);
103 static void test_visitor_in_int_overflow(TestInputVisitorData *data,
104 const void *unused)
106 int64_t res = 0;
107 Error *errp = NULL;
108 Visitor *v;
110 /* this will overflow a Qint/int64, so should be deserialized into
111 * a QFloat/double field instead, leading to an error if we pass it
112 * to visit_type_int. confirm this.
114 v = visitor_input_test_init(data, "%f", DBL_MAX);
116 visit_type_int(v, &res, NULL, &errp);
117 g_assert(errp);
118 error_free(errp);
121 static void test_visitor_in_bool(TestInputVisitorData *data,
122 const void *unused)
124 Error *errp = NULL;
125 bool res = false;
126 Visitor *v;
128 v = visitor_input_test_init(data, "true");
130 visit_type_bool(v, &res, NULL, &errp);
131 g_assert(!errp);
132 g_assert_cmpint(res, ==, true);
135 static void test_visitor_in_number(TestInputVisitorData *data,
136 const void *unused)
138 double res = 0, value = 3.14;
139 Error *errp = NULL;
140 Visitor *v;
142 v = visitor_input_test_init(data, "%f", value);
144 visit_type_number(v, &res, NULL, &errp);
145 g_assert(!errp);
146 g_assert_cmpfloat(res, ==, value);
149 static void test_visitor_in_string(TestInputVisitorData *data,
150 const void *unused)
152 char *res = NULL, *value = (char *) "Q E M U";
153 Error *errp = NULL;
154 Visitor *v;
156 v = visitor_input_test_init(data, "%s", value);
158 visit_type_str(v, &res, NULL, &errp);
159 g_assert(!errp);
160 g_assert_cmpstr(res, ==, value);
162 g_free(res);
165 static void test_visitor_in_enum(TestInputVisitorData *data,
166 const void *unused)
168 Error *errp = NULL;
169 Visitor *v;
170 EnumOne i;
172 for (i = 0; EnumOne_lookup[i]; i++) {
173 EnumOne res = -1;
175 v = visitor_input_test_init(data, "%s", EnumOne_lookup[i]);
177 visit_type_EnumOne(v, &res, NULL, &errp);
178 g_assert(!errp);
179 g_assert_cmpint(i, ==, res);
181 visitor_input_teardown(data, NULL);
184 data->obj = NULL;
185 data->qiv = NULL;
188 typedef struct TestStruct
190 int64_t integer;
191 bool boolean;
192 char *string;
193 } TestStruct;
195 static void visit_type_TestStruct(Visitor *v, TestStruct **obj,
196 const char *name, Error **errp)
198 Error *err = NULL;
199 if (!error_is_set(errp)) {
200 visit_start_struct(v, (void **)obj, "TestStruct", name, sizeof(TestStruct),
201 &err);
202 if (!err) {
203 visit_type_int(v, &(*obj)->integer, "integer", &err);
204 visit_type_bool(v, &(*obj)->boolean, "boolean", &err);
205 visit_type_str(v, &(*obj)->string, "string", &err);
207 /* Always call end_struct if start_struct succeeded. */
208 error_propagate(errp, err);
209 err = NULL;
210 visit_end_struct(v, &err);
212 error_propagate(errp, err);
216 static void test_visitor_in_struct(TestInputVisitorData *data,
217 const void *unused)
219 TestStruct *p = NULL;
220 Error *errp = NULL;
221 Visitor *v;
223 v = visitor_input_test_init(data, "{ 'integer': -42, 'boolean': true, 'string': 'foo' }");
225 visit_type_TestStruct(v, &p, NULL, &errp);
226 g_assert(!errp);
227 g_assert_cmpint(p->integer, ==, -42);
228 g_assert(p->boolean == true);
229 g_assert_cmpstr(p->string, ==, "foo");
231 g_free(p->string);
232 g_free(p);
235 static void check_and_free_str(char *str, const char *cmp)
237 g_assert_cmpstr(str, ==, cmp);
238 g_free(str);
241 static void test_visitor_in_struct_nested(TestInputVisitorData *data,
242 const void *unused)
244 UserDefNested *udp = NULL;
245 Error *errp = NULL;
246 Visitor *v;
248 v = visitor_input_test_init(data, "{ 'string0': 'string0', 'dict1': { 'string1': 'string1', 'dict2': { 'userdef1': { 'integer': 42, 'string': 'string' }, 'string2': 'string2'}}}");
250 visit_type_UserDefNested(v, &udp, NULL, &errp);
251 g_assert(!errp);
253 check_and_free_str(udp->string0, "string0");
254 check_and_free_str(udp->dict1.string1, "string1");
255 g_assert_cmpint(udp->dict1.dict2.userdef1->base->integer, ==, 42);
256 check_and_free_str(udp->dict1.dict2.userdef1->string, "string");
257 check_and_free_str(udp->dict1.dict2.string2, "string2");
258 g_assert(udp->dict1.has_dict3 == false);
260 g_free(udp->dict1.dict2.userdef1);
261 g_free(udp);
264 static void test_visitor_in_list(TestInputVisitorData *data,
265 const void *unused)
267 UserDefOneList *item, *head = NULL;
268 Error *errp = NULL;
269 Visitor *v;
270 int i;
272 v = visitor_input_test_init(data, "[ { 'string': 'string0', 'integer': 42 }, { 'string': 'string1', 'integer': 43 }, { 'string': 'string2', 'integer': 44 } ]");
274 visit_type_UserDefOneList(v, &head, NULL, &errp);
275 g_assert(!errp);
276 g_assert(head != NULL);
278 for (i = 0, item = head; item; item = item->next, i++) {
279 char string[12];
281 snprintf(string, sizeof(string), "string%d", i);
282 g_assert_cmpstr(item->value->string, ==, string);
283 g_assert_cmpint(item->value->base->integer, ==, 42 + i);
286 qapi_free_UserDefOneList(head);
289 static void test_visitor_in_union(TestInputVisitorData *data,
290 const void *unused)
292 Visitor *v;
293 Error *err = NULL;
294 UserDefUnion *tmp;
296 v = visitor_input_test_init(data, "{ 'type': 'b', 'integer': 41, 'data' : { 'integer': 42 } }");
298 visit_type_UserDefUnion(v, &tmp, NULL, &err);
299 g_assert(err == NULL);
300 g_assert_cmpint(tmp->kind, ==, USER_DEF_UNION_KIND_B);
301 g_assert_cmpint(tmp->integer, ==, 41);
302 g_assert_cmpint(tmp->b->integer, ==, 42);
303 qapi_free_UserDefUnion(tmp);
306 static void test_visitor_in_union_flat(TestInputVisitorData *data,
307 const void *unused)
309 Visitor *v;
310 Error *err = NULL;
311 UserDefFlatUnion *tmp;
313 v = visitor_input_test_init(data,
314 "{ 'enum1': 'value1', "
315 "'string': 'str', "
316 "'boolean': true }");
317 /* TODO when generator bug is fixed, add 'integer': 41 */
319 visit_type_UserDefFlatUnion(v, &tmp, NULL, &err);
320 g_assert(err == NULL);
321 g_assert_cmpint(tmp->kind, ==, ENUM_ONE_VALUE1);
322 g_assert_cmpstr(tmp->string, ==, "str");
323 /* TODO g_assert_cmpint(tmp->integer, ==, 41); */
324 g_assert_cmpint(tmp->value1->boolean, ==, true);
325 qapi_free_UserDefFlatUnion(tmp);
328 static void test_visitor_in_union_anon(TestInputVisitorData *data,
329 const void *unused)
331 Visitor *v;
332 Error *err = NULL;
333 UserDefAnonUnion *tmp;
335 v = visitor_input_test_init(data, "42");
337 visit_type_UserDefAnonUnion(v, &tmp, NULL, &err);
338 g_assert(err == NULL);
339 g_assert_cmpint(tmp->kind, ==, USER_DEF_ANON_UNION_KIND_I);
340 g_assert_cmpint(tmp->i, ==, 42);
341 qapi_free_UserDefAnonUnion(tmp);
344 static void test_native_list_integer_helper(TestInputVisitorData *data,
345 const void *unused,
346 UserDefNativeListUnionKind kind)
348 UserDefNativeListUnion *cvalue = NULL;
349 Error *err = NULL;
350 Visitor *v;
351 GString *gstr_list = g_string_new("");
352 GString *gstr_union = g_string_new("");
353 int i;
355 for (i = 0; i < 32; i++) {
356 g_string_append_printf(gstr_list, "%d", i);
357 if (i != 31) {
358 g_string_append(gstr_list, ", ");
361 g_string_append_printf(gstr_union, "{ 'type': '%s', 'data': [ %s ] }",
362 UserDefNativeListUnionKind_lookup[kind],
363 gstr_list->str);
364 v = visitor_input_test_init_raw(data, gstr_union->str);
366 visit_type_UserDefNativeListUnion(v, &cvalue, NULL, &err);
367 g_assert(err == NULL);
368 g_assert(cvalue != NULL);
369 g_assert_cmpint(cvalue->kind, ==, kind);
371 switch (kind) {
372 case USER_DEF_NATIVE_LIST_UNION_KIND_INTEGER: {
373 intList *elem = NULL;
374 for (i = 0, elem = cvalue->integer; elem; elem = elem->next, i++) {
375 g_assert_cmpint(elem->value, ==, i);
377 break;
379 case USER_DEF_NATIVE_LIST_UNION_KIND_S8: {
380 int8List *elem = NULL;
381 for (i = 0, elem = cvalue->s8; elem; elem = elem->next, i++) {
382 g_assert_cmpint(elem->value, ==, i);
384 break;
386 case USER_DEF_NATIVE_LIST_UNION_KIND_S16: {
387 int16List *elem = NULL;
388 for (i = 0, elem = cvalue->s16; elem; elem = elem->next, i++) {
389 g_assert_cmpint(elem->value, ==, i);
391 break;
393 case USER_DEF_NATIVE_LIST_UNION_KIND_S32: {
394 int32List *elem = NULL;
395 for (i = 0, elem = cvalue->s32; elem; elem = elem->next, i++) {
396 g_assert_cmpint(elem->value, ==, i);
398 break;
400 case USER_DEF_NATIVE_LIST_UNION_KIND_S64: {
401 int64List *elem = NULL;
402 for (i = 0, elem = cvalue->s64; elem; elem = elem->next, i++) {
403 g_assert_cmpint(elem->value, ==, i);
405 break;
407 case USER_DEF_NATIVE_LIST_UNION_KIND_U8: {
408 uint8List *elem = NULL;
409 for (i = 0, elem = cvalue->u8; elem; elem = elem->next, i++) {
410 g_assert_cmpint(elem->value, ==, i);
412 break;
414 case USER_DEF_NATIVE_LIST_UNION_KIND_U16: {
415 uint16List *elem = NULL;
416 for (i = 0, elem = cvalue->u16; elem; elem = elem->next, i++) {
417 g_assert_cmpint(elem->value, ==, i);
419 break;
421 case USER_DEF_NATIVE_LIST_UNION_KIND_U32: {
422 uint32List *elem = NULL;
423 for (i = 0, elem = cvalue->u32; elem; elem = elem->next, i++) {
424 g_assert_cmpint(elem->value, ==, i);
426 break;
428 case USER_DEF_NATIVE_LIST_UNION_KIND_U64: {
429 uint64List *elem = NULL;
430 for (i = 0, elem = cvalue->u64; elem; elem = elem->next, i++) {
431 g_assert_cmpint(elem->value, ==, i);
433 break;
435 default:
436 g_assert_not_reached();
439 g_string_free(gstr_union, true);
440 g_string_free(gstr_list, true);
441 qapi_free_UserDefNativeListUnion(cvalue);
444 static void test_visitor_in_native_list_int(TestInputVisitorData *data,
445 const void *unused)
447 test_native_list_integer_helper(data, unused,
448 USER_DEF_NATIVE_LIST_UNION_KIND_INTEGER);
451 static void test_visitor_in_native_list_int8(TestInputVisitorData *data,
452 const void *unused)
454 test_native_list_integer_helper(data, unused,
455 USER_DEF_NATIVE_LIST_UNION_KIND_S8);
458 static void test_visitor_in_native_list_int16(TestInputVisitorData *data,
459 const void *unused)
461 test_native_list_integer_helper(data, unused,
462 USER_DEF_NATIVE_LIST_UNION_KIND_S16);
465 static void test_visitor_in_native_list_int32(TestInputVisitorData *data,
466 const void *unused)
468 test_native_list_integer_helper(data, unused,
469 USER_DEF_NATIVE_LIST_UNION_KIND_S32);
472 static void test_visitor_in_native_list_int64(TestInputVisitorData *data,
473 const void *unused)
475 test_native_list_integer_helper(data, unused,
476 USER_DEF_NATIVE_LIST_UNION_KIND_S64);
479 static void test_visitor_in_native_list_uint8(TestInputVisitorData *data,
480 const void *unused)
482 test_native_list_integer_helper(data, unused,
483 USER_DEF_NATIVE_LIST_UNION_KIND_U8);
486 static void test_visitor_in_native_list_uint16(TestInputVisitorData *data,
487 const void *unused)
489 test_native_list_integer_helper(data, unused,
490 USER_DEF_NATIVE_LIST_UNION_KIND_U16);
493 static void test_visitor_in_native_list_uint32(TestInputVisitorData *data,
494 const void *unused)
496 test_native_list_integer_helper(data, unused,
497 USER_DEF_NATIVE_LIST_UNION_KIND_U32);
500 static void test_visitor_in_native_list_uint64(TestInputVisitorData *data,
501 const void *unused)
503 test_native_list_integer_helper(data, unused,
504 USER_DEF_NATIVE_LIST_UNION_KIND_U64);
507 static void test_visitor_in_native_list_bool(TestInputVisitorData *data,
508 const void *unused)
510 UserDefNativeListUnion *cvalue = NULL;
511 boolList *elem = NULL;
512 Error *err = NULL;
513 Visitor *v;
514 GString *gstr_list = g_string_new("");
515 GString *gstr_union = g_string_new("");
516 int i;
518 for (i = 0; i < 32; i++) {
519 g_string_append_printf(gstr_list, "%s",
520 (i % 3 == 0) ? "true" : "false");
521 if (i != 31) {
522 g_string_append(gstr_list, ", ");
525 g_string_append_printf(gstr_union, "{ 'type': 'boolean', 'data': [ %s ] }",
526 gstr_list->str);
527 v = visitor_input_test_init_raw(data, gstr_union->str);
529 visit_type_UserDefNativeListUnion(v, &cvalue, NULL, &err);
530 g_assert(err == NULL);
531 g_assert(cvalue != NULL);
532 g_assert_cmpint(cvalue->kind, ==, USER_DEF_NATIVE_LIST_UNION_KIND_BOOLEAN);
534 for (i = 0, elem = cvalue->boolean; elem; elem = elem->next, i++) {
535 g_assert_cmpint(elem->value, ==, (i % 3 == 0) ? 1 : 0);
538 g_string_free(gstr_union, true);
539 g_string_free(gstr_list, true);
540 qapi_free_UserDefNativeListUnion(cvalue);
543 static void test_visitor_in_native_list_string(TestInputVisitorData *data,
544 const void *unused)
546 UserDefNativeListUnion *cvalue = NULL;
547 strList *elem = NULL;
548 Error *err = NULL;
549 Visitor *v;
550 GString *gstr_list = g_string_new("");
551 GString *gstr_union = g_string_new("");
552 int i;
554 for (i = 0; i < 32; i++) {
555 g_string_append_printf(gstr_list, "'%d'", i);
556 if (i != 31) {
557 g_string_append(gstr_list, ", ");
560 g_string_append_printf(gstr_union, "{ 'type': 'string', 'data': [ %s ] }",
561 gstr_list->str);
562 v = visitor_input_test_init_raw(data, gstr_union->str);
564 visit_type_UserDefNativeListUnion(v, &cvalue, NULL, &err);
565 g_assert(err == NULL);
566 g_assert(cvalue != NULL);
567 g_assert_cmpint(cvalue->kind, ==, USER_DEF_NATIVE_LIST_UNION_KIND_STRING);
569 for (i = 0, elem = cvalue->string; elem; elem = elem->next, i++) {
570 gchar str[8];
571 sprintf(str, "%d", i);
572 g_assert_cmpstr(elem->value, ==, str);
575 g_string_free(gstr_union, true);
576 g_string_free(gstr_list, true);
577 qapi_free_UserDefNativeListUnion(cvalue);
580 #define DOUBLE_STR_MAX 16
582 static void test_visitor_in_native_list_number(TestInputVisitorData *data,
583 const void *unused)
585 UserDefNativeListUnion *cvalue = NULL;
586 numberList *elem = NULL;
587 Error *err = NULL;
588 Visitor *v;
589 GString *gstr_list = g_string_new("");
590 GString *gstr_union = g_string_new("");
591 int i;
593 for (i = 0; i < 32; i++) {
594 g_string_append_printf(gstr_list, "%f", (double)i / 3);
595 if (i != 31) {
596 g_string_append(gstr_list, ", ");
599 g_string_append_printf(gstr_union, "{ 'type': 'number', 'data': [ %s ] }",
600 gstr_list->str);
601 v = visitor_input_test_init_raw(data, gstr_union->str);
603 visit_type_UserDefNativeListUnion(v, &cvalue, NULL, &err);
604 g_assert(err == NULL);
605 g_assert(cvalue != NULL);
606 g_assert_cmpint(cvalue->kind, ==, USER_DEF_NATIVE_LIST_UNION_KIND_NUMBER);
608 for (i = 0, elem = cvalue->number; elem; elem = elem->next, i++) {
609 GString *double_expected = g_string_new("");
610 GString *double_actual = g_string_new("");
612 g_string_printf(double_expected, "%.6f", (double)i / 3);
613 g_string_printf(double_actual, "%.6f", elem->value);
614 g_assert_cmpstr(double_expected->str, ==, double_actual->str);
616 g_string_free(double_expected, true);
617 g_string_free(double_actual, true);
620 g_string_free(gstr_union, true);
621 g_string_free(gstr_list, true);
622 qapi_free_UserDefNativeListUnion(cvalue);
625 static void input_visitor_test_add(const char *testpath,
626 TestInputVisitorData *data,
627 void (*test_func)(TestInputVisitorData *data, const void *user_data))
629 g_test_add(testpath, TestInputVisitorData, data, NULL, test_func,
630 visitor_input_teardown);
633 static void test_visitor_in_errors(TestInputVisitorData *data,
634 const void *unused)
636 TestStruct *p = NULL;
637 Error *errp = NULL;
638 Visitor *v;
640 v = visitor_input_test_init(data, "{ 'integer': false, 'boolean': 'foo', 'string': -42 }");
642 visit_type_TestStruct(v, &p, NULL, &errp);
643 g_assert(errp);
644 g_assert(p->string == NULL);
646 error_free(errp);
647 g_free(p->string);
648 g_free(p);
651 int main(int argc, char **argv)
653 TestInputVisitorData in_visitor_data;
655 g_test_init(&argc, &argv, NULL);
657 input_visitor_test_add("/visitor/input/int",
658 &in_visitor_data, test_visitor_in_int);
659 input_visitor_test_add("/visitor/input/int_overflow",
660 &in_visitor_data, test_visitor_in_int_overflow);
661 input_visitor_test_add("/visitor/input/bool",
662 &in_visitor_data, test_visitor_in_bool);
663 input_visitor_test_add("/visitor/input/number",
664 &in_visitor_data, test_visitor_in_number);
665 input_visitor_test_add("/visitor/input/string",
666 &in_visitor_data, test_visitor_in_string);
667 input_visitor_test_add("/visitor/input/enum",
668 &in_visitor_data, test_visitor_in_enum);
669 input_visitor_test_add("/visitor/input/struct",
670 &in_visitor_data, test_visitor_in_struct);
671 input_visitor_test_add("/visitor/input/struct-nested",
672 &in_visitor_data, test_visitor_in_struct_nested);
673 input_visitor_test_add("/visitor/input/list",
674 &in_visitor_data, test_visitor_in_list);
675 input_visitor_test_add("/visitor/input/union",
676 &in_visitor_data, test_visitor_in_union);
677 input_visitor_test_add("/visitor/input/union-flat",
678 &in_visitor_data, test_visitor_in_union_flat);
679 input_visitor_test_add("/visitor/input/union-anon",
680 &in_visitor_data, test_visitor_in_union_anon);
681 input_visitor_test_add("/visitor/input/errors",
682 &in_visitor_data, test_visitor_in_errors);
683 input_visitor_test_add("/visitor/input/native_list/int",
684 &in_visitor_data,
685 test_visitor_in_native_list_int);
686 input_visitor_test_add("/visitor/input/native_list/int8",
687 &in_visitor_data,
688 test_visitor_in_native_list_int8);
689 input_visitor_test_add("/visitor/input/native_list/int16",
690 &in_visitor_data,
691 test_visitor_in_native_list_int16);
692 input_visitor_test_add("/visitor/input/native_list/int32",
693 &in_visitor_data,
694 test_visitor_in_native_list_int32);
695 input_visitor_test_add("/visitor/input/native_list/int64",
696 &in_visitor_data,
697 test_visitor_in_native_list_int64);
698 input_visitor_test_add("/visitor/input/native_list/uint8",
699 &in_visitor_data,
700 test_visitor_in_native_list_uint8);
701 input_visitor_test_add("/visitor/input/native_list/uint16",
702 &in_visitor_data,
703 test_visitor_in_native_list_uint16);
704 input_visitor_test_add("/visitor/input/native_list/uint32",
705 &in_visitor_data,
706 test_visitor_in_native_list_uint32);
707 input_visitor_test_add("/visitor/input/native_list/uint64",
708 &in_visitor_data, test_visitor_in_native_list_uint64);
709 input_visitor_test_add("/visitor/input/native_list/bool",
710 &in_visitor_data, test_visitor_in_native_list_bool);
711 input_visitor_test_add("/visitor/input/native_list/str",
712 &in_visitor_data, test_visitor_in_native_list_string);
713 input_visitor_test_add("/visitor/input/native_list/number",
714 &in_visitor_data, test_visitor_in_native_list_number);
716 g_test_run();
718 return 0;