Re: [PATCH] kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 5, 2021 at 2:18 PM Daniel Latypov <dlatypov@xxxxxxxxxx> wrote:
>
> Before:
> >  Expected str == "world", but
> >      str == hello
> >      "world" == world
>
> After:
> >  Expected str == "world", but
> >      str == "hello"
> <we don't need to tell the user that "world" == "world">
>
> Note: like the literal ellision for integers, this doesn't handle the
> case of
>   KUNIT_EXPECT_STREQ(test, "hello", "world")
> since we don't expect it to realistically happen in checked in tests.
> (If you really wanted a test to fail, KUNIT_FAIL("msg") exists)
>
> In that case, you'd get:
> >  Expected "hello" == "world", but
> <output for next failure>
>
> Signed-off-by: Daniel Latypov <dlatypov@xxxxxxxxxx>

Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx>




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux