aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/StringRefTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/ADT/StringRefTest.cpp')
-rw-r--r--llvm/unittests/ADT/StringRefTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/StringRefTest.cpp b/llvm/unittests/ADT/StringRefTest.cpp
index c1cc558..5b6822e 100644
--- a/llvm/unittests/ADT/StringRefTest.cpp
+++ b/llvm/unittests/ADT/StringRefTest.cpp
@@ -1002,4 +1002,10 @@ TEST(StringRefTest, DropWhileUntil) {
EXPECT_EQ("", Taken);
}
+TEST(StringRefTest, StringLiteral) {
+ constexpr StringLiteral Strings[] = {"Foo", "Bar"};
+ EXPECT_EQ(StringRef("Foo"), Strings[0]);
+ EXPECT_EQ(StringRef("Bar"), Strings[1]);
+}
+
} // end anonymous namespace