@@ -23,7 +23,7 @@ class MockCppCheck : CppCheck
23
23
{
24
24
string s;
25
25
fileToString(testFile, s);
26
- s = substr(s, 0 , strpos(s, "\n" )); // get fist lines
26
+ s = substr(s, 0 , strpos(s, "\n" )); // get first line
27
27
const string key = "// start options: " ;
28
28
int idx = strpos(s, key);
29
29
@@ -32,14 +32,14 @@ class MockCppCheck : CppCheck
32
32
else
33
33
s = "" ;
34
34
35
- DebugN(__FUNCTION__, testFile, s);
35
+ info( "Start check of test file: " + testFile + ", with options:" + s);
36
36
start(testFile + s);
37
37
stdErrToErrList();
38
38
}
39
39
40
40
public void compare(const string &refFile)
41
41
{
42
- DebugTN(__FUNCTION__, refFile);
42
+ info( "Compare result with reference file: " + refFile);
43
43
const string tcId = "Ctrlppcheck." + baseName(refFile);
44
44
string str;
45
45
bool hasFailedRead = fileToString(refFile, str, "UTF8" );
@@ -89,8 +89,6 @@ class MockCppCheck : CppCheck
89
89
// DebugN(__FUNCTION__, map, expErr);
90
90
oaUnitAssertGreater(tcId, dynContains(simpleErrStrings, expErrorStr), 0 , map);
91
91
}
92
-
93
-
94
92
}
95
93
};
96
94
@@ -163,6 +161,10 @@ class TstCtrlppcheck : OaTest
163
161
mkdir(resDir);
164
162
165
163
moveFile(PROJ_PATH + LOG_REL_PATH + "cppcheck-result.xml" , resDir + baseName(refFile));
164
+
165
+ // please keep this dummy pass() here to eliminate following failure
166
+ // Can not determine test case data ('Ctrlppcheck'). Check results for 'suite_CtrlppCheck/CtrlppCheck_App_3.19'
167
+ pass("The file " + path + " has been analyzed" );
166
168
return 0 ;
167
169
}
168
170
}
0 commit comments