glib/tests: Fix non-debug build of slice test

In addition to e013cf9cad
This commit is contained in:
Rico Tzschichholz 2014-01-04 22:04:20 +01:00 committed by Matthias Clasen
parent 33f81cc509
commit b3253fe025

View File

@ -16,6 +16,7 @@ test_slice_config (void)
g_test_trap_assert_failed (); g_test_trap_assert_failed ();
} }
#ifdef G_ENABLE_DEBUG
static void static void
test_slice_nodebug (void) test_slice_nodebug (void)
{ {
@ -73,6 +74,7 @@ test_slice_debug (void)
else else
g_unsetenv ("G_SLICE"); g_unsetenv ("G_SLICE");
} }
#endif
static void static void
test_slice_copy (void) test_slice_copy (void)
@ -174,8 +176,10 @@ main (int argc, char **argv)
g_test_init (&argc, &argv, NULL); g_test_init (&argc, &argv, NULL);
g_test_add_func ("/slice/config", test_slice_config); 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/nodebug", test_slice_nodebug);
g_test_add_func ("/slice/debug", test_slice_debug); g_test_add_func ("/slice/debug", test_slice_debug);
#endif
g_test_add_func ("/slice/copy", test_slice_copy); g_test_add_func ("/slice/copy", test_slice_copy);
g_test_add_func ("/slice/chain", test_chain); g_test_add_func ("/slice/chain", test_chain);
g_test_add_func ("/slice/allocate", test_allocate); g_test_add_func ("/slice/allocate", test_allocate);