static void test_qemu_strtosz_trailing(void)

{

    const char *str;

    char *endptr = NULL;

    int64_t res;



    str = "123xxx";

    res = qemu_strtosz_MiB(str, &endptr);

    g_assert_cmpint(res, ==, 123 * M_BYTE);

    g_assert(endptr == str + 3);



    res = qemu_strtosz(str, NULL);

    g_assert_cmpint(res, ==, -EINVAL);



    str = "1kiB";

    res = qemu_strtosz(str, &endptr);

    g_assert_cmpint(res, ==, 1024);

    g_assert(endptr == str + 2);



    res = qemu_strtosz(str, NULL);

    g_assert_cmpint(res, ==, -EINVAL);

}

static void test_qemu_strtosz_trailing(void)

{

    const char *str;

    char *endptr = NULL;

    int64_t res;



    str = "123xxx";

    res = qemu_strtosz_MiB(str, &endptr);

    g_assert_cmpint(res, ==, 123 * M_BYTE);

    g_assert(endptr == str + 3);



    res = qemu_strtosz(str, NULL);

    g_assert_cmpint(res, ==, -EINVAL);



    str = "1kiB";

    res = qemu_strtosz(str, &endptr);

    g_assert_cmpint(res, ==, 1024);

    g_assert(endptr == str + 2);



    res = qemu_strtosz(str, NULL);

    g_assert_cmpint(res, ==, -EINVAL);

}

static void FUNC_0(void)

{

    const char *VAR_0;

    char *VAR_1 = NULL;

    int64_t res;



    VAR_0 = "123xxx";

    res = qemu_strtosz_MiB(VAR_0, &VAR_1);

    g_assert_cmpint(res, ==, 123 * M_BYTE);

    g_assert(VAR_1 == VAR_0 + 3);



    res = qemu_strtosz(VAR_0, NULL);

    g_assert_cmpint(res, ==, -EINVAL);



    VAR_0 = "1kiB";

    res = qemu_strtosz(VAR_0, &VAR_1);

    g_assert_cmpint(res, ==, 1024);

    g_assert(VAR_1 == VAR_0 + 2);



    res = qemu_strtosz(VAR_0, NULL);

    g_assert_cmpint(res, ==, -EINVAL);

}

static void FUNC_0(void)
{ const char *VAR_0; char *VAR_1 = NULL; int64_t res; VAR_0 = "123xxx"; res = qemu_strtosz_MiB(VAR_0, &VAR_1); g_assert_cmpint(res, ==, 123 * M_BYTE); g_assert(VAR_1 == VAR_0 + 3); res = qemu_strtosz(VAR_0, NULL); g_assert_cmpint(res, ==, -EINVAL); VAR_0 = "1kiB"; res = qemu_strtosz(VAR_0, &VAR_1); g_assert_cmpint(res, ==, 1024); g_assert(VAR_1 == VAR_0 + 2); res = qemu_strtosz(VAR_0, NULL); g_assert_cmpint(res, ==, -EINVAL); }