xref: /aosp_15_r20/external/deqp/external/openglcts/data/gl_cts/data/gl44/preprocessor.test (revision 35238bce31c2a825756842865a792f8cf7f89930)
1group invalid_redefinitions "Invalid Redefinitions Tests"
2
3    case invalid_identifier_2
4        version 440
5        expect compile_fail
6        both ""
7            #version 440
8            precision mediump float;
9            ${DECLARATIONS}
10            # define GL_VALUE    1.0
11
12            void main()
13            {
14                ${POSITION_FRAG_COLOR} = vec4(GL_VALUE);
15            }
16        ""
17    end
18
19end # invalid_redefinitions
20
21group line_continuation "Line Continuation Tests"
22
23    case comment
24        version 440
25        values { output float out0 = 1.0; }
26        both ""
27            #version 440
28            precision mediump float;
29            ${DECLARATIONS}
30
31            void main ()
32            {
33                out0 = 1.0;
34                // comment \\
35                out0 = -1.0;
36                ${OUTPUT}
37            }
38        ""
39    end
40
41    case define
42        version 440
43        values { output float out0 = 1.0; }
44        both ""
45            #version 440
46            precision mediump float;
47            ${DECLARATIONS}
48            #define A(X) \\
49                (-1.0*(X))
50
51            void main ()
52            {
53                out0 = A(-1.0);
54                ${OUTPUT}
55            }
56        ""
57    end
58
59    case preprocessing_token
60        version 440
61        values { output float out0 = 1.0; }
62        both ""
63            #version 440
64            precision mediump float;
65            ${DECLARATIONS}
66            #def\\
67            ine A(X) (-1.0*(X))
68
69            void main ()
70            {
71                out0 = A(-1.0);
72                ${OUTPUT}
73            }
74        ""
75    end
76
77    case token
78        version 440
79        values { output float out0 = 1.0; }
80        both ""
81            #version 440
82            precision mediump float;
83            ${DECLARATIONS}
84
85            void main ()
86            {
87                float f\\
88            oo = 1.0;
89                out0 = foo;
90                ${OUTPUT}
91            }
92        ""
93    end
94
95    case middle_of_line
96        version 440
97        values { output float out0 = 1.0; }
98        both ""
99            #version 440
100            precision mediump float;
101            ${DECLARATIONS}
102            #define A a \\ b
103            #define B 1.0
104
105            void main ()
106            {
107                out0 = B;
108                ${OUTPUT}
109            }
110        ""
111    end
112
113end # line_continuation
114