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 <arm...@redhat.com>
> ---


> -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 <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to