[PATCH] D27686: Add llvm::StringLiteral

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 07:26:41 PST 2016


Ahh, good catch. Thanks
On Tue, Dec 13, 2016 at 7:19 AM Malcolm Parsons <malcolm.parsons at gmail.com>
wrote:

> On 13 December 2016 at 10:23, Zachary Turner <zturner at google.com> wrote:
> > Is EXPECT_STREQ not sufficient?
>
> EXPECT_STREQ doesn't check the length, but EXPECT_EQ does:
>
> [ RUN      ] StringRefTest.StringLiteral
> llvm/unittests/ADT/StringRefTest.cpp:1007: Failure
> Value of: Strings[0]
>   Actual: { 'F' (70, 0x46), 'o' (111, 0x6F), 'o' (111, 0x6F), '\0' }
> Expected: StringRef("Foo")
> Which is: { 'F' (70, 0x46), 'o' (111, 0x6F), 'o' (111, 0x6F) }
>
> --
> Malcolm Parsons
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161213/e51419be/attachment.html>


More information about the llvm-commits mailing list