From cbcf0374aa9ac115e25b428a70717cdd705497c1 Mon Sep 17 00:00:00 2001 From: Luke Cartey Date: Wed, 23 Oct 2024 14:43:45 +0100 Subject: [PATCH] Add test case for spaces, ensure no clang-format --- c/misra/test/rules/RULE-2-5/test.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/c/misra/test/rules/RULE-2-5/test.c b/c/misra/test/rules/RULE-2-5/test.c index e220b3d44..15930f68d 100644 --- a/c/misra/test/rules/RULE-2-5/test.c +++ b/c/misra/test/rules/RULE-2-5/test.c @@ -42,18 +42,26 @@ void test() { #if defined(CHECKED_MACRO_BEFORE_3) #endif -#if defined(CHECKED_MACRO_BEFORE_4) +// clang-format off + +#if defined (CHECKED_MACRO_BEFORE_4) +#endif + +#if defined( CHECKED_MACRO_BEFORE_5 ) #endif -#if defined(CHECKED_MACRO_BEFORE_5) +#if defined ( CHECKED_MACRO_BEFORE_6 ) #endif -#if defined(CHECKED_MACRO_BEFORE_6) +#if defined CHECKED_MACRO_BEFORE_7 #endif +// clang-format on + #define CHECKED_MACRO_BEFORE_1 // COMPLIANT - used in branch #define CHECKED_MACRO_BEFORE_2 // COMPLIANT - used in branch #define CHECKED_MACRO_BEFORE_3 // COMPLIANT - used in branch #define CHECKED_MACRO_BEFORE_4 // COMPLIANT - used in branch #define CHECKED_MACRO_BEFORE_5 // COMPLIANT - used in branch -#define CHECKED_MACRO_BEFORE_6 // COMPLIANT - used in branch \ No newline at end of file +#define CHECKED_MACRO_BEFORE_6 // COMPLIANT - used in branch +#define CHECKED_MACRO_BEFORE_7 // COMPLIANT - used in branch \ No newline at end of file