Skip to content

Commit a297e23

Browse files
committed
Fix unittest
1 parent 4aba7a6 commit a297e23

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

llvm/unittests/Support/SpecialCaseListTest.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ TEST_F(SpecialCaseListTest, Basic) {
7070
EXPECT_FALSE(SCL->inSection("", "fun", "hello"));
7171
EXPECT_FALSE(SCL->inSection("", "src", "hello", "category"));
7272

73-
EXPECT_EQ(4u, SCL->inSectionBlame("", "src", "hello"));
74-
EXPECT_EQ(5u, SCL->inSectionBlame("", "src", "bye"));
75-
EXPECT_EQ(6u, SCL->inSectionBlame("", "src", "hi", "category"));
76-
EXPECT_EQ(7u, SCL->inSectionBlame("", "src", "zzzz", "category"));
73+
EXPECT_EQ(3u, SCL->inSectionBlame("", "src", "hello"));
74+
EXPECT_EQ(4u, SCL->inSectionBlame("", "src", "bye"));
75+
EXPECT_EQ(5u, SCL->inSectionBlame("", "src", "hi", "category"));
76+
EXPECT_EQ(6u, SCL->inSectionBlame("", "src", "zzzz", "category"));
7777
EXPECT_EQ(0u, SCL->inSectionBlame("", "src", "hi"));
7878
EXPECT_EQ(0u, SCL->inSectionBlame("", "fun", "hello"));
7979
EXPECT_EQ(0u, SCL->inSectionBlame("", "src", "hello", "category"));
@@ -85,12 +85,12 @@ TEST_F(SpecialCaseListTest, CorrectErrorLineNumberWithBlankLine) {
8585
"\n"
8686
"[not valid\n",
8787
Error));
88-
EXPECT_THAT(Error, StartsWith("malformed section header on line 4:"));
88+
EXPECT_THAT(Error, StartsWith("malformed section header on line 3:"));
8989

9090
EXPECT_EQ(nullptr, makeSpecialCaseList("\n\n\n"
9191
"[not valid\n",
9292
Error));
93-
EXPECT_THAT(Error, StartsWith("malformed section header on line 5:"));
93+
EXPECT_THAT(Error, StartsWith("malformed section header on line 4:"));
9494
}
9595

9696
TEST_F(SpecialCaseListTest, SectionGlobErrorHandling) {
@@ -101,7 +101,7 @@ TEST_F(SpecialCaseListTest, SectionGlobErrorHandling) {
101101
EXPECT_EQ(makeSpecialCaseList("[[]", Error), nullptr);
102102
EXPECT_EQ(
103103
Error,
104-
"malformed section at line 2: '[': invalid glob pattern, unmatched '['");
104+
"malformed section at line 1: '[': invalid glob pattern, unmatched '['");
105105

106106
EXPECT_EQ(makeSpecialCaseList("src:=", Error), nullptr);
107107
EXPECT_THAT(Error, HasSubstr("Supplied glob was blank"));
@@ -163,10 +163,10 @@ TEST_F(SpecialCaseListTest, Substring) {
163163
TEST_F(SpecialCaseListTest, InvalidSpecialCaseList) {
164164
std::string Error;
165165
EXPECT_EQ(nullptr, makeSpecialCaseList("badline", Error));
166-
EXPECT_EQ("malformed line 2: 'badline'", Error);
166+
EXPECT_EQ("malformed line 1: 'badline'", Error);
167167
EXPECT_EQ(nullptr, makeSpecialCaseList("src:bad[a-", Error));
168168
EXPECT_EQ(
169-
"malformed glob in line 2: 'bad[a-': invalid glob pattern, unmatched '['",
169+
"malformed glob in line 1: 'bad[a-': invalid glob pattern, unmatched '['",
170170
Error);
171171
std::vector<std::string> Files(1, "unexisting");
172172
EXPECT_EQ(nullptr,

0 commit comments

Comments
 (0)