mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
glsl/glcpp: Add testing for directives preceded by a space
This test simply has one of each directive, all of which are preceded by a single space character.
This commit is contained in:
parent
da7f226a27
commit
9e45fb6f51
2 changed files with 43 additions and 0 deletions
21
src/glsl/glcpp/tests/128-space-before-hash.c
Normal file
21
src/glsl/glcpp/tests/128-space-before-hash.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* Any directive can be preceded by a space. */
|
||||
#version 300
|
||||
#pragma Testing spaces before hash
|
||||
#
|
||||
#line 3
|
||||
#define FOO
|
||||
#ifdef FOO
|
||||
yes
|
||||
#endif
|
||||
#if 0
|
||||
#elif defined FOO
|
||||
yes again
|
||||
#endif
|
||||
#if 0
|
||||
#else
|
||||
for the third time, yes!
|
||||
#endif
|
||||
#undef FOO
|
||||
#ifndef FOO
|
||||
yes, of course
|
||||
#endif
|
||||
22
src/glsl/glcpp/tests/128-space-before-hash.c.expected
Normal file
22
src/glsl/glcpp/tests/128-space-before-hash.c.expected
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
#version 300
|
||||
#pragma Testing spaces before hash
|
||||
|
||||
#line 3
|
||||
|
||||
|
||||
yes
|
||||
|
||||
|
||||
|
||||
yes again
|
||||
|
||||
|
||||
|
||||
for the third time, yes!
|
||||
|
||||
|
||||
|
||||
yes, of course
|
||||
|
||||
|
||||
Loading…
Add table
Reference in a new issue