summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/tests/122-redefine-whitespace.c
blob: ae7ea09f67e08c3fb8107e680d19dce7ca793617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Original definitions. */
#define TWO  ( 1+1 )
#define FOUR (2 + 2)
#define SIX  (3 + 3)

/* Redefinitions with whitespace in same places, but different amounts, (so no
 * error). */
#define TWO	(	1+1   )
#define FOUR    (2	+  2)
#define SIX	(3/*comment is whitespace*/+   /* collapsed */ /* to */ /* one */ /* space */  3)

/* Redefinitions with whitespace in different places. Each of these should
 * trigger an error. */
#define TWO  (1 + 1)
#define FOUR ( 2+2 )
#define SIX  (/*not*/3 + 3/*expected*/)