testcppcheck: parsing templates is tested in testcmdlineparser.cpp

This commit is contained in:
Daniel Marjamäki 2011-01-16 16:17:53 +01:00
parent a97e28491f
commit 03ddfcb5b3
1 changed files with 0 additions and 39 deletions

View File

@ -68,7 +68,6 @@ private:
//TEST_CASE(parseOutputtingArgs);
//TEST_CASE(parseOutputtingInvalidArgs);
//TEST_CASE(parseArgsAndCheck);
//TEST_CASE(parseArgsAndCheckSettings);
//TEST_CASE(userdefines);
}
@ -135,44 +134,6 @@ private:
return result;
}
void parseArgsAndCheckSettings()
{
{
const char *argv[] = {"cppcheck", "--template", "gcc"};
Settings settings;
ASSERT_EQUALS(true, argCheckReturnSettings(3, argv, settings));
ASSERT_EQUALS("{file}:{line}: {severity}: {message}", settings._outputFormat);
ASSERT_EQUALS("", errout.str());
ASSERT_EQUALS("", output.str());
}
{
const char *argv[] = {"cppcheck", "--template", "vs"};
Settings settings;
ASSERT_EQUALS(true, argCheckReturnSettings(3, argv, settings));
ASSERT_EQUALS("{file}({line}): {severity}: {message}", settings._outputFormat);
ASSERT_EQUALS("", errout.str());
ASSERT_EQUALS("", output.str());
}
{
const char *argv[] = {"cppcheck", "--template", "{file}<->{line}"};
Settings settings;
ASSERT_EQUALS(true, argCheckReturnSettings(3, argv, settings));
ASSERT_EQUALS("{file}<->{line}", settings._outputFormat);
ASSERT_EQUALS("", errout.str());
ASSERT_EQUALS("", output.str());
}
{
const char *argv[] = {"cppcheck", "--template"};
Settings settings;
ASSERT_EQUALS(false, argCheckReturnSettings(2, argv, settings));
ASSERT_EQUALS("", errout.str());
ASSERT_EQUALS("cppcheck: argument to '--template' is missing\n", output.str());
}
}
void parseArgsAndCheck()
{
{