4 // Positive tests: these should generate a violation
8 // Missing space around opening brace
10 static const uint8_t sOctets_1[] = {0x01, 0x02 };
11 static const uint8_t sOctets_2[] ={0x01, 0x02 };
12 static const uint8_t sOctets_3[] ={ 0x01, 0x02 };
13 static const uint8_t sOctets_4[] = {0x01, 0x02 };
14 static const uint8_t sOctets_5[] ={0x01, 0x02 };
15 static const uint8_t sOctets_6[] ={ 0x01, 0x02 };
17 // Missing space around closing brace
19 static const uint8_t sOctets_7[] = { 0x01, 0x02};
20 static const uint8_t sOctets_8[] = { 0x01, 0x02};
51 namespace namespace_1{};
53 namespace namespace_1{
56 namespace namespace_1{namespace namespace_2{};};
58 namespace namespace_1{
60 namespace namespace_2{};
63 // Functions / Methods
65 static int test_func_1(void){return 0; }
66 static int test_func_2(void){ return 0;}
67 static inline bool test_func_3(void){
69 static inline bool test_func_4(void) {
71 static inline void test_func_5(void)
76 // Nested Initializers
78 struct test_struct_5 {
83 struct test_struct_6 {
84 struct test_struct_5 m_a;
88 static const struct test_struct_6 sTestStruct6[] =
89 {{{ 0, true }, true }, {{ 1, false}, true }};
93 static void test_control_structures(void)
118 do{ a += 1; }while (a < 0);
120 for (i = 0; i < a; i++){
123 switch (a){case 0: a += 1;}
136 // Negative tests: these should not generate a violation