Skip to content

Commit 2c9af2c

Browse files
committed
Add test for extra comments
1 parent 377fe2b commit 2c9af2c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/testsuppressions.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ class TestSuppressions : public TestFixture {
131131
TEST_CASE(polyspaceMultiple3);
132132
TEST_CASE(polyspaceRange);
133133
TEST_CASE(polyspaceBlock);
134+
TEST_CASE(polyspaceExtraComments);
134135
}
135136

136137
void suppressionsBadId1() const {
@@ -2122,6 +2123,19 @@ class TestSuppressions : public TestFixture {
21222123
{ { "premium-misra-c-2012-2.7", 1, "", SuppressionList::Type::block, 1, 5 } }
21232124
);
21242125
}
2126+
2127+
void polyspaceExtraComments() const {
2128+
Settings settings;
2129+
settings.premiumArgs = "--misra-c-2012 --misra-cpp-2008";
2130+
testPolyspaceSuppression(
2131+
settings,
2132+
{ { "/* polyspace MISRA2012 : 2.7 MISRA-CPP : 7-1-1 \"comment 1\" polyspace MISRA2012 : 9.1, 8.13 \"comment 2\" */", 1 }, },
2133+
{ { "premium-misra-c-2012-2.7", 1, "" },
2134+
{ "premium-misra-cpp-2008-7-1-1", 1, "comment 1" },
2135+
{ "premium-misra-c-2012-9.1", 1, "comment 2" },
2136+
{ "premium-misra-c-2012-8.13", 1, "comment 2" }, }
2137+
);
2138+
}
21252139
};
21262140

21272141
REGISTER_TEST(TestSuppressions)

0 commit comments

Comments
 (0)