Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / nlfaultinjection / repo / third_party / cstyle / repo / tests / missing-space-after-semicolon.cpp
1 // Positive Tests: test that should generate a violation
2
3 namespace a { namespace b { namespace c { };};};
4
5 extern void foo(void);
6
7 void test_1_p(int n)
8 {
9     const int m = n;
10
11     for (int i = 0;i < m;i++)
12     {
13         foo();
14     }
15
16     foo();foo();foo();
17 }
18
19 // Negative Tests: test that should not generate a violation
20
21 namespace a { namespace b { namespace c { }; }; };
22
23 extern void foo(void);
24
25 void test_1_n(int n)
26 {
27     const int m = n;
28
29     for (int i = 0; i < m; i++)
30     {
31         foo();
32     }
33
34     foo(); foo(); foo();
35 }
36
37 // Single-quoted semicolons should not generate a violation
38
39 static char semicolon_char_1 = ';';
40
41 // Double-quoted semicolons should not generate a violation
42
43 static const char * const semicolon_string_1 = ";";
44 static const char * const semicolon_string_2 = "first;second;";
45 static const char * const semicolon_string_5 = "\"first\",\"second\";";
46 static const char * const semicolon_string_3 = "\"first\";\"second\";";
47 static const char * const semicolon_string_4 = "\'first\',\'second\';";
48 static const char * const semicolon_string_6 = "\'first\';\'second\';";
49 static const char * const semicolon_string_7 = "size=\"17;11\";";