[cairo-commit] test/user-font.c test/user-font-mask.c test/user-font-proxy.c

Jeff Muizelaar jrmuizel at kemper.freedesktop.org
Tue Feb 10 12:59:54 PST 2009


 test/user-font-mask.c  |   11 ++++++-----
 test/user-font-proxy.c |   10 +++++-----
 test/user-font.c       |   10 +++++-----
 3 files changed, 16 insertions(+), 15 deletions(-)

New commits:
commit 41e46c7754fff3a99927979925300a7588b9962f
Author: Jeff Muizelaar <jmuizelaar at mozilla.com>
Date:   Tue Feb 10 11:44:20 2009 -0500

    [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.

diff --git a/test/user-font-mask.c b/test/user-font-mask.c
index 16bd59b..149f8ee 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 45974d3..3470a12 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 38e2b1d..30bc74e 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)


More information about the cairo-commit mailing list