static void float_number(void)

{

    int i;

    struct {

        const char *encoded;

        double decoded;

        int skip;

    } test_cases[] = {

        { "32.43", 32.43 },

        { "0.222", 0.222 },

        { "-32.12313", -32.12313 },

        { "-32.20e-10", -32.20e-10, .skip = 1 },

        { },

    };



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

        QObject *obj;

        QFloat *qfloat;



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

        qfloat = qobject_to_qfloat(obj);

        g_assert(qfloat);

        g_assert(qfloat_get_double(qfloat) == test_cases[i].decoded);



        if (test_cases[i].skip == 0) {

            QString *str;



            str = qobject_to_json(obj);

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

            QDECREF(str);

        }



        QDECREF(qfloat);

    }

}

static void float_number(void)

{

    int i;

    struct {

        const char *encoded;

        double decoded;

        int skip;

    } test_cases[] = {

        { "32.43", 32.43 },

        { "0.222", 0.222 },

        { "-32.12313", -32.12313 },

        { "-32.20e-10", -32.20e-10, .skip = 1 },

        { },

    };



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

        QObject *obj;

        QFloat *qfloat;



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

        qfloat = qobject_to_qfloat(obj);

        g_assert(qfloat);

        g_assert(qfloat_get_double(qfloat) == test_cases[i].decoded);



        if (test_cases[i].skip == 0) {

            QString *str;



            str = qobject_to_json(obj);

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

            QDECREF(str);

        }



        QDECREF(qfloat);

    }

}

        obj = qobject_from_json(test_cases[i].encoded, NULL);         obj = qobject_from_json(test_cases[i].encoded, NULL);         obj = qobject_from_json(test_cases[i].encoded, NULL);         obj = qobject_from_json(test_cases[i].encoded, NULL);         obj = qobject_from_json(test_cases[i].encoded, NULL);         obj = qobject_from_json(test_cases[i].encoded, NULL);         obj = qobject_from_json(test_cases[i].encoded, NULL);
static void FUNC_0(void)

{

    int VAR_0;

    struct {

        const char *encoded;

        double decoded;

        int skip;

    } VAR_1[] = {

        { "32.43", 32.43 },

        { "0.222", 0.222 },

        { "-32.12313", -32.12313 },

        { "-32.20e-10", -32.20e-10, .skip = 1 },

        { },

    };



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

        QObject *obj;

        QFloat *qfloat;



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

        qfloat = qobject_to_qfloat(obj);

        g_assert(qfloat);

        g_assert(qfloat_get_double(qfloat) == VAR_1[VAR_0].decoded);



        if (VAR_1[VAR_0].skip == 0) {

            QString *str;



            str = qobject_to_json(obj);

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

            QDECREF(str);

        }



        QDECREF(qfloat);

    }

}

static void FUNC_0(void)
{ int VAR_0; struct { const char *encoded; double decoded; int skip; } VAR_1[] = { { "32.43", 32.43 }, { "0.222", 0.222 }, { "-32.12313", -32.12313 }, { "-32.20e-10", -32.20e-10, .skip = 1 }, { }, }; for (VAR_0 = 0; VAR_1[VAR_0].encoded; VAR_0++) { QObject *obj; QFloat *qfloat; obj = qobject_from_json(VAR_1[VAR_0].encoded, NULL); qfloat = qobject_to_qfloat(obj); g_assert(qfloat); g_assert(qfloat_get_double(qfloat) == VAR_1[VAR_0].decoded); if (VAR_1[VAR_0].skip == 0) { QString *str; str = qobject_to_json(obj); g_assert(strcmp(qstring_get_str(str), VAR_1[VAR_0].encoded) == 0); QDECREF(str); } QDECREF(qfloat); } }