[Remarks] Update unit test to use StringRef::lower

llvm-svn: 367161
This commit is contained in:
Francis Visoiu Mistrih 2019-07-26 22:36:20 +00:00
parent d89f6cb299
commit ec63dc2c35
1 changed files with 1 additions and 9 deletions

View File

@ -63,14 +63,6 @@ bool parseExpectError(const char (&Buf)[N], const char *Error) {
return StringRef(Stream.str()).contains(Error);
}
static std::string toLower(StringRef S) {
std::string R;
R.reserve(S.size());
for (char C : S)
R += std::tolower(C);
return R;
}
void parseExpectErrorMeta(StringRef Buf, const char *Error) {
std::string ErrorStr;
raw_string_ostream Stream(ErrorStr);
@ -82,7 +74,7 @@ void parseExpectErrorMeta(StringRef Buf, const char *Error) {
// Use a case insensitive comparision due to case differences in error strings
// for different OSs.
EXPECT_EQ(toLower(Stream.str()), toLower(Error));
EXPECT_EQ(StringRef(Stream.str()).lower(), StringRef(Error).lower());
}
TEST(YAMLRemarks, ParsingEmpty) {