diff options
Diffstat (limited to 'glib/tests/slice.c')
-rw-r--r-- | glib/tests/slice.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/glib/tests/slice.c b/glib/tests/slice.c index a566280db..fda15966c 100644 --- a/glib/tests/slice.c +++ b/glib/tests/slice.c @@ -4,66 +4,6 @@ /* We test deprecated functionality here */ G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#ifdef G_ENABLE_DEBUG -static void -test_slice_nodebug (void) -{ - const gchar *oldval; - - oldval = g_getenv ("G_SLICE"); - g_unsetenv ("G_SLICE"); - - if (g_test_subprocess ()) - { - gpointer p, q; - - p = g_slice_alloc (237); - q = g_slice_alloc (259); - g_slice_free1 (237, p); - g_slice_free1 (259, q); - - g_slice_debug_tree_statistics (); - return; - } - g_test_trap_subprocess (NULL, 1000000, 0); - g_test_trap_assert_passed (); - g_test_trap_assert_stderr ("*GSlice: MemChecker: root=NULL*"); - - if (oldval) - g_setenv ("G_SLICE", oldval, TRUE); -} - -static void -test_slice_debug (void) -{ - const gchar *oldval; - - oldval = g_getenv ("G_SLICE"); - g_setenv ("G_SLICE", "debug-blocks:always-malloc", TRUE); - - if (g_test_subprocess ()) - { - gpointer p, q; - - p = g_slice_alloc (237); - q = g_slice_alloc (259); - g_slice_free1 (237, p); - g_slice_free1 (259, q); - - g_slice_debug_tree_statistics (); - return; - } - g_test_trap_subprocess (NULL, 1000000, 0); - g_test_trap_assert_passed (); - g_test_trap_assert_stderr ("*GSlice: MemChecker: * trunks, * branches, * old branches*"); - - if (oldval) - g_setenv ("G_SLICE", oldval, TRUE); - else - g_unsetenv ("G_SLICE"); -} -#endif - static void test_slice_copy (void) { @@ -155,10 +95,6 @@ main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); -#ifdef G_ENABLE_DEBUG - g_test_add_func ("/slice/nodebug", test_slice_nodebug); - g_test_add_func ("/slice/debug", test_slice_debug); -#endif g_test_add_func ("/slice/copy", test_slice_copy); g_test_add_func ("/slice/chain", test_chain); g_test_add_func ("/slice/allocate", test_allocate); |