Skip to content

Commit 008e3d4

Browse files
committed
Add test for extra comments
1 parent f1b2840 commit 008e3d4

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
@@ -130,6 +130,7 @@ class TestSuppressions : public TestFixture {
130130
TEST_CASE(polyspaceMultiple3);
131131
TEST_CASE(polyspaceRange);
132132
TEST_CASE(polyspaceBlock);
133+
TEST_CASE(polyspaceExtraComments);
133134
}
134135

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

21262140
REGISTER_TEST(TestSuppressions)

0 commit comments

Comments
 (0)