diff options
author | Xan Lopez <xan@src.gnome.org> | 2008-12-31 06:33:08 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2008-12-31 06:33:08 +0800 |
commit | ddb6a105bb5a0de256ed8fbe676673cd74b3a551 (patch) | |
tree | d5061ecfb4b094df02e3eb0a902c78d80785d451 /tests | |
parent | 6191d0ea18b36b108d64edcae7652aa3ec805482 (diff) | |
download | gsoc2013-epiphany-ddb6a105bb5a0de256ed8fbe676673cd74b3a551.tar gsoc2013-epiphany-ddb6a105bb5a0de256ed8fbe676673cd74b3a551.tar.gz gsoc2013-epiphany-ddb6a105bb5a0de256ed8fbe676673cd74b3a551.tar.bz2 gsoc2013-epiphany-ddb6a105bb5a0de256ed8fbe676673cd74b3a551.tar.lz gsoc2013-epiphany-ddb6a105bb5a0de256ed8fbe676673cd74b3a551.tar.xz gsoc2013-epiphany-ddb6a105bb5a0de256ed8fbe676673cd74b3a551.tar.zst gsoc2013-epiphany-ddb6a105bb5a0de256ed8fbe676673cd74b3a551.zip |
Delete EphyIconEntry, it's unused.
svn path=/trunk/; revision=8655
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 7 | ||||
-rw-r--r-- | tests/testephyiconentry.c | 117 |
2 files changed, 0 insertions, 124 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index ad2a9f949..7302f6e80 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,6 @@ noinst_PROGRAMS = \ testephysearchentry \ testephylocationentry \ - testephyiconentry \ testephyzoomcontrol INCLUDES = \ @@ -21,12 +20,6 @@ testephysearchentry_LDADD = \ $(top_builddir)/lib/widgets/libephywidgets.la \ $(DEPENDENCIES_LIBS) -testephyiconentry_SOURCES = \ - testephyiconentry.c -testephyiconentry_LDADD = \ - $(top_builddir)/lib/widgets/libephywidgets.la \ - $(DEPENDENCIES_LIBS) - testephylocationentry_SOURCES = \ testephylocationentry.c testephylocationentry_LDADD = \ diff --git a/tests/testephyiconentry.c b/tests/testephyiconentry.c deleted file mode 100644 index 8486f1554..000000000 --- a/tests/testephyiconentry.c +++ /dev/null @@ -1,117 +0,0 @@ -/* vim: set sw=2 ts=2 sts=2 et: */ -/* - * testephyiconentry.c - * This file is part of Epiphany - * - * Copyright (C) 2008 - Diego Escalante Urrelo - * - * Epiphany is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Epiphany is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Epiphany; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, - * Boston, MA 02110-1301 USA - */ - -#include "config.h" -#include "ephy-icon-entry.h" -#include <gtk/gtk.h> - -static void -test_entry_new (void) -{ - GtkWidget *entry; - - entry = ephy_icon_entry_new (); - - g_assert (GTK_IS_WIDGET (entry)); - g_assert (EPHY_IS_ICON_ENTRY (entry)); -} - -static void -test_entry_pack_widget (void) -{ - GtkWidget *entry; - - GtkWidget *first; - GtkWidget *last; - - GList *hbox = NULL; - GList *list = NULL; - GList *l = NULL; - - entry = ephy_icon_entry_new (); - - first = gtk_button_new (); - last = gtk_entry_new (); - - /* Add a widget to the start */ - ephy_icon_entry_pack_widget (EPHY_ICON_ENTRY (entry), first, TRUE); - /* Add a widget to the end */ - ephy_icon_entry_pack_widget (EPHY_ICON_ENTRY (entry), last, FALSE); - - /* The first children is an hbox */ - hbox = gtk_container_get_children (GTK_CONTAINER (entry)); - list = gtk_container_get_children (GTK_CONTAINER (hbox->data)); - g_list_free (hbox); - - g_assert (list); - - /* Remember inside the hbox there's a GtkEntry + our widgets */ - g_assert_cmpuint (g_list_length (list), ==, 3); - - /* Get the first one */ - l = g_list_nth (list, 0); - g_assert (l); - g_assert (GTK_IS_BUTTON (l->data)); - - /* Get the last one */ - l = g_list_nth (list, 2); - g_assert (l); - g_assert (GTK_IS_ENTRY (l->data)); - - g_list_free (list); - g_list_free (l); -} - -static void -test_entry_get_entry (void) -{ - GtkWidget *internal; - - GtkWidget *entry; - - entry = ephy_icon_entry_new (); - internal = ephy_icon_entry_get_entry (EPHY_ICON_ENTRY (entry)); - - g_assert (GTK_IS_ENTRY (internal)); -} - -int -main (int argc, char *argv[]) -{ - gtk_test_init (&argc, &argv); - - g_test_add_func ( - "/lib/widgets/ephy-icon-entry/new", - test_entry_new); - /* FIXME: If we invert this two add_funcs, it will NOT segfault, weird! - * memory leak anyone? - */ - g_test_add_func ( - "/lib/widgets/ephy-icon-entry/pack_widget", - test_entry_pack_widget); - g_test_add_func ( - "/lib/widgets/ephy-icon-entry/get_entry", - test_entry_get_entry); - - return g_test_run (); -} |