[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.
This commit is contained in:
Jeff Muizelaar 2009-02-10 11:44:20 -05:00
parent fe40d3bdb0
commit 41e46c7754
3 changed files with 16 additions and 15 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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)