[PATCH] D27686: Add llvm::StringLiteral

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 02:23:40 PST 2016


Is EXPECT_STREQ not sufficient?
On Mon, Dec 12, 2016 at 11:53 PM Malcolm Parsons via Phabricator <
reviews at reviews.llvm.org> wrote:

> malcolm.parsons requested changes to this revision.
> malcolm.parsons added inline comments.
> This revision now requires changes to proceed.
>
>
> ================
> Comment at: unittests/ADT/StringRefTest.cpp:1007
> +  constexpr StringLiteral Strings[] = {"Foo", "Bar"};
> +  EXPECT_STREQ("Foo", Strings[0].data());
> +  EXPECT_STREQ("Bar", Strings[1].data());
> ----------------
> There is no test for the length of the StrlingLiteral.
> Maybe `EXPECT_EQ(StringRef("Foo"), Strings[0]);`
>
>
> https://reviews.llvm.org/D27686
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161213/531130d4/attachment.html>


More information about the llvm-commits mailing list