-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAddBlockDelimiter.cpp
More file actions
39 lines (33 loc) · 856 Bytes
/
AddBlockDelimiter.cpp
File metadata and controls
39 lines (33 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Adds or removes optional block delimiters.
// Test adding and removing curly brace block delimiters to chunks of code.
namespace
{
int AddBlockDelimiters(bool flag)
{
int x = 0;
if (flag)
// #TEST#: ABD1 Add delimiters
x = AddBlockDelimiters(false);
else if (flag || (x > 0))
// #TEST#: ABD2 Add delimiters
x = -1;
else
// #TEST#: ABD3 Add delimiters
x = 1;
while (x < 10)
// #TEST#: ABD4 Add delimiters
if (x < 10)
// #TEST#: ABD5 Add delimiters
do
// #TEST#: ABD6 Add delimiters
for (x = 1; x < 10; ++x)
// #TEST#: ABD7 Add delimiters
++x;
while (x < 5);
return x;
}
} // namespace
void TestAddBlockDelimiter()
{
AddBlockDelimiters(false);
}