projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
753f8da
)
test-cutils: Drop suffix from test_qemu_strtosz_simple()
author
Markus Armbruster
<armbru@redhat.com>
Tue, 21 Feb 2017 20:14:03 +0000
(21:14 +0100)
committer
Markus Armbruster
<armbru@redhat.com>
Thu, 23 Feb 2017 19:35:36 +0000
(20:35 +0100)
Leave testing unit suffixes to test_qemu_strtosz_units().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <
1487708048
-2131-20-git-send-email-armbru@redhat.com>
tests/test-cutils.c
patch
|
blob
|
history
diff --git
a/tests/test-cutils.c
b/tests/test-cutils.c
index d492d1e72efd44dc7b613b6da69bed540b13dddd..c4437d9817e567842d99ed48ff2fdf3600e2f53c 100644
(file)
--- a/
tests/test-cutils.c
+++ b/
tests/test-cutils.c
@@
-1380,13
+1380,13
@@
static void test_qemu_strtosz_simple(void)
g_assert_cmpint(res, ==, 0);
g_assert(endptr == str + 1);
- str = "12345
M
";
+ str = "12345";
res = qemu_strtosz(str, &endptr);
- g_assert_cmpint(res, ==, 12345
* M_BYTE
);
- g_assert(endptr == str +
6
);
+ g_assert_cmpint(res, ==, 12345);
+ g_assert(endptr == str +
5
);
res = qemu_strtosz(str, NULL);
- g_assert_cmpint(res, ==, 12345
* M_BYTE
);
+ g_assert_cmpint(res, ==, 12345);
/* Note: precision is 53 bits since we're parsing with strtod() */