Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / tools / reorder / test.cpp
blob8f7b9e8c690b0fa29a7da678a862532c2d58dd49
1 extern "C" int mult(int l, int r);
3 extern "C" {
5 inline
6 int
7 farfle(int a, int b)
9 return a * b + a / b;
12 static
13 int
14 ballywhoo(int a, int b)
16 // So it can't get inlined
17 if (a > 4)
18 ballywhoo(a - 1, a + 1);
20 return a + b;
23 static
24 int
25 blimpyburger(char a, int b)
27 if (a == 'f')
28 return b;
30 return 0;
35 class foo
37 public:
38 static int get_flooby() { static int flooby = 12; return flooby; }
40 static int divide(int a, int b);
42 foo() {}
43 foo(int a);
44 virtual ~foo() {}
46 int bar();
48 int baz(int a) { return a ? baz(a - 1) : 0; }
51 foo::foo(int a)
55 int
56 foo::divide(int a, int b)
58 static int phlegm = 12;
59 return a / b * ++phlegm;
62 int
63 foo::bar()
65 return 12;
68 int main(int argc, char* argv[])
70 int a = mult(5, 4);
71 a = ballywhoo(5, 2);
72 a = farfle(a, 6);
73 a = blimpyburger('q', 4);
75 foo f;
76 f.get_flooby();
77 a = f.bar();
79 a = foo::divide(a, 12) + f.baz(6);
81 foo f2(12);
82 f2.baz(15);
84 return a > 99 ? 1 : 0;