static void test_struct(gconstpointer opaque)

{

    TestArgs *args = (TestArgs *) opaque;

    const SerializeOps *ops = args->ops;

    TestStruct *ts = struct_create();

    TestStruct *ts_copy = NULL;

    Error *err = NULL;

    void *serialize_data;



    ops->serialize(ts, &serialize_data, visit_struct, &err);

    ops->deserialize((void **)&ts_copy, serialize_data, visit_struct, &err); 



    g_assert(err == NULL);

    struct_compare(ts, ts_copy);



    struct_cleanup(ts);

    struct_cleanup(ts_copy);



    ops->cleanup(serialize_data);

    g_free(args);

}

static void test_struct(gconstpointer opaque)

{

    TestArgs *args = (TestArgs *) opaque;

    const SerializeOps *ops = args->ops;

    TestStruct *ts = struct_create();

    TestStruct *ts_copy = NULL;

    Error *err = NULL;

    void *serialize_data;



    ops->serialize(ts, &serialize_data, visit_struct, &err);

    ops->deserialize((void **)&ts_copy, serialize_data, visit_struct, &err); 



    g_assert(err == NULL);

    struct_compare(ts, ts_copy);



    struct_cleanup(ts);

    struct_cleanup(ts_copy);



    ops->cleanup(serialize_data);

    g_free(args);

}

static void FUNC_0(gconstpointer VAR_0)

{

    TestArgs *args = (TestArgs *) VAR_0;

    const SerializeOps *VAR_1 = args->VAR_1;

    TestStruct *ts = struct_create();

    TestStruct *ts_copy = NULL;

    Error *err = NULL;

    void *VAR_2;



    VAR_1->serialize(ts, &VAR_2, visit_struct, &err);

    VAR_1->deserialize((void **)&ts_copy, VAR_2, visit_struct, &err); 



    g_assert(err == NULL);

    struct_compare(ts, ts_copy);



    struct_cleanup(ts);

    struct_cleanup(ts_copy);



    VAR_1->cleanup(VAR_2);

    g_free(args);

}

static void FUNC_0(gconstpointer VAR_0)
{ TestArgs *args = (TestArgs *) VAR_0; const SerializeOps *VAR_1 = args->VAR_1; TestStruct *ts = struct_create(); TestStruct *ts_copy = NULL; Error *err = NULL; void *VAR_2; VAR_1->serialize(ts, &VAR_2, visit_struct, &err); VAR_1->deserialize((void **)&ts_copy, VAR_2, visit_struct, &err); g_assert(err == NULL); struct_compare(ts, ts_copy); struct_cleanup(ts); struct_cleanup(ts_copy); VAR_1->cleanup(VAR_2); g_free(args); }