[librsvg/rustification] tests/dimensions.c: Assert that we got the sub-object; print the dimensions



commit 57471e12925b48b5ef01e0ca441be6d79b73026c
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]