Nice. :) The series is Reviewed-by: Ian Romanick <[email protected]>
On 08/28/2013 12:43 PM, Kenneth Graunke wrote: > The old tests verified that the value of __VERSION__ was correct, but > didn't verify that __VERSION__ is an actual #define, as opposed to a > built-in integer constant variable. > > The new approach checks both. > > Suggested-by: Ian Romanick <[email protected]> > Signed-off-by: Kenneth Graunke <[email protected]> > --- > tests/spec/glsl-1.50/compiler/version-macro.frag | 9 ++++++++- > tests/spec/glsl-3.30/compiler/version-macro.frag | 9 ++++++++- > 2 files changed, 16 insertions(+), 2 deletions(-) > > diff --git a/tests/spec/glsl-1.50/compiler/version-macro.frag > b/tests/spec/glsl-1.50/compiler/version-macro.frag > index 735ffc8..532d129 100644 > --- a/tests/spec/glsl-1.50/compiler/version-macro.frag > +++ b/tests/spec/glsl-1.50/compiler/version-macro.frag > @@ -4,4 +4,11 @@ > // [end config] > > #version 150 > -int x[int(__VERSION__ == 150)]; > +#if !defined __VERSION__ > +#error __VERSION__ not defined. > +#endif > +#if __VERSION__ != 150 > +#error __VERSION__ is not 150 > +#endif > + > +void main() { } > diff --git a/tests/spec/glsl-3.30/compiler/version-macro.frag > b/tests/spec/glsl-3.30/compiler/version-macro.frag > index d4107ce..20b7815 100644 > --- a/tests/spec/glsl-3.30/compiler/version-macro.frag > +++ b/tests/spec/glsl-3.30/compiler/version-macro.frag > @@ -4,4 +4,11 @@ > // [end config] > > #version 330 > -int x[int(__VERSION__ == 330)]; > +#if !defined __VERSION__ > +#error __VERSION__ not defined. > +#endif > +#if __VERSION__ != 330 > +#error __VERSION__ is not 330 > +#endif > + > +void main() { } > _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
