repo.or.cz
/
piglit
/
hramrach.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add more structure constructor tests.
[piglit/hramrach.git]
/
tests
/
glslparsertest
/
shaders
/
preprocess1.frag
blob
8417efeecbff94f973add631e14545f3458a3435
1
// tests for macro redifinition (t2) and the #if and #else nestings.
\r
2
// takes care of elif also.
\r
3
\r
4
#define t1 (1+2)
\r
5
#define t2 2
\r
6
#define t2 3
\r
7
\r
8
// testing the if depth
\r
9
#if (t1==3)
\r
10
#define t3 3
\r
11
#if defined t2
\r
12
#define t4 4
\r
13
#if defined(t3)
\r
14
#define t5 5
\r
15
#ifdef t5
\r
16
#define t6 6
\r
17
#ifndef t7
\r
18
#define t7 7
\r
19
#else
\r
20
#define t8 8
\r
21
#endif
\r
22
#endif
\r
23
#else
\r
24
#ifndef t8
\r
25
#define t8 8
\r
26
#elif (t8==8)
\r
27
#define t9 9
\r
28
#else
\r
29
#if defined t7
\r
30
#define t9 9
\r
31
#endif
\r
32
#endif
\r
33
#endif
\r
34
#else
\r
35
#define t10 10
\r
36
#endif
\r
37
#endif
\r
38
\r
39
\r
40
#define t8 8
\r
41
#define t9 9
\r
42
#define t10 10
\r
43
\r
44
void main(void)
\r
45
{
\r
46
int sum=1 ;
\r
47
sum = t1+t2;
\r
48
sum = t3+t4;
\r
49
sum = t5+t6;
\r
50
sum = t7+t8;
\r
51
sum = t9+t10;
\r
52
}
\r
53
\r