[glib] Drop g_slice_set_config tests



commit 59df5440f3805db3e1d00b86d91a76dcb50412e4
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Sep 11 22:48:05 2015 -0400

    Drop g_slice_set_config tests
    
    With g_quark_init, we are now calling GSlice from a constructor
    (this was already the case when linking against gobject).

 glib/tests/slice.c |   21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)
---
diff --git a/glib/tests/slice.c b/glib/tests/slice.c
index 4777224..b0ad3da 100644
--- a/glib/tests/slice.c
+++ b/glib/tests/slice.c
@@ -4,18 +4,6 @@
 /* We test deprecated functionality here */
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 
-static void
-test_slice_config (void)
-{
-  if (g_test_subprocess ())
-    {
-      g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE);
-      return;
-    }
-  g_test_trap_subprocess (NULL, 1000000, 0);
-  g_test_trap_assert_failed ();
-}
-
 #ifdef G_ENABLE_DEBUG
 static void
 test_slice_nodebug (void)
@@ -165,17 +153,8 @@ test_allocate (void)
 int
 main (int argc, char **argv)
 {
-  /* have to do this before using gtester since it uses gslice */
-  gboolean was;
-
-  was = g_slice_get_config (G_SLICE_CONFIG_ALWAYS_MALLOC);
-  g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, !was);
-  g_assert_cmpint (g_slice_get_config (G_SLICE_CONFIG_ALWAYS_MALLOC), !=, was);
-  g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, was);
-
   g_test_init (&argc, &argv, NULL);
 
-  g_test_add_func ("/slice/config", test_slice_config);
 #ifdef G_ENABLE_DEBUG
   g_test_add_func ("/slice/nodebug", test_slice_nodebug);
   g_test_add_func ("/slice/debug", test_slice_debug);


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