From 41e46c7754fff3a99927979925300a7588b9962f Mon Sep 17 00:00:00 2001 From: Jeff Muizelaar Date: Tue, 10 Feb 2009 11:44:20 -0500 Subject: [PATCH] [test] Don't embed preprocessor directives inside macros MSVC can't handle this. GCC will warn with -pedantic, but I'm not sure we want to enable that. --- test/user-font-mask.c | 11 ++++++----- test/user-font-proxy.c | 10 +++++----- test/user-font.c | 10 +++++----- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/test/user-font-mask.c b/test/user-font-mask.c index 16bd59b7b..149f8ee9e 100644 --- a/test/user-font-mask.c +++ b/test/user-font-mask.c @@ -36,7 +36,12 @@ #define BORDER 10 #define TEXT_SIZE 64 #define WIDTH (TEXT_SIZE * 15 + 2*BORDER) -#define HEIGHT ((TEXT_SIZE + 2*BORDER)*2) +#ifndef ROTATED + #define HEIGHT ((TEXT_SIZE + 2*BORDER)*2) +#else + #define HEIGHT WIDTH +#endif +#define END_GLYPH 0 #define TEXT "cairo" /* Reverse the bits in a byte with 7 operations (no 64-bit): @@ -238,9 +243,5 @@ CAIRO_TEST (user_font_mask, "Tests a user-font using cairo_mask with bitmap images", "user-font, mask", /* keywords */ NULL, /* requirements */ -#ifndef ROTATED WIDTH, HEIGHT, -#else - WIDTH, WIDTH, -#endif NULL, draw) diff --git a/test/user-font-proxy.c b/test/user-font-proxy.c index 45974d3dd..3470a1218 100644 --- a/test/user-font-proxy.c +++ b/test/user-font-proxy.c @@ -35,7 +35,11 @@ #define BORDER 10 #define TEXT_SIZE 64 #define WIDTH (TEXT_SIZE * 12 + 2*BORDER) -#define HEIGHT ((TEXT_SIZE + 2*BORDER)*2) +#ifndef ROTATED + #define HEIGHT ((TEXT_SIZE + 2*BORDER)*2) +#else + #define HEIGHT WIDTH +#endif #define TEXT "geez... cairo user-font" static cairo_user_data_key_t fallback_font_key; @@ -208,9 +212,5 @@ CAIRO_TEST (user_font_proxy, "Tests a user-font using a native font in its render_glyph", "font, user-font", /* keywords */ "cairo >= 1.7.4", /* requirements */ -#ifndef ROTATED WIDTH, HEIGHT, -#else - WIDTH, WIDTH, -#endif NULL, draw) diff --git a/test/user-font.c b/test/user-font.c index 38e2b1d5b..30bc74e35 100644 --- a/test/user-font.c +++ b/test/user-font.c @@ -35,7 +35,11 @@ #define BORDER 10 #define TEXT_SIZE 64 #define WIDTH (TEXT_SIZE * 15 + 2*BORDER) -#define HEIGHT ((TEXT_SIZE + 2*BORDER)*2) +#ifndef ROTATED + #define HEIGHT ((TEXT_SIZE + 2*BORDER)*2) +#else + #define HEIGHT WIDTH +#endif #define TEXT "geez... cairo user-font" #define END_GLYPH 0 @@ -259,9 +263,5 @@ CAIRO_TEST (user_font, "Tests user font feature", "font, user-font", /* keywords */ "cairo >= 1.7.4", /* requirements */ -#ifndef ROTATED WIDTH, HEIGHT, -#else - WIDTH, WIDTH, -#endif NULL, draw)