[compiler-rt] f8006a0 - [ORC-RT] Fix typos in testcase.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 7 20:29:47 PST 2022
Author: Lang Hames
Date: 2022-02-08T15:14:47+11:00
New Revision: f8006a0a400ce86cd79c58dbf418031fe3d35e1b
URL: https://github.com/llvm/llvm-project/commit/f8006a0a400ce86cd79c58dbf418031fe3d35e1b
DIFF: https://github.com/llvm/llvm-project/commit/f8006a0a400ce86cd79c58dbf418031fe3d35e1b.diff
LOG: [ORC-RT] Fix typos in testcase.
Replace references to 'span' in string_view tests that were originally copied
from span tests.
Added:
Modified:
compiler-rt/lib/orc/unittests/adt_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/orc/unittests/adt_test.cpp b/compiler-rt/lib/orc/unittests/adt_test.cpp
index dec636e837ddd..2fa76a522b35e 100644
--- a/compiler-rt/lib/orc/unittests/adt_test.cpp
+++ b/compiler-rt/lib/orc/unittests/adt_test.cpp
@@ -56,13 +56,13 @@ TEST(ADTTest, StringViewDefaultConstruction) {
TEST(ADTTest, StringViewConstructFromCharPtrAndSize) {
const char *Str = "abcdefg";
string_view S(Str, 5);
- EXPECT_FALSE(S.empty()) << "Span should be non-empty";
- EXPECT_EQ(S.size(), 5U) << "Span has unexpected size";
+ EXPECT_FALSE(S.empty()) << "string_view should be non-empty";
+ EXPECT_EQ(S.size(), 5U) << "string_view has unexpected size";
EXPECT_EQ(std::distance(S.begin(), S.end()), 5U)
<< "Unexpected iterator range size";
- EXPECT_EQ(S.data(), &Str[0]) << "Span data has unexpected value";
+ EXPECT_EQ(S.data(), &Str[0]) << "string_view data has unexpected value";
for (unsigned I = 0; I != S.size(); ++I)
- EXPECT_EQ(S[I], Str[I]) << "Unexpected span element value";
+ EXPECT_EQ(S[I], Str[I]) << "Unexpected string_view element value";
}
TEST(ADTTest, StringViewConstructFromCharPtr) {
@@ -70,13 +70,13 @@ TEST(ADTTest, StringViewConstructFromCharPtr) {
size_t StrLen = strlen(Str);
string_view S(Str);
- EXPECT_FALSE(S.empty()) << "Span should be non-empty";
- EXPECT_EQ(S.size(), StrLen) << "Span has unexpected size";
+ EXPECT_FALSE(S.empty()) << "string_view should be non-empty";
+ EXPECT_EQ(S.size(), StrLen) << "string_view has unexpected size";
EXPECT_EQ(static_cast<size_t>(std::distance(S.begin(), S.end())), StrLen)
<< "Unexpected iterator range size";
- EXPECT_EQ(S.data(), &Str[0]) << "Span data has unexpected value";
+ EXPECT_EQ(S.data(), &Str[0]) << "string_view data has unexpected value";
for (unsigned I = 0; I != S.size(); ++I)
- EXPECT_EQ(S[I], Str[I]) << "Unexpected span element value";
+ EXPECT_EQ(S[I], Str[I]) << "Unexpected string_view element value";
}
TEST(ADTTest, StringViewEquality) {
More information about the llvm-commits
mailing list