[gimp] app/tests: Assert on existance of files before trying to open them



commit a4aa6add4393af0d61efa4be4d736d2ed2da1223
Author: Martin Nordholts <martinn src gnome org>
Date:   Sun Apr 10 11:53:31 2011 +0200

    app/tests: Assert on existance of files before trying to open them
    
    Assert on existance of files before trying to open them so that that
    reason for failure becomes clear when that is the cause.

 app/tests/test-save-and-export.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/app/tests/test-save-and-export.c b/app/tests/test-save-and-export.c
index 5c2aba6..6249f98 100644
--- a/app/tests/test-save-and-export.c
+++ b/app/tests/test-save-and-export.c
@@ -168,8 +168,9 @@ imported_file_uris (GimpTestFixture *fixture,
   filename = g_build_filename (g_getenv ("GIMP_TESTING_ABS_TOP_SRCDIR"),
                                "desktop/64x64/gimp.png",
                                NULL);
-  uri = g_filename_to_uri (filename, NULL, NULL);
+  g_assert (g_file_test (filename, G_FILE_TEST_EXISTS));
 
+  uri = g_filename_to_uri (filename, NULL, NULL);
   image = file_open_image (gimp,
                            gimp_get_user_context (gimp),
                            NULL /*progress*/,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]