Skip to content

Commit c1d5a1c

Browse files
committed
clang-format recently moved tests
1 parent 879afa2 commit c1d5a1c

File tree

234 files changed

+1774
-1120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+1774
-1120
lines changed

regression/cbmc-cpp/Address_of_Method1/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ void x::f()
1212

1313
int main()
1414
{
15-
assert(&x::f!=0);
15+
assert(&x::f != 0);
1616

17-
assert(&x::i!=0);
17+
assert(&x::i != 0);
1818
}

regression/cbmc-cpp/Anonymous_members1/main.cpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,26 @@ typedef signed LONG;
44
typedef long long LONGLONG;
55

66
typedef union _LARGE_INTEGER {
7-
struct {
8-
DWORD LowPart;
9-
LONG HighPart;
10-
};
11-
struct {
12-
DWORD LowPart;
13-
LONG HighPart;
14-
} u;
7+
struct
8+
{
9+
DWORD LowPart;
10+
LONG HighPart;
11+
};
12+
struct
13+
{
14+
DWORD LowPart;
15+
LONG HighPart;
16+
} u;
1517

16-
LONGLONG QuadPart;
18+
LONGLONG QuadPart;
1719
} LARGE_INTEGER;
1820

1921
int main()
2022
{
2123
LARGE_INTEGER l;
2224

23-
l.QuadPart=1;
24-
l.LowPart=2;
25-
l.u.LowPart=3;
26-
assert(l.LowPart==3);
25+
l.QuadPart = 1;
26+
l.LowPart = 2;
27+
l.u.LowPart = 3;
28+
assert(l.LowPart == 3);
2729
}

regression/cbmc-cpp/Array1/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ int y[5][4][3][2];
22

33
int main()
44
{
5-
for(int i=0; i<5; i++)
6-
for(int j=0; j<4; j++)
7-
for(int k=0; k<3; k++)
8-
for(int l=0; l<2; l++)
9-
y[i][j][k][l]=2;
5+
for(int i = 0; i < 5; i++)
6+
for(int j = 0; j < 4; j++)
7+
for(int k = 0; k < 3; k++)
8+
for(int l = 0; l < 2; l++)
9+
y[i][j][k][l] = 2;
1010
}

regression/cbmc-cpp/Array2/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ int y[2][3][4][5];
22

33
int main()
44
{
5-
for(int i=0; i<5; i++)
6-
for(int j=0; j<4; j++)
7-
for(int k=0; k<3; k++)
8-
for(int l=0; l<2; l++)
9-
y[i][j][k][l]=2; // out-of-bounds
5+
for(int i = 0; i < 5; i++)
6+
for(int j = 0; j < 4; j++)
7+
for(int k = 0; k < 3; k++)
8+
for(int l = 0; l < 2; l++)
9+
y[i][j][k][l] = 2; // out-of-bounds
1010
}

regression/cbmc-cpp/Array3/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
struct C
22
{
3-
static const char * array[1];
3+
static const char *array[1];
44
};
55

6-
const char * C::array[1] = { "HELLO" };
6+
const char *C::array[1] = {"HELLO"};
77

8-
int main(int argc, const char* argv[])
8+
int main(int argc, const char *argv[])
99
{
1010
assert(*C::array[0] == 'H');
1111
}

regression/cbmc-cpp/Array4/elsewhere.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ void elsewhere()
44
{
55
char ch;
66
// should fail, this is out of bounds
7-
ch=my_string[10];
7+
ch = my_string[10];
88
}

regression/cbmc-cpp/Array4/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
char my_string[]="abc";
1+
char my_string[] = "abc";
22

33
void elsewhere();
44

regression/cbmc-cpp/Assignment1/main.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
#include <cassert>
2-
struct A { int i;};
2+
struct A
3+
{
4+
int i;
5+
};
36

47
struct B
58
{
69
int i;
7-
B& operator = (const B& b)
10+
B &operator=(const B &b)
811
{
912
i = b.i;
1013
return *this;
@@ -18,7 +21,6 @@ A funcA()
1821
return a;
1922
}
2023

21-
2224
B funcB()
2325
{
2426
B b;
@@ -34,5 +36,5 @@ int main()
3436

3537
B b;
3638
b.i = 20;
37-
assert((funcB() = b).i == 20); // legal
39+
assert((funcB() = b).i == 20); // legal
3840
}

regression/cbmc-cpp/Class_Members1/main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ class t
55
int i;
66
void f();
77

8-
void g(double xxx=3.2);
8+
void g(double xxx = 3.2);
99
};
1010

1111
void t::f()
1212
{
13-
i=1;
13+
i = 1;
1414
}
1515

1616
void t::g(double d)
1717
{
18-
i=(int)d;
18+
i = (int)d;
1919
}
2020

2121
int main()
2222
{
2323
t instance;
2424
instance.f();
25-
assert(instance.i==1);
25+
assert(instance.i == 1);
2626

2727
instance.g(2.1);
28-
assert(instance.i==2);
28+
assert(instance.i == 2);
2929
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include <cassert>
22
int main()
33
{
4-
int s=0;
5-
int t=0;
6-
t=(s=3, s+2);
7-
assert(s==3);
8-
assert(t==5);
4+
int s = 0;
5+
int t = 0;
6+
t = (s = 3, s + 2);
7+
assert(s == 3);
8+
assert(t == 5);
99
}

0 commit comments

Comments
 (0)