summaryrefslogtreecommitdiff
path: root/test/font-matrix-translation.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-10-16 14:26:15 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-10-18 09:55:08 +0100
commit0409be426cb7f67974346a93213dd4675b59776c (patch)
tree66bf1b3e2c7147d898344b0e79f5211798f6e9a1 /test/font-matrix-translation.c
parent21360bf6748b30cf58d54561e40a1aa711d8d7af (diff)
[test/font-matrix-translation] Check for OOM
First check that querying the extents did not trigger NO_MEMORY.
Diffstat (limited to 'test/font-matrix-translation.c')
-rw-r--r--test/font-matrix-translation.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/font-matrix-translation.c b/test/font-matrix-translation.c
index 263a378d..416956f3 100644
--- a/test/font-matrix-translation.c
+++ b/test/font-matrix-translation.c
@@ -58,6 +58,7 @@ box_text (const cairo_test_context_t *ctx, cairo_t *cr,
double line_width;
cairo_text_extents_t extents = {0}, scaled_extents = {0};
cairo_scaled_font_t *scaled_font;
+ cairo_status_t status;
cairo_save (cr);
@@ -65,6 +66,10 @@ box_text (const cairo_test_context_t *ctx, cairo_t *cr,
scaled_font = cairo_get_scaled_font (cr);
cairo_scaled_font_text_extents (scaled_font, TEXT, &scaled_extents);
+ status = cairo_scaled_font_status (scaled_font);
+ if (status)
+ return cairo_test_status_from_status (ctx, status);
+
if (! text_extents_equal (&extents, &scaled_extents)) {
cairo_test_log (ctx,
"Error: extents differ when they shouldn't:\n"