[librsvg/librsvg-2.40] tests/dimensions.c: Assert that we got the sub-object; print the dimensions
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/librsvg-2.40] tests/dimensions.c: Assert that we got the sub-object; print the dimensions
- Date: Wed, 4 Oct 2017 15:16:33 +0000 (UTC)
commit 1b14b5ab375db864d71cf866eb17e107efb0e74d
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Nov 9 17:39:26 2016 -0600
tests/dimensions.c: Assert that we got the sub-object; print the dimensions
tests/dimensions.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/tests/dimensions.c b/tests/dimensions.c
index 563216c..4353df0 100644
--- a/tests/dimensions.c
+++ b/tests/dimensions.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* vim: set ts=4 nowrap ai expandtab sw=4: */
#include <glib.h>
@@ -29,11 +30,14 @@ test_dimensions (FixtureData *fixture)
g_assert_no_error (error);
if (fixture->id) {
- g_message ("id = %s", fixture->id);
- rsvg_handle_get_dimensions_sub (handle, &dimension, fixture->id);
- g_message ("w=%d h=%d", dimension.width, dimension.height);
+ gboolean got_sub;
+
+ got_sub = rsvg_handle_get_dimensions_sub (handle, &dimension, fixture->id);
+ g_assert (got_sub);
+ g_message ("w=%d h=%d", dimension.width, dimension.height);
} else
rsvg_handle_get_dimensions (handle, &dimension);
+
g_assert_cmpint (fixture->width, ==, dimension.width);
g_assert_cmpint (fixture->height, ==, dimension.height);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]