static void simple_string(void)

{

    int i;

    struct {

        const char *encoded;

        const char *decoded;

    } test_cases[] = {

        { "\"hello world\"", "hello world" },

        { "\"the quick brown fox jumped over the fence\"",

          "the quick brown fox jumped over the fence" },

        {}

    };



    for (i = 0; test_cases[i].encoded; i++) {

        QObject *obj;

        QString *str;



        obj = qobject_from_json(test_cases[i].encoded);



        g_assert(obj != NULL);

        g_assert(qobject_type(obj) == QTYPE_QSTRING);

        

        str = qobject_to_qstring(obj);

        g_assert(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);



        str = qobject_to_json(obj);

        g_assert(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);



        qobject_decref(obj);

        

        QDECREF(str);

    }

}

static void simple_string(void)

{

    int i;

    struct {

        const char *encoded;

        const char *decoded;

    } test_cases[] = {

        { "\"hello world\"", "hello world" },

        { "\"the quick brown fox jumped over the fence\"",

          "the quick brown fox jumped over the fence" },

        {}

    };



    for (i = 0; test_cases[i].encoded; i++) {

        QObject *obj;

        QString *str;



        obj = qobject_from_json(test_cases[i].encoded);



        g_assert(obj != NULL);

        g_assert(qobject_type(obj) == QTYPE_QSTRING);

        

        str = qobject_to_qstring(obj);

        g_assert(strcmp(qstring_get_str(str), test_cases[i].decoded) == 0);



        str = qobject_to_json(obj);

        g_assert(strcmp(qstring_get_str(str), test_cases[i].encoded) == 0);



        qobject_decref(obj);

        

        QDECREF(str);

    }

}

static void FUNC_0(void)

{

    int VAR_0;

    struct {

        const char *encoded;

        const char *decoded;

    } VAR_1[] = {

        { "\"hello world\"", "hello world" },

        { "\"the quick brown fox jumped over the fence\"",

          "the quick brown fox jumped over the fence" },

        {}

    };



    for (VAR_0 = 0; VAR_1[VAR_0].encoded; VAR_0++) {

        QObject *obj;

        QString *str;



        obj = qobject_from_json(VAR_1[VAR_0].encoded);



        g_assert(obj != NULL);

        g_assert(qobject_type(obj) == QTYPE_QSTRING);

        

        str = qobject_to_qstring(obj);

        g_assert(strcmp(qstring_get_str(str), VAR_1[VAR_0].decoded) == 0);



        str = qobject_to_json(obj);

        g_assert(strcmp(qstring_get_str(str), VAR_1[VAR_0].encoded) == 0);



        qobject_decref(obj);

        

        QDECREF(str);

    }

}

static void FUNC_0(void)
{ int VAR_0; struct { const char *encoded; const char *decoded; } VAR_1[] = { { "\"hello world\"", "hello world" }, { "\"the quick brown fox jumped over the fence\"", "the quick brown fox jumped over the fence" }, {} }; for (VAR_0 = 0; VAR_1[VAR_0].encoded; VAR_0++) { QObject *obj; QString *str; obj = qobject_from_json(VAR_1[VAR_0].encoded); g_assert(obj != NULL); g_assert(qobject_type(obj) == QTYPE_QSTRING); str = qobject_to_qstring(obj); g_assert(strcmp(qstring_get_str(str), VAR_1[VAR_0].decoded) == 0); str = qobject_to_json(obj); g_assert(strcmp(qstring_get_str(str), VAR_1[VAR_0].encoded) == 0); qobject_decref(obj); QDECREF(str); } }