[glib] glib/tests/option-context: remove unused tests



commit a8f516f61e42de970c78a2905a309a7c17eb02c2
Author: Dan Winship <danw gnome org>
Date:   Wed Feb 8 08:46:03 2012 -0500

    glib/tests/option-context: remove unused tests
    
    These tests were written, but then never used since it was decided to
    add g_warnings() to goption.c in the cases they were supposed to be
    testing. So anyway, just remove them.

 glib/tests/option-context.c |   68 -------------------------------------------
 1 files changed, 0 insertions(+), 68 deletions(-)
---
diff --git a/glib/tests/option-context.c b/glib/tests/option-context.c
index ba8fcf1..5b839d9 100644
--- a/glib/tests/option-context.c
+++ b/glib/tests/option-context.c
@@ -1057,74 +1057,6 @@ callback_test_optional_8 (void)
   g_option_context_free (context);
 }
 
-static void
-callback_test_optional_9 (void)
-{
-  GOptionContext *context;
-  gboolean retval;
-  GError *error = NULL;
-  gchar **argv;
-  gchar **argv_copy;
-  int argc;
-  gchar *string = NULL;
-  GOptionEntry entries [] =
-    { { "test", 't', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_STRING,
-                &string, NULL, NULL },
-      { NULL } };
-
-  context = g_option_context_new (NULL);
-  g_option_context_add_main_entries (context, entries, NULL);
-
-  /* Now try parsing */
-  argv = split_string ("program -t", &argc);
-  argv_copy = copy_stringv (argv, argc);
-
-  retval = g_option_context_parse (context, &argc, &argv, &error);
-  g_assert_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE);
-  g_assert (!retval);
-  g_assert (string == NULL);
-  check_identical_stringv (argv_copy, argv);
-
-  g_error_free (error);
-  g_strfreev (argv_copy);
-  g_free (argv);
-  g_option_context_free (context);
-}
-
-static void
-callback_test_optional_10 (void)
-{
-  GOptionContext *context;
-  gboolean retval;
-  GError *error = NULL;
-  gchar **argv;
-  gchar **argv_copy;
-  int argc;
-  gchar *string = NULL;
-  GOptionEntry entries [] =
-    { { "test", 't', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_STRING,
-                &string, NULL, NULL },
-      { NULL } };
-
-  context = g_option_context_new (NULL);
-  g_option_context_add_main_entries (context, entries, NULL);
-
-  /* Now try parsing */
-  argv = split_string ("program --test", &argc);
-  argv_copy = copy_stringv (argv, argc);
-
-  retval = g_option_context_parse (context, &argc, &argv, &error);
-  g_assert_error (error, G_OPTION_ERROR, G_OPTION_ERROR_BAD_VALUE);
-  g_assert (!retval);
-  g_assert (string == NULL);
-  check_identical_stringv (argv_copy, argv);
-
-  g_error_free (error);
-  g_strfreev (argv_copy);
-  g_free (argv);
-  g_option_context_free (context);
-}
-
 static GPtrArray *callback_remaining_args;
 static gboolean
 callback_remaining_test1_callback (const gchar *option_name, const gchar *value,



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