diff options
author | Benjamin Otte <otte@redhat.com> | 2017-11-03 23:18:56 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2017-11-04 00:07:13 +0100 |
commit | e2996732b9ede9a0fb9e43e1ef2d468efd0021ae (patch) | |
tree | 453974d316b7b6f4c52190419328f1f58c966227 /testsuite/gdk | |
parent | 4e7a0567772a96ef8adea7d5cebef693b38d7824 (diff) | |
download | gtk+-e2996732b9ede9a0fb9e43e1ef2d468efd0021ae.tar.gz |
testsuite: Remove cursor tests
Cursors always exist now, it does not make sense to test that their
creation fails anymore.
Diffstat (limited to 'testsuite/gdk')
-rw-r--r-- | testsuite/gdk/cursor.c | 92 | ||||
-rw-r--r-- | testsuite/gdk/meson.build | 1 |
2 files changed, 0 insertions, 93 deletions
diff --git a/testsuite/gdk/cursor.c b/testsuite/gdk/cursor.c deleted file mode 100644 index ec2997a600..0000000000 --- a/testsuite/gdk/cursor.c +++ /dev/null @@ -1,92 +0,0 @@ -#include <gtk/gtk.h> - -static char *cursor_names[] = { - "none", - "default", - "help", - "pointer", - "context-menu", - "progress", - "wait", - "cell", - "crosshair", - "text", - "vertical-text", - "alias", - "copy", - "no-drop", - "move", - "not-allowed", - "grab", - "grabbing", - "all-scroll", - "col-resize", - "row-resize", - "n-resize", - "e-resize", - "s-resize", - "w-resize", - "ne-resize", - "nw-resize", - "sw-resize", - "se-resize", - "ew-resize", - "ns-resize", - "nesw-resize", - "nwse-resize", - "zoom-in", - "zoom-out", - "dnd-ask", -}; - -static void -test_cursor_existence (gconstpointer name) -{ - GdkDisplay *display; - GdkCursor *cursor; - - display = gdk_display_get_default (); - cursor = gdk_cursor_new_from_name (display, name); - g_assert (cursor != NULL); - g_object_unref (cursor); -} - -static void -test_cursor_nonexistence_subprocess (void) -{ - GdkDisplay *display; - GdkCursor *cursor; - - display = gdk_display_get_default (); - cursor = gdk_cursor_new_from_name (display, "non-existing-cursor"); - g_assert (cursor == NULL); -} - -static void -test_cursor_nonexistence (void) -{ - g_test_trap_subprocess ("/non-existing-cursors/subprocess/non-existing-cursor", 0, 0); - g_test_trap_assert_passed (); -} - -int -main (int argc, char *argv[]) -{ - guint i; - char *test_name; - - g_test_init (&argc, &argv, NULL); - gtk_init (); - - for (i = 0; i < G_N_ELEMENTS (cursor_names); i++) - { - test_name = g_strdup_printf ("/standard-cursor-names/%s", cursor_names[i]); - g_test_add_data_func (test_name, cursor_names[i], test_cursor_existence); - g_free (test_name); - } - - g_test_add_func ("/non-existing-cursors/subprocess/non-existing-cursor", test_cursor_nonexistence_subprocess); - g_test_add_func ("/non-existing-cursors/non-existing-cursor", test_cursor_nonexistence); - - return g_test_run(); -} diff --git a/testsuite/gdk/meson.build b/testsuite/gdk/meson.build index df60341f85..227107b6bd 100644 --- a/testsuite/gdk/meson.build +++ b/testsuite/gdk/meson.build @@ -3,7 +3,6 @@ testdatadir = join_paths(installed_test_datadir, 'gdk') tests = [ 'cairo', - 'cursor', 'display', 'encoding', 'keysyms', |