Skip to content

Commit 37264bf

Browse files
committed
update tests
1 parent b30ed60 commit 37264bf

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

test/testpreprocessor.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,7 +2424,7 @@ class TestPreprocessor : public TestFixture {
24242424
const char code[] = "#include \"header.h\"";
24252425
(void)getcodeforcfg(settings, *this, code, "", "test.c");
24262426

2427-
ASSERT_EQUALS("test.c:1:0: information: Include file: \"header.h\" not found. [missingInclude]\n", errout_str());
2427+
ASSERT_EQUALS("test.c:1:2: information: Include file: \"header.h\" not found. [missingInclude]\n", errout_str());
24282428
}
24292429

24302430
// test for missing local include - no include path given
@@ -2440,7 +2440,7 @@ class TestPreprocessor : public TestFixture {
24402440
const char code[] = "#include \"header.h\"";
24412441
(void)getcodeforcfg(settings, *this, code, "", "test.c");
24422442

2443-
ASSERT_EQUALS("test.c:1:0: information: Include file: \"header.h\" not found. [missingInclude]\n", errout_str());
2443+
ASSERT_EQUALS("test.c:1:2: information: Include file: \"header.h\" not found. [missingInclude]\n", errout_str());
24442444
}
24452445

24462446
// test for existing local include - include path provided
@@ -2490,7 +2490,7 @@ class TestPreprocessor : public TestFixture {
24902490
std::string code("#include \"" + header + "\"");
24912491
(void)getcodeforcfg(settings, *this, code.data(), code.size(), "", "test.c");
24922492

2493-
ASSERT_EQUALS("test.c:1:0: information: Include file: \"" + header + "\" not found. [missingInclude]\n", errout_str());
2493+
ASSERT_EQUALS("test.c:1:2: information: Include file: \"" + header + "\" not found. [missingInclude]\n", errout_str());
24942494
}
24952495

24962496
// test for missing system include - system includes are not searched for in relative path
@@ -2506,7 +2506,7 @@ class TestPreprocessor : public TestFixture {
25062506
const char code[] = "#include <header.h>";
25072507
(void)getcodeforcfg(settings, *this, code, "", "test.c");
25082508

2509-
ASSERT_EQUALS("test.c:1:0: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
2509+
ASSERT_EQUALS("test.c:1:2: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
25102510
}
25112511

25122512
// test for missing system include
@@ -2520,7 +2520,7 @@ class TestPreprocessor : public TestFixture {
25202520
const char code[] = "#include <header.h>";
25212521
(void)getcodeforcfg(settings, *this, code, "", "test.c");
25222522

2523-
ASSERT_EQUALS("test.c:1:0: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
2523+
ASSERT_EQUALS("test.c:1:2: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
25242524
}
25252525

25262526
// test for existing system include in system include path
@@ -2570,7 +2570,7 @@ class TestPreprocessor : public TestFixture {
25702570
std::string code("#include <" + header + ">");
25712571
(void)getcodeforcfg(settings, *this, code.data(), code.size(), "", "test.c");
25722572

2573-
ASSERT_EQUALS("test.c:1:0: information: Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
2573+
ASSERT_EQUALS("test.c:1:2: information: Include file: <" + header + "> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
25742574
}
25752575

25762576
// test for missing local and system include
@@ -2590,9 +2590,9 @@ class TestPreprocessor : public TestFixture {
25902590
"#include \"header2.h\"";
25912591
(void)getcodeforcfg(settings, *this, code, "", "test.c");
25922592

2593-
ASSERT_EQUALS("test.c:1:0: information: Include file: \"missing.h\" not found. [missingInclude]\n"
2594-
"test.c:2:0: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n"
2595-
"test.c:3:0: information: Include file: <missing2.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
2593+
ASSERT_EQUALS("test.c:1:2: information: Include file: \"missing.h\" not found. [missingInclude]\n"
2594+
"test.c:2:2: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n"
2595+
"test.c:3:2: information: Include file: <missing2.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
25962596
}
25972597

25982598
void testMissingIncludeCheckConfig() {
@@ -2626,12 +2626,12 @@ class TestPreprocessor : public TestFixture {
26262626
"#include <" + missing4 + ">\n");
26272627
(void)getcodeforcfg(settings, *this, code.data(), code.size(), "", "test.c");
26282628

2629-
ASSERT_EQUALS("test.c:1:0: information: Include file: \"missing.h\" not found. [missingInclude]\n"
2630-
"test.c:2:0: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n"
2631-
"test.c:3:0: information: Include file: <missing2.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n"
2632-
"test.c:6:0: information: Include file: \"header4.h\" not found. [missingInclude]\n"
2633-
"test.c:9:0: information: Include file: \"" + missing3 + "\" not found. [missingInclude]\n"
2634-
"test.c:11:0: information: Include file: <" + missing4 + "> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
2629+
ASSERT_EQUALS("test.c:1:2: information: Include file: \"missing.h\" not found. [missingInclude]\n"
2630+
"test.c:2:2: information: Include file: <header.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n"
2631+
"test.c:3:2: information: Include file: <missing2.h> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n"
2632+
"test.c:6:2: information: Include file: \"header4.h\" not found. [missingInclude]\n"
2633+
"test.c:9:2: information: Include file: \"" + missing3 + "\" not found. [missingInclude]\n"
2634+
"test.c:11:2: information: Include file: <" + missing4 + "> not found. Please note: Cppcheck does not need standard library headers to get proper results. [missingIncludeSystem]\n", errout_str());
26352635
}
26362636

26372637
void hasInclude() {

0 commit comments

Comments
 (0)