3 /* We test deprecated functionality here */
4 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
7 test_slice_config (void)
9 if (g_test_subprocess ())
11 g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE);
14 g_test_trap_subprocess (NULL, 1000000, 0);
15 g_test_trap_assert_failed ();
19 main (int argc, char **argv)
21 /* have to do this before using gtester since it uses gslice */
24 was = g_slice_get_config (G_SLICE_CONFIG_ALWAYS_MALLOC);
25 g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, !was);
26 g_assert_cmpint (g_slice_get_config (G_SLICE_CONFIG_ALWAYS_MALLOC), !=, was);
27 g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, was);
29 g_test_init (&argc, &argv, NULL);
31 g_test_add_func ("/slice/config", test_slice_config);