Hi,

This is good enough, but (there is always a but :)

On Sat, Jun 23, 2018 at 2:15 PM, Gert Doering <g...@greenie.muc.de> wrote:

> Some basic integer tests to verify signed, unsigned and
> long unsigned (2^33) printing.
>

That 2^33 still lurking in the commit message could go..


>
> Signed-off-by: Gert Doering <g...@greenie.muc.de>
> --
> v2: test %lu with "1" as windows and linux/i386 do not have 64 bit long
> ---
>  tests/unit_tests/openvpn/test_argv.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/unit_tests/openvpn/test_argv.c
> b/tests/unit_tests/openvpn/test_argv.c
> index 4a3ba559..202a8ff5 100644
> --- a/tests/unit_tests/openvpn/test_argv.c
> +++ b/tests/unit_tests/openvpn/test_argv.c
> @@ -116,8 +116,12 @@ argv_str__multiple_argv__correct_output(void **state)
>      argv_printf(&a, "%s%sc", PATH1, PATH2);
>      argv_printf_cat(&a, "%s", PARAM1);
>      argv_printf_cat(&a, "%s", PARAM2);
> +    argv_printf_cat(&a, "%d", -1);
> +    argv_printf_cat(&a, "%u", -1);
> +    argv_printf_cat(&a, "%lu", 1 );
>

This triggers a -Wformat warning:

format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3
has type ‘in’ [-Wformat=]

Suggest 1L instead of 1.


>      output = argv_str(&a, &gc, PA_BRACKET);
> -    assert_string_equal(output, "[" PATH1 PATH2 "] [" PARAM1 "] [" PARAM2
> "]");
> +    assert_string_equal(output, "[" PATH1 PATH2 "] [" PARAM1 "] [" PARAM2
> "]"
> +                               " [-1] [4294967295] [1]");


>      argv_reset(&a);
>      gc_free(&gc);
>

ACK otherwise.

Good luck with the game.

Selva
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to