From eabb176c4d8e22ded88023a8f952ffbaf73b2492 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jarkko=20P=C3=B6yry?= Date: Mon, 10 Nov 2014 17:29:27 -0800 Subject: [PATCH] Fix dEQP issues with identifier names with two underscores. - 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 | 51 ---------------------------------- data/gles3/shaders/keywords.test | 54 ------------------------------------ data/gles3/shaders/preprocessor.test | 33 +++++++++++----------- 3 files changed, 17 insertions(+), 121 deletions(-) diff --git a/data/gles2/shaders/keywords.test b/data/gles2/shaders/keywords.test index d05fea3..16fc390 100644 --- a/data/gles2/shaders/keywords.test +++ b/data/gles2/shaders/keywords.test @@ -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 {} diff --git a/data/gles3/shaders/keywords.test b/data/gles3/shaders/keywords.test index 3de68ae..b588cd7 100644 --- a/data/gles3/shaders/keywords.test +++ b/data/gles3/shaders/keywords.test @@ -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 {} diff --git a/data/gles3/shaders/preprocessor.test b/data/gles3/shaders/preprocessor.test index ba82610..bee7011 100644 --- a/data/gles3/shaders/preprocessor.test +++ b/data/gles3/shaders/preprocessor.test @@ -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 -- 2.7.4