[Remarks] Fix warning for ambigous else behind EXPECT macro

http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31902/steps/ninja%20check%201/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375015 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Francis Visoiu Mistrih 2019-10-16 16:43:34 +00:00
parent 2262bbc7ab
commit a55be6b48f

View File

@ -82,12 +82,14 @@ void parseExpectErrorMeta(StringRef Buf, const char *Error, CmpType Cmp,
// Use a case insensitive comparision due to case differences in error strings
// for different OSs.
if (Cmp == CmpType::Equal)
if (Cmp == CmpType::Equal) {
EXPECT_EQ(StringRef(Stream.str()).lower(), StringRef(Error).lower());
}
if (Cmp == CmpType::Contains)
if (Cmp == CmpType::Contains) {
EXPECT_TRUE(StringRef(Stream.str()).contains(StringRef(Error)));
}
}
TEST(YAMLRemarks, ParsingEmpty) {
EXPECT_TRUE(parseExpectError("\n\n", "document root is not of mapping type."));