Fix dEQP issues with identifier names with two underscores.
authorJarkko Pöyry <jpoyry@google.com>
Tue, 11 Nov 2014 01:29:27 +0000 (17:29 -0800)
committerJarkko Pöyry <jpoyry@google.com>
Tue, 11 Nov 2014 01:29:27 +0000 (17:29 -0800)
- 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

data/gles2/shaders/keywords.test
data/gles3/shaders/keywords.test
data/gles3/shaders/preprocessor.test

index d05fea3..16fc390 100644 (file)
@@ -1558,57 +1558,6 @@ group reserved_keywords "Usage of reserved keywords as identifiers."
 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 {}
index 3de68ae..b588cd7 100644 (file)
@@ -3143,60 +3143,6 @@ group reserved_keywords "Usage of reserved keywords as identifiers."
 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 {}
index ba82610..bee7011 100644 (file)
@@ -134,6 +134,23 @@ group basic "Basic Tests"
                ""
        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"
@@ -646,22 +663,6 @@ end # object_redefinitions
 
 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