File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,7 @@ class TestCmdlineParser : public TestFixture {
455
455
TEST_CASE (reportTypeMisraCpp2008);
456
456
TEST_CASE (reportTypeMisraCpp2023);
457
457
TEST_CASE (invalidReportType);
458
+ TEST_CASE (defaultReportType);
458
459
}
459
460
460
461
void nooptions () {
@@ -3119,6 +3120,13 @@ class TestCmdlineParser : public TestFixture {
3119
3120
ASSERT_EQUALS_ENUM (CmdLineParser::Result::Fail, parser->parseFromArgs (3 , argv));
3120
3121
ASSERT_EQUALS (" cppcheck: error: Unknown report type 'invalid'\n " , logger->str ());
3121
3122
}
3123
+
3124
+ void defaultReportType () {
3125
+ REDIRECT;
3126
+ const char *const argv[] = { " cppcheck" , " file.cpp" };
3127
+ ASSERT_EQUALS_ENUM (CmdLineParser::Result::Success, parser->parseFromArgs (2 , argv));
3128
+ ASSERT_EQUALS_ENUM (checkers::ReportType::normal , settings->reportType );
3129
+ }
3122
3130
};
3123
3131
3124
3132
REGISTER_TEST (TestCmdlineParser)
You can’t perform that action at this time.
0 commit comments