Commit 3f6a3e74 authored by Martin Nordholts's avatar Martin Nordholts

app/tests: cleanup

parent 0af34013
......@@ -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) \
......
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment