diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-cutils.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test-cutils.c b/tests/test-cutils.c index c4437d9817..f2ecb7aecb 100644 --- a/tests/test-cutils.c +++ b/tests/test-cutils.c @@ -1510,10 +1510,16 @@ static void test_qemu_strtosz_trailing(void) 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_erange(void) |