summaryrefslogtreecommitdiff
path: root/test/rel-path.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-03-17 12:01:13 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2009-03-18 09:44:33 +0000
commitc932a809d6484503d7ee267d934bbc87c8d44092 (patch)
treeaf0fda7b9a42847bab62f332bc33c46a63f4a912 /test/rel-path.c
parent7db55b37d4aef188e04771b45076f6735507c209 (diff)
downloadcairo-c932a809d6484503d7ee267d934bbc87c8d44092.tar.gz
[test] Propagate allocation failure.
Check for memfaults during rel-path test.
Diffstat (limited to 'test/rel-path.c')
-rw-r--r--test/rel-path.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/test/rel-path.c b/test/rel-path.c
index 15440013b..d1ef25920 100644
--- a/test/rel-path.c
+++ b/test/rel-path.c
@@ -74,24 +74,37 @@ draw (cairo_t *cr, int width, int height)
{
const cairo_test_context_t *ctx = cairo_test_get_context (cr);
cairo_status_t status;
+ cairo_test_status_t result;
/* first test that a relative move without a current point fails... */
status = invalid_rel_move_to (cairo_get_target (cr));
if (status != CAIRO_STATUS_NO_CURRENT_POINT) {
+ result = cairo_test_status_from_status (ctx, status);
+ if (result == CAIRO_TEST_NO_MEMORY)
+ return result;
+
cairo_test_log (ctx, "Error: invalid cairo_rel_move_to() did not raise NO_CURRENT_POINT\n");
- return CAIRO_TEST_FAILURE;
+ return result;
}
status = invalid_rel_line_to (cairo_get_target (cr));
if (status != CAIRO_STATUS_NO_CURRENT_POINT) {
+ result = cairo_test_status_from_status (ctx, status);
+ if (result == CAIRO_TEST_NO_MEMORY)
+ return result;
+
cairo_test_log (ctx, "Error: invalid cairo_rel_line_to() did not raise NO_CURRENT_POINT\n");
- return CAIRO_TEST_FAILURE;
+ return result;
}
status = invalid_rel_curve_to (cairo_get_target (cr));
if (status != CAIRO_STATUS_NO_CURRENT_POINT) {
+ result = cairo_test_status_from_status (ctx, status);
+ if (result == CAIRO_TEST_NO_MEMORY)
+ return result;
+
cairo_test_log (ctx, "Error: invalid cairo_rel_curve_to() did not raise NO_CURRENT_POINT\n");
- return CAIRO_TEST_FAILURE;
+ return result;
}
cairo_set_source_rgb (cr, 1, 1, 1);