Skip to content

Commit

Permalink
runformat
Browse files Browse the repository at this point in the history
  • Loading branch information
danmar committed Jan 12, 2024
1 parent f2e52c0 commit 719b600
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/testcmdlineparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1192,27 +1192,27 @@ class TestCmdlineParser : public TestFixture {
REDIRECT;
settings->cppcheckCfgProductName = "Cppcheck Premium 0.0.0";
{
const char * const argv[] = {"cppcheck", "--premium=misra-c-2012", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv));
const char * const argv[] = {"cppcheck", "--premium=misra-c-2012", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv));
}
{
const char * const argv[] = {"cppcheck", "--premium=misra-c++-2023", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv));
const char * const argv[] = {"cppcheck", "--premium=misra-c++-2023", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv));
}
{
const char * const argv[] = {"cppcheck", "--premium=cert-c++-2016", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv));
const char * const argv[] = {"cppcheck", "--premium=cert-c++-2016", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv));
}
// invalid options
{
const char * const argv[] = {"cppcheck", "--premium=misra", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Fail, parser->parseFromArgs(3, argv));
ASSERT_EQUALS("cppcheck: error: invalid --premium option 'misra'.\n", logger->str());
const char * const argv[] = {"cppcheck", "--premium=misra", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Fail, parser->parseFromArgs(3, argv));
ASSERT_EQUALS("cppcheck: error: invalid --premium option 'misra'.\n", logger->str());
}
{
const char * const argv[] = {"cppcheck", "--premium=cert", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Fail, parser->parseFromArgs(3, argv));
ASSERT_EQUALS("cppcheck: error: invalid --premium option 'cert'.\n", logger->str());
const char * const argv[] = {"cppcheck", "--premium=cert", "file.c"};
ASSERT_EQUALS(CmdLineParser::Result::Fail, parser->parseFromArgs(3, argv));
ASSERT_EQUALS("cppcheck: error: invalid --premium option 'cert'.\n", logger->str());
}
settings->cppcheckCfgProductName.clear();
settings->premiumArgs.clear();
Expand Down

0 comments on commit 719b600

Please sign in to comment.