[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 18/26] tests-qobject-input-strict: Merge into
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 18/26] tests-qobject-input-strict: Merge into test-qobject-input-visitor |
Date: |
Tue, 28 Feb 2017 09:39:43 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 02/26/2017 03:43 PM, Markus Armbruster wrote:
> Much test-qobject-input-strict.c duplicates
s/Much/Much of/
> test-qobject-input-strict.c less assertions on expected output:
s/less/, but with less/
...
>
> Merge the remaining test cases into test-qobject-input-visitor.c, and
> drop the now redundant test-qobject-input-strict.c.
>
> Test case "/visitor/input-strict/fail/list" isn't really about lists,
> it's about a bad struct nested in a list. Rename accordingly.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> -static void test_validate_struct_nested(TestInputVisitorData *data,
> - const void *unused)
> -{
> - UserDefTwo *udp = NULL;
> - Visitor *v;
> -
> - v = validate_test_init(data, "{ 'string0': 'string0', "
> - "'dict1': { 'string1': 'string1', "
> - "'dict2': { 'userdef': { 'integer': 42, "
> - "'string': 'string' }, 'string': 'string2'}}}");
> -
Old code had semi-sane line wrapping...
> +++ b/tests/test-qobject-input-visitor.c
> @@ -5,6 +5,7 @@
> *
> +static void test_visitor_in_fail_struct_nested(TestInputVisitorData *data,
> + const void *unused)
> +{
> + UserDefTwo *udp = NULL;
> + Error *err = NULL;
> + Visitor *v;
> +
> + v = visitor_input_test_init(data, "{ 'string0': 'string0', 'dict1': {
> 'string1': 'string1', 'dict2': { 'userdef1': { 'integer': 42, 'string':
> 'string', 'extra': [42, 23, {'foo':'bar'}] }, 'string2': 'string2'}}}");
...new code has insanely long lines. Not a show-stopper, but I wouldn't
mind if you added line breaks.
It's a little bit hard to follow the patch alone, but I didn't spot any
obvious loss of coverage and the commit message definitely helps.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 19/26] test-string-input-visitor: Tear down existing test automatically, (continued)
- [Qemu-devel] [PATCH v2 25/26] qapi: Fix object input visit beyond end of list, Markus Armbruster, 2017/02/26
- [Qemu-devel] [PATCH v2 06/26] qmp: Drop duplicated QMP command object checks, Markus Armbruster, 2017/02/26
- [Qemu-devel] [PATCH v2 26/26] qapi: Improve qobject visitor documentation, Markus Armbruster, 2017/02/26
- [Qemu-devel] [PATCH v2 16/26] test-qobject-input-visitor: Use strict visitor, Markus Armbruster, 2017/02/26
- [Qemu-devel] [PATCH v2 09/26] qapi: Improve a QObject input visitor error message, Markus Armbruster, 2017/02/26