diff options
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ADT/StringRefTest.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/unittests/ADT/StringRefTest.cpp b/unittests/ADT/StringRefTest.cpp index b240a87ef7..0ab8fcf6f0 100644 --- a/unittests/ADT/StringRefTest.cpp +++ b/unittests/ADT/StringRefTest.cpp @@ -531,22 +531,4 @@ TEST(StringRefTest, joinStrings) { EXPECT_TRUE(v2_join3); } -static void fn_stringref(StringRef str) { - EXPECT_TRUE(str == "hello"); -} -static void fn_conststringref(ConstStringRef str) { - fn_stringref(str); -} - -TEST(StringRefTest, constStringRef) { - LLVM_CONSTEXPR ConstStringRef csr("hello"); -#if __has_feature(cxx_constexpr) || defined(__GXX_EXPERIMENTAL_CXX0X__) - LLVM_STATIC_ASSERT(csr[0] != csr[1], ""); - LLVM_STATIC_ASSERT(csr[2] == csr[3], ""); - LLVM_STATIC_ASSERT(csr.size() == 5, ""); -#endif - llvm_expect(csr[2] == csr[3]); - fn_conststringref(csr); -} - } // end anonymous namespace |