summaryrefslogtreecommitdiff
path: root/test/ft-font-create-for-ft-face.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-02-28 02:30:27 -0800
committerCarl Worth <cworth@cworth.org>2006-02-28 02:30:27 -0800
commit210dd59a7441424f71658ca248f6657482c74c7e (patch)
treebc2cc48581a6dce4e147012a141159f75ccdee8d /test/ft-font-create-for-ft-face.c
parentbd2136a23f8a3d5f6a1306d18499fdcfc1e87f48 (diff)
downloadcairo-210dd59a7441424f71658ca248f6657482c74c7e.tar.gz
Add some basic testing of cairo_font_face_get_type and
cairo_scaled_font_get_type.
Diffstat (limited to 'test/ft-font-create-for-ft-face.c')
-rw-r--r--test/ft-font-create-for-ft-face.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ft-font-create-for-ft-face.c b/test/ft-font-create-for-ft-face.c
index bf668b9d8..0bb3b8c0d 100644
--- a/test/ft-font-create-for-ft-face.c
+++ b/test/ft-font-create-for-ft-face.c
@@ -64,6 +64,13 @@ draw (cairo_t *cr, int width, int height)
font_face = cairo_ft_font_face_create_for_pattern (resolved);
+ if (cairo_font_face_get_type (font_face) != CAIRO_FONT_TYPE_FT) {
+ cairo_test_log ("Unexpected value from cairo_font_face_get_type: %d (expected %d)\n",
+ cairo_font_face_get_type (font_face), CAIRO_FONT_TYPE_FT);
+ cairo_font_face_destroy (font_face);
+ return CAIRO_TEST_FAILURE;
+ }
+
cairo_matrix_init_identity (&font_matrix);
cairo_get_matrix (cr, &ctm);
@@ -82,6 +89,13 @@ draw (cairo_t *cr, int width, int height)
FcPatternDestroy (pattern);
FcPatternDestroy (resolved);
+ if (cairo_scaled_font_get_type (scaled_font) != CAIRO_FONT_TYPE_FT) {
+ cairo_test_log ("Unexpected value from cairo_scaled_font_get_type: %d (expected %d)\n",
+ cairo_scaled_font_get_type (scaled_font), CAIRO_FONT_TYPE_FT);
+ cairo_scaled_font_destroy (scaled_font);
+ return CAIRO_TEST_FAILURE;
+ }
+
if (!ft_face) {
cairo_test_log ("Failed to get an ft_face with cairo_ft_scaled_font_lock_face\n");
cairo_scaled_font_destroy (scaled_font);