[PATCH] D27686: Add llvm::StringLiteral

Malcolm Parsons via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 07:18:57 PST 2016


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


More information about the llvm-commits mailing list