testcppcheck: the xml and template output is tested in testerrorlogger instead

This commit is contained in:
Daniel Marjamäki 2011-01-16 16:26:33 +01:00
parent e3e32de22e
commit f862b37c71
1 changed files with 0 additions and 28 deletions

View File

@ -58,10 +58,7 @@ private:
{ {
TEST_CASE(nonexistingpath); TEST_CASE(nonexistingpath);
TEST_CASE(xml);
TEST_CASE(include); TEST_CASE(include);
TEST_CASE(templateFormat);
//TEST_CASE(getErrorMessages); //TEST_CASE(getErrorMessages);
//TEST_CASE(parseOutputtingArgs); //TEST_CASE(parseOutputtingArgs);
//TEST_CASE(parseArgsAndCheck); //TEST_CASE(parseArgsAndCheck);
@ -229,15 +226,6 @@ private:
ASSERT_EQUALS(retval, EXIT_FAILURE); ASSERT_EQUALS(retval, EXIT_FAILURE);
} }
void xml()
{
// Test the errorlogger..
ErrorLogger::ErrorMessage errorMessage;
errorMessage.setmsg("ab<cd>ef");
ASSERT_EQUALS("<error id=\"\" severity=\"style\" msg=\"ab&lt;cd&gt;ef\"/>", errorMessage.toXML(false,1));
}
void include() void include()
{ {
ErrorLogger::ErrorMessage errorMessage; ErrorLogger::ErrorMessage errorMessage;
@ -249,22 +237,6 @@ private:
ASSERT_EQUALS("[" + fname + ":0]: ", errorMessage.toString(false)); ASSERT_EQUALS("[" + fname + ":0]: ", errorMessage.toString(false));
} }
void templateFormat()
{
ErrorLogger::ErrorMessage errorMessage;
ErrorLogger::ErrorMessage::FileLocation loc;
loc.setfile("some/{file}file.cpp");
loc.line = 10;
errorMessage._callStack.push_back(loc);
errorMessage._id = "testId";
errorMessage._severity = Severity::fromString("error");
errorMessage.setmsg("long testMessage");
const std::string fname(Path::toNativeSeparators("some/{file}file.cpp"));
ASSERT_EQUALS("<error file=\"" + fname + "\" line=\"10\" id=\"testId\" severity=\"error\" msg=\"long testMessage\"/>", errorMessage.toXML(false,1));
ASSERT_EQUALS("[" + fname + ":10]: (error) long testMessage", errorMessage.toString(false));
ASSERT_EQUALS("testId-" + fname + ",error.10?{long testMessage}", errorMessage.toString(false, "{id}-{file},{severity}.{line}?{{message}}"));
}
void getErrorMessages() void getErrorMessages()
{ {
errout.str(""); errout.str("");