- Remove variable name negative tests with two underscores to conform
to modified spec.
- Convert negative macro name case to a positive one that does not
use the macro value. (Since it might be set by underlying software
layer).
Bug:
18323254
Change-Id: I1bb3f6d0e7a9d6c0ac0275cc388b37b03d4009e5
end # reserved_keywords
group invalid_identifiers "Usage of invalid identifiers."
- case two_underscores_begin
- expect compile_fail
- values {}
-
- both ""
- precision mediump float;
-
- ${DECLARATIONS}
-
- void main()
- {
- ${SETUP}
- float __invalid = 1.0;
- ${OUTPUT}
- }
- ""
- end
- case two_underscores_middle
- expect compile_fail
- values {}
-
- both ""
- precision mediump float;
-
- ${DECLARATIONS}
-
- void main()
- {
- ${SETUP}
- float in__valid = 1.0;
- ${OUTPUT}
- }
- ""
- end
- case two_underscores_end
- expect compile_fail
- values {}
-
- both ""
- precision mediump float;
-
- ${DECLARATIONS}
-
- void main()
- {
- ${SETUP}
- float invalid__ = 1.0;
- ${OUTPUT}
- }
- ""
- end
case gl_begin
expect compile_fail
values {}
end # reserved_keywords
group invalid_identifiers "Usage of invalid identifiers."
- case two_underscores_begin
- expect compile_fail
- values {}
- version 300 es
-
- both ""
- #version 300 es
- precision mediump float;
- ${DECLARATIONS}
-
- void main()
- {
- ${SETUP}
- float __invalid = 1.0;
- ${OUTPUT}
- }
- ""
- end
- case two_underscores_middle
- expect compile_fail
- values {}
- version 300 es
-
- both ""
- #version 300 es
- precision mediump float;
- ${DECLARATIONS}
-
- void main()
- {
- ${SETUP}
- float in__valid = 1.0;
- ${OUTPUT}
- }
- ""
- end
- case two_underscores_end
- expect compile_fail
- values {}
- version 300 es
-
- both ""
- #version 300 es
- precision mediump float;
- ${DECLARATIONS}
-
- void main()
- {
- ${SETUP}
- float invalid__ = 1.0;
- ${OUTPUT}
- }
- ""
- end
case gl_begin
expect compile_fail
values {}
""
end
+ case identifier_with_double_underscore
+ values { output float out0 = 1.0; }
+ version 300 es
+ both ""
+ #version 300 es
+ precision mediump float;
+ ${DECLARATIONS}
+ # define __VALUE__ 1
+
+ void main()
+ {
+ // __VALUE__ not used since it might be set by an "underlying software layer"
+ out0 = float(1.0);
+ ${OUTPUT}
+ }
+ ""
+ end
end # basic
group definitions "Symbol Definition Tests"
group invalid_redefinitions "Invalid Redefinitions Tests"
- case invalid_identifier_1
- version 300 es
- expect compile_fail
- both ""
- #version 300 es
- precision mediump float;
- ${DECLARATIONS}
- # define __VALUE__ 1
-
- void main()
- {
- ${POSITION_FRAG_COLOR} = vec4(__VALUE__);
- }
- ""
- end
-
case invalid_identifier_2
version 300 es
expect compile_fail