[gimp/goat-invasion] app: make the tests build again



commit ddc589606204d9363193bb08c4ad150613691dc5
Author: Michael Natterer <mitch gimp org>
Date:   Wed Apr 11 01:33:26 2012 +0200

    app: make the tests build again

 app/tests/Makefile.am                       |    3 ++-
 app/tests/test-core.c                       |    6 +++---
 app/tests/test-gimptilebackendtilemanager.c |    4 ++--
 app/tests/test-xcf.c                        |   22 +++++++++++-----------
 4 files changed, 18 insertions(+), 17 deletions(-)
---
diff --git a/app/tests/Makefile.am b/app/tests/Makefile.am
index b9e1937..f35fb8d 100644
--- a/app/tests/Makefile.am
+++ b/app/tests/Makefile.am
@@ -78,7 +78,8 @@ AM_LDFLAGS = \
 	-u $(SYMPREFIX)gimp_error_dialog_new		\
 	-u $(SYMPREFIX)menus_save			\
 	-u $(SYMPREFIX)gimp_tools_save			\
-	-u $(SYMPREFIX)gimp_curve_map_pixels
+	-u $(SYMPREFIX)gimp_curve_map_pixels		\
+	-u $(SYMPREFIX)gimp_param_spec_duplicate
 
 # Note that we have some duplicate entries here too to work around
 # circular dependencies and systems on the same architectural layer as
diff --git a/app/tests/test-core.c b/app/tests/test-core.c
index dc94336..659c996 100644
--- a/app/tests/test-core.c
+++ b/app/tests/test-core.c
@@ -120,7 +120,7 @@ rotate_non_overlapping (GimpTestFixture *fixture,
   layer = gimp_layer_new (image,
                           GIMP_TEST_IMAGE_SIZE,
                           GIMP_TEST_IMAGE_SIZE,
-                          GIMP_RGBA_IMAGE,
+                          babl_format ("R'G'B'A u8"),
                           "Test Layer",
                           1.0,
                           GIMP_NORMAL_MODE);
@@ -160,7 +160,7 @@ add_layer (GimpTestFixture *fixture,
   layer = gimp_layer_new (image,
                           GIMP_TEST_IMAGE_SIZE,
                           GIMP_TEST_IMAGE_SIZE,
-                          GIMP_RGBA_IMAGE,
+                          babl_format ("R'G'B'A u8"),
                           "Test Layer",
                           1.0,
                           GIMP_NORMAL_MODE);
@@ -197,7 +197,7 @@ remove_layer (GimpTestFixture *fixture,
   layer = gimp_layer_new (image,
                           GIMP_TEST_IMAGE_SIZE,
                           GIMP_TEST_IMAGE_SIZE,
-                          GIMP_RGBA_IMAGE,
+                          babl_format ("R'G'B'A u8"),
                           "Test Layer",
                           1.0,
                           GIMP_NORMAL_MODE);
diff --git a/app/tests/test-gimptilebackendtilemanager.c b/app/tests/test-gimptilebackendtilemanager.c
index 8e29891..edabfe7 100644
--- a/app/tests/test-gimptilebackendtilemanager.c
+++ b/app/tests/test-gimptilebackendtilemanager.c
@@ -66,7 +66,7 @@ basic_usage (void)
   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, 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);
@@ -75,7 +75,7 @@ basic_usage (void)
    * TileManager backend. Use u16 to complicate code paths, decreasing
    * risk of the test accidentally passing
    */
-  backend = gimp_tile_backend_tile_manager_new (tm, format, FALSE);
+  backend = gimp_tile_backend_tile_manager_new (tm, format);
   buffer  = gegl_buffer_new_for_backend (NULL, backend);
   gegl_buffer_get (buffer,
                    &pixel_rect, 1.0 /*scale*/,
diff --git a/app/tests/test-xcf.c b/app/tests/test-xcf.c
index feed55f..22e2eaf 100644
--- a/app/tests/test-xcf.c
+++ b/app/tests/test-xcf.c
@@ -66,14 +66,14 @@
 #define GIMP_MAINIMAGE_LAYER1_NAME      "layer1"
 #define GIMP_MAINIMAGE_LAYER1_WIDTH     50
 #define GIMP_MAINIMAGE_LAYER1_HEIGHT    51
-#define GIMP_MAINIMAGE_LAYER1_TYPE      GIMP_RGBA_IMAGE
+#define GIMP_MAINIMAGE_LAYER1_FORMAT    babl_format ("R'G'B'A u8")
 #define GIMP_MAINIMAGE_LAYER1_OPACITY   1.0
 #define GIMP_MAINIMAGE_LAYER1_MODE      GIMP_NORMAL_MODE
 
 #define GIMP_MAINIMAGE_LAYER2_NAME      "layer2"
 #define GIMP_MAINIMAGE_LAYER2_WIDTH     25
 #define GIMP_MAINIMAGE_LAYER2_HEIGHT    251
-#define GIMP_MAINIMAGE_LAYER2_TYPE      GIMP_RGB_IMAGE
+#define GIMP_MAINIMAGE_LAYER2_FORMAT    babl_format ("R'G'B' u8")
 #define GIMP_MAINIMAGE_LAYER2_OPACITY   0.0
 #define GIMP_MAINIMAGE_LAYER2_MODE      GIMP_MULTIPLY_MODE
 
@@ -368,7 +368,7 @@ gimp_create_mainimage (Gimp     *gimp,
   layer = gimp_layer_new (image,
                           GIMP_MAINIMAGE_LAYER1_WIDTH,
                           GIMP_MAINIMAGE_LAYER1_HEIGHT,
-                          GIMP_MAINIMAGE_LAYER1_TYPE,
+                          GIMP_MAINIMAGE_LAYER1_FORMAT,
                           GIMP_MAINIMAGE_LAYER1_NAME,
                           GIMP_MAINIMAGE_LAYER1_OPACITY,
                           GIMP_MAINIMAGE_LAYER1_MODE);
@@ -380,7 +380,7 @@ gimp_create_mainimage (Gimp     *gimp,
   layer = gimp_layer_new (image,
                           GIMP_MAINIMAGE_LAYER2_WIDTH,
                           GIMP_MAINIMAGE_LAYER2_HEIGHT,
-                          GIMP_MAINIMAGE_LAYER2_TYPE,
+                          GIMP_MAINIMAGE_LAYER2_FORMAT,
                           GIMP_MAINIMAGE_LAYER2_NAME,
                           GIMP_MAINIMAGE_LAYER2_OPACITY,
                           GIMP_MAINIMAGE_LAYER2_MODE);
@@ -580,7 +580,7 @@ gimp_create_mainimage (Gimp     *gimp,
       layer = gimp_layer_new (image,
                               GIMP_MAINIMAGE_LAYER1_WIDTH,
                               GIMP_MAINIMAGE_LAYER1_HEIGHT,
-                              GIMP_MAINIMAGE_LAYER1_TYPE,
+                              GIMP_MAINIMAGE_LAYER1_FORMAT,
                               GIMP_MAINIMAGE_LAYER3_NAME,
                               GIMP_MAINIMAGE_LAYER1_OPACITY,
                               GIMP_MAINIMAGE_LAYER1_MODE);
@@ -594,7 +594,7 @@ gimp_create_mainimage (Gimp     *gimp,
       layer = gimp_layer_new (image,
                               GIMP_MAINIMAGE_LAYER1_WIDTH,
                               GIMP_MAINIMAGE_LAYER1_HEIGHT,
-                              GIMP_MAINIMAGE_LAYER1_TYPE,
+                              GIMP_MAINIMAGE_LAYER1_FORMAT,
                               GIMP_MAINIMAGE_LAYER4_NAME,
                               GIMP_MAINIMAGE_LAYER1_OPACITY,
                               GIMP_MAINIMAGE_LAYER1_MODE);
@@ -618,7 +618,7 @@ gimp_create_mainimage (Gimp     *gimp,
       layer = gimp_layer_new (image,
                               GIMP_MAINIMAGE_LAYER1_WIDTH,
                               GIMP_MAINIMAGE_LAYER1_HEIGHT,
-                              GIMP_MAINIMAGE_LAYER1_TYPE,
+                              GIMP_MAINIMAGE_LAYER1_FORMAT,
                               GIMP_MAINIMAGE_LAYER5_NAME,
                               GIMP_MAINIMAGE_LAYER1_OPACITY,
                               GIMP_MAINIMAGE_LAYER1_MODE);
@@ -738,9 +738,9 @@ gimp_assert_mainimage (GimpImage *image,
   g_assert_cmpint (gimp_item_get_height (GIMP_ITEM (layer)),
                    ==,
                    GIMP_MAINIMAGE_LAYER1_HEIGHT);
-  g_assert_cmpint (gimp_drawable_type (GIMP_DRAWABLE (layer)),
+  g_assert_cmpstr (babl_get_name (gimp_drawable_get_format (GIMP_DRAWABLE (layer))),
                    ==,
-                   GIMP_MAINIMAGE_LAYER1_TYPE);
+                   babl_get_name (GIMP_MAINIMAGE_LAYER1_FORMAT));
   g_assert_cmpstr (gimp_object_get_name (GIMP_DRAWABLE (layer)),
                    ==,
                    GIMP_MAINIMAGE_LAYER1_NAME);
@@ -758,9 +758,9 @@ gimp_assert_mainimage (GimpImage *image,
   g_assert_cmpint (gimp_item_get_height (GIMP_ITEM (layer)),
                    ==,
                    GIMP_MAINIMAGE_LAYER2_HEIGHT);
-  g_assert_cmpint (gimp_drawable_type (GIMP_DRAWABLE (layer)),
+  g_assert_cmpstr (babl_get_name (gimp_drawable_get_format (GIMP_DRAWABLE (layer))),
                    ==,
-                   GIMP_MAINIMAGE_LAYER2_TYPE);
+                   babl_get_name (GIMP_MAINIMAGE_LAYER2_FORMAT));
   g_assert_cmpstr (gimp_object_get_name (GIMP_DRAWABLE (layer)),
                    ==,
                    GIMP_MAINIMAGE_LAYER2_NAME);



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