testcppcheck: parsing templates is tested in testcmdlineparser.cpp
This commit is contained in:
parent
a97e28491f
commit
03ddfcb5b3
|
@ -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()
|
||||
{
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue