[gimp] app/tests: cleanup



commit 3f6a3e749c8070b712aeb12b6b7ff69271b652c3
Author: Martin Nordholts <martinn src gnome org>
Date:   Mon Jun 14 21:58:52 2010 +0200

    app/tests: cleanup

 app/tests/test-ui.c                |    2 -
 app/tests/test-window-management.c |   64 +++++++++++++++++-------------------
 2 files changed, 30 insertions(+), 36 deletions(-)
---
diff --git a/app/tests/test-ui.c b/app/tests/test-ui.c
index 7a20c0c..85902ef 100644
--- a/app/tests/test-ui.c
+++ b/app/tests/test-ui.c
@@ -53,8 +53,6 @@
 
 
 #define GIMP_UI_WINDOW_POSITION_EPSILON 10
-#define GIMP_UI_WINDOW_POSITION_EPSILON 10
-#define GIMP_UI_POSITION_EPSILON        1
 #define GIMP_UI_POSITION_EPSILON        1
 
 #define ADD_TEST(function) \
diff --git a/app/tests/test-window-management.c b/app/tests/test-window-management.c
index 7cbe4dc..3d7ed79 100644
--- a/app/tests/test-window-management.c
+++ b/app/tests/test-window-management.c
@@ -48,43 +48,9 @@ typedef struct
 } GimpTestFixture;
 
 
-static void window_roles   (GimpTestFixture *fixture,
-                                      gconstpointer    data);
-
-
 static Gimp *gimp = NULL;
 
 
-int main(int argc, char **argv)
-{
-  int test_result;
-
-  g_type_init ();
-  gtk_init (&argc, &argv);
-  g_test_init (&argc, &argv, NULL);
-
-  gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
-                                       "app/tests/gimpdir-empty");
-
-  /* We share the same application instance across all tests */
-  gimp = gimp_init_for_gui_testing (FALSE, FALSE);
-
-  /* Add tests */
-  ADD_TEST (window_roles);
-
-  /* Run the tests and return status */
-  test_result = g_test_run ();
-
-  /* Don't write files to the source dir */
-  gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
-                                       "app/tests/gimpdir-output");
-
-  /* Exit somewhat properly to avoid annoying warnings */
-  gimp_exit (gimp, TRUE);
-
-  return test_result;
-}
-
 /**
  * window_roles:
  * @fixture:
@@ -122,3 +88,33 @@ window_roles (GimpTestFixture *fixture,
   g_object_unref (dock);
    */
 }
+
+int main(int argc, char **argv)
+{
+  int test_result;
+
+  g_type_init ();
+  gtk_init (&argc, &argv);
+  g_test_init (&argc, &argv, NULL);
+
+  gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
+                                       "app/tests/gimpdir-empty");
+
+  /* We share the same application instance across all tests */
+  gimp = gimp_init_for_gui_testing (FALSE, FALSE);
+
+  /* Add tests */
+  ADD_TEST (window_roles);
+
+  /* Run the tests and return status */
+  test_result = g_test_run ();
+
+  /* Don't write files to the source dir */
+  gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
+                                       "app/tests/gimpdir-output");
+
+  /* Exit somewhat properly to avoid annoying warnings */
+  gimp_exit (gimp, TRUE);
+
+  return test_result;
+}



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