[glslang] Refine implicit array size interfaces. (#3074)
[platform/upstream/glslang.git] / Test / cppIndent.vert
1 #version 110
2
3 #define ON
4
5 float sum = 0.0;
6
7 void main()
8 {
9
10 #ifdef ON
11 //yes
12 sum += 1.0;
13 #endif
14
15 #ifdef OFF
16     //no
17     sum += 20.0;
18 #endif
19
20     #if defined(ON)
21     //yes
22     sum += 300.0;
23     #endif
24
25     #if defined(OFF)
26     //no
27     sum += 4000.0;
28     #endif
29
30                   #if !defined(ON)
31                 //no
32                 sum += 50000.0;
33                 #endif
34
35         #if !defined(OFF)
36                 //yes
37                 sum += 600000.0;
38                 #endif
39
40     #if defined (ON) && defined               (OFF)         
41 //no
42 sum += 7000000.0;
43     #endif
44
45 #if        defined   (  ON         ) && !        defined(OFF)
46 //yes
47 sum += 80000000.0;
48 #endif
49
50 #if defined(OFF) || defined(ON)
51 //yes
52 sum += 900000000.0;
53 #endif
54
55 // sum should be 980600301.0
56     gl_Position = vec4(sum);
57 }
58
59 #define FUNC(a,b)               a+b
60 // needs to be last test in file due to syntax error
61 void foo986(){  FUNC( (((2)))), 4); }  // ERROR, too few arguments )