[Mesa-dev] [PATCH 1/2] glcpp: Add new test showing bug where a trailing ':' prevents macro expansion
Ian Romanick
idr at freedesktop.org
Sat Jan 21 10:47:02 PST 2012
On Sat, Jan 21, 2012 at 09:34:25AM -0800, Carl Worth wrote:
> This demonstrates a bug that was recently triggered in piglit.
>
> Here is the original bug report (containing a test case almost identical
> to this one):
>
> https://bugs.freedesktop.org/show_bug.cgi?id=44764
We should also wire things up so that the glcpp tests are run with
'make check'. There's already some infrastructure for that.
> ---
> src/glsl/glcpp/tests/100-macro-with-colon.c | 7 +++++++
> .../glcpp/tests/100-macro-with-colon.c.expected | 8 ++++++++
> 2 files changed, 15 insertions(+), 0 deletions(-)
> create mode 100644 src/glsl/glcpp/tests/100-macro-with-colon.c
> create mode 100644 src/glsl/glcpp/tests/100-macro-with-colon.c.expected
>
> diff --git a/src/glsl/glcpp/tests/100-macro-with-colon.c b/src/glsl/glcpp/tests/100-macro-with-colon.c
> new file mode 100644
> index 0000000..31dbb9a
> --- /dev/null
> +++ b/src/glsl/glcpp/tests/100-macro-with-colon.c
> @@ -0,0 +1,7 @@
> +#define one 1
> +#define two 2
> +
> +switch (1) {
> + case one + two:
> + break;
> +}
> diff --git a/src/glsl/glcpp/tests/100-macro-with-colon.c.expected b/src/glsl/glcpp/tests/100-macro-with-colon.c.expected
> new file mode 100644
> index 0000000..6cfac25
> --- /dev/null
> +++ b/src/glsl/glcpp/tests/100-macro-with-colon.c.expected
> @@ -0,0 +1,8 @@
> +
> +
> +
> +switch (1) {
> + case 1 + 2:
> + break;
> +}
> +
> --
> 1.7.8.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120121/14e5ca3f/attachment-0001.pgp>
More information about the mesa-dev
mailing list