Ejemplo n.º 1
0
int main(void)
{
	validate_setup();
	validate_test();
	validate_teardown();

	return 0;
}
Ejemplo n.º 2
0
/* The various test_init functions are provided instead of a test setup
   function so that the JSON string used by the tests are kept in the test
   functions (and not in main()). */
static Visitor *validate_test_init_internal(TestInputVisitorData *data,
                                            const char *json_string,
                                            va_list *ap)
{
    validate_teardown(data, NULL);

    data->obj = qobject_from_jsonv(json_string, ap);
    g_assert(data->obj);

    data->qiv = qmp_input_visitor_new(data->obj, true);
    g_assert(data->qiv);
    return data->qiv;
}