[gimp] app: fail less badly in tests



commit af2ad3228fe6946d252c98d47ab9466d8a79e68c
Author: Michael Natterer <mitch gimp org>
Date:   Sat May 5 20:36:54 2012 +0200

    app: fail less badly in tests

 app/tests/test-gimptilebackendtilemanager.c |    4 +---
 app/tests/test-xcf.c                        |    2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/app/tests/test-gimptilebackendtilemanager.c b/app/tests/test-gimptilebackendtilemanager.c
index edabfe7..8a4e5a4 100644
--- a/app/tests/test-gimptilebackendtilemanager.c
+++ b/app/tests/test-gimptilebackendtilemanager.c
@@ -25,7 +25,6 @@
 #include "widgets/widgets-types.h"
 
 #include "base/tile-manager.h"
-#include "base/pixel-region.h"
 #include "base/tile-cache.h"
 
 #include "gegl/gimptilebackendtilemanager.h"
@@ -55,7 +54,6 @@ basic_usage (void)
   guint16        opaque_magenta16[4] = { 0xffff, 0, 0xffff, 0xffff };
   GeglColor     *magenta             = gegl_color_new (NULL);
 
-  PixelRegion      pr;
   TileManager     *tm;
   GeglTileBackend *backend;
   GeglBuffer      *buffer;
@@ -64,12 +62,12 @@ basic_usage (void)
 
   /* Write some pixels to the tile manager */
   tm = tile_manager_new (rect.width, rect.height, 4);
-  pixel_region_init (&pr, tm, rect.x, rect.y, rect.width, rect.height, TRUE);
 
   buffer = gimp_tile_manager_create_buffer (tm, format);
   gegl_color_set_rgba (magenta, 1.0, 0.0, 1.0, 1.0);
   gegl_buffer_set_color (buffer, NULL, magenta);
   g_object_unref (magenta);
+  g_object_unref (buffer);
 
   /* Make sure we can read them through the GeglBuffer using the
    * TileManager backend. Use u16 to complicate code paths, decreasing
diff --git a/app/tests/test-xcf.c b/app/tests/test-xcf.c
index bc00b70..0ec9dd6 100644
--- a/app/tests/test-xcf.c
+++ b/app/tests/test-xcf.c
@@ -62,7 +62,7 @@
 #define GIMP_MAINIMAGE_WIDTH            100
 #define GIMP_MAINIMAGE_HEIGHT           90
 #define GIMP_MAINIMAGE_TYPE             GIMP_RGB
-#define GIMP_MAINIMAGE_PRECISION        GIMP_PRECISION_FLOAT
+#define GIMP_MAINIMAGE_PRECISION        GIMP_PRECISION_U8
 
 #define GIMP_MAINIMAGE_LAYER1_NAME      "layer1"
 #define GIMP_MAINIMAGE_LAYER1_WIDTH     50



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