]> pd.if.org Git - lice/blob - tests/es.c
autocommit for files dated 2014-11-17 20:13:34
[lice] / tests / es.c
1 // expression statements
2
3 #define maxint(A, B) \
4     ({ int a = (A), b = (B); a > b ? a : b; })
5
6 int main(void) {
7
8     expecti(({ 'a'; 1; 64; }), 64);
9
10     expecti(
11         ({
12             int a = 10;
13             a;
14         }), 10
15     );
16
17     expecti(
18         ({
19             int i = 0;
20             for (; i < 10; i++)
21                 ;
22             i;
23         }), 10
24     );
25
26     expecti(maxint(100, 5), 100);
27
28     expecti(({ (int){1}; }), 1);
29
30     return 0;
31 }