mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-20 19:58:19 +02:00
GCC's preprocessor accepts a macro definition where there is no space between
the macro's identifier name and the replacementlist. (GCC does emit a "missing
space" warning that we don't, but that's fine.)
This is an exhaustive test that verifies that all legal GLSL characters that
could possibly be interpreted as separating the macro name from the
replacement list are interpreted as such. So the testing here includes all
valid GLSL symbols except for:
* Characters that can be part of an identifier (a-z, A-Z, 0-9, _)
* Backslash, (allowed only as line continuation)
* Hash, (allowed only to introduce pre-processor directive, or as part of a
paste operator in a replacement list---but not as first token of
replacement list)
* Space characters (since the point of the testing is to have missing space)
* Left parenthesis (which would indicate a function-like macro)
v2 (Ken): Move to src/compiler, renumber tests.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
58 lines
336 B
Text
58 lines
336 B
Text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
& ampersand
|
|
! bang
|
|
, comma
|
|
/ divider
|
|
= equals
|
|
. full stop
|
|
> greater than
|
|
- hyphen
|
|
+ incrementor
|
|
[ JSON array
|
|
} kurly brace?
|
|
< less than
|
|
{ moustache
|
|
^ nose
|
|
) parenthesis (right)
|
|
? question mark
|
|
% ratio indicator
|
|
] square bracket (right)
|
|
~ tilde
|
|
: umlaut?
|
|
| vertical bar
|
|
; wink
|
|
* X (as multiplication)
|
|
|