Skip to content

Commit 39f53c4

Browse files
committed
The testcase Ctrlppcheck has no assertions in good case
1 parent 103c3f7 commit 39f53c4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

WinCC_OA_Test/TestSuites/suite_CtrlppCheck/sub_app/scripts/QgCtrlppcheckTests.ctl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MockCppCheck : CppCheck
2323
{
2424
string s;
2525
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
2727
const string key = "// start options: ";
2828
int idx = strpos(s, key);
2929

@@ -32,14 +32,14 @@ class MockCppCheck : CppCheck
3232
else
3333
s = "";
3434

35-
DebugN(__FUNCTION__, testFile, s);
35+
info("Start check of test file: " + testFile + ", with options:" + s);
3636
start(testFile + s);
3737
stdErrToErrList();
3838
}
3939

4040
public void compare(const string &refFile)
4141
{
42-
DebugTN(__FUNCTION__, refFile);
42+
info("Compare result with reference file: " + refFile);
4343
const string tcId = "Ctrlppcheck." + baseName(refFile);
4444
string str;
4545
bool hasFailedRead = fileToString(refFile, str, "UTF8");
@@ -89,8 +89,6 @@ class MockCppCheck : CppCheck
8989
// DebugN(__FUNCTION__, map, expErr);
9090
oaUnitAssertGreater(tcId, dynContains(simpleErrStrings, expErrorStr), 0, map);
9191
}
92-
93-
9492
}
9593
};
9694

@@ -163,6 +161,10 @@ class TstCtrlppcheck : OaTest
163161
mkdir(resDir);
164162

165163
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");
166168
return 0;
167169
}
168170
}

0 commit comments

Comments
 (0)