Skip to content

Commit cbcf037

Browse files
committed
Add test case for spaces, ensure no clang-format
1 parent 5b61358 commit cbcf037

File tree

1 file changed

+12
-4
lines changed
  • c/misra/test/rules/RULE-2-5

1 file changed

+12
-4
lines changed

c/misra/test/rules/RULE-2-5/test.c

+12-4
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,26 @@ void test() {
4242
#if defined(CHECKED_MACRO_BEFORE_3)
4343
#endif
4444

45-
#if defined(CHECKED_MACRO_BEFORE_4)
45+
// clang-format off
46+
47+
#if defined (CHECKED_MACRO_BEFORE_4)
48+
#endif
49+
50+
#if defined( CHECKED_MACRO_BEFORE_5 )
4651
#endif
4752

48-
#if defined(CHECKED_MACRO_BEFORE_5)
53+
#if defined ( CHECKED_MACRO_BEFORE_6 )
4954
#endif
5055

51-
#if defined(CHECKED_MACRO_BEFORE_6)
56+
#if defined CHECKED_MACRO_BEFORE_7
5257
#endif
5358

59+
// clang-format on
60+
5461
#define CHECKED_MACRO_BEFORE_1 // COMPLIANT - used in branch
5562
#define CHECKED_MACRO_BEFORE_2 // COMPLIANT - used in branch
5663
#define CHECKED_MACRO_BEFORE_3 // COMPLIANT - used in branch
5764
#define CHECKED_MACRO_BEFORE_4 // COMPLIANT - used in branch
5865
#define CHECKED_MACRO_BEFORE_5 // COMPLIANT - used in branch
59-
#define CHECKED_MACRO_BEFORE_6 // COMPLIANT - used in branch
66+
#define CHECKED_MACRO_BEFORE_6 // COMPLIANT - used in branch
67+
#define CHECKED_MACRO_BEFORE_7 // COMPLIANT - used in branch

0 commit comments

Comments
 (0)