glcpp: Update tests for new #undef of built-in macro rules.

Ian recently changed the preprocessor to allow this in most GLSL
versions, but not GLSL ES 3.00+.  This patch converts the existing
test that expects a failure to a #version 300 es shader, and adds
a #version 110 shader to make sure that it's allowed.

Fixes 'make check'.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97307
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
This commit is contained in:
Kenneth Graunke 2016-08-14 21:00:31 -07:00
parent c2f2252037
commit 1f47f78fc3
4 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,4 @@
#version 300 es
#undef __LINE__
#undef __FILE__
#undef __VERSION__

View file

@ -1,6 +1,7 @@
0:1(1): preprocessor error: Built-in (pre-defined) macro names cannot be undefined.
0:2(1): preprocessor error: Built-in (pre-defined) macro names cannot be undefined.
0:3(1): preprocessor error: Built-in (pre-defined) macro names cannot be undefined.
0:4(1): preprocessor error: Built-in (pre-defined) macro names cannot be undefined.
#version 300 es

View file

@ -0,0 +1,4 @@
#version 110
#undef __LINE__
#undef __FILE__
#undef __VERSION__

View file

@ -0,0 +1,4 @@
#version 110