3 /* We test deprecated functionality here */
4 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
7 test_slice_config_subprocess (void)
9 g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE);
13 test_slice_config (void)
15 g_test_trap_subprocess ("/slice/config/subprocess", 1000000, 0);
16 g_test_trap_assert_failed ();
20 main (int argc, char **argv)
22 /* have to do this before using gtester since it uses gslice */
25 was = g_slice_get_config (G_SLICE_CONFIG_ALWAYS_MALLOC);
26 g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, !was);
27 g_assert_cmpint (g_slice_get_config (G_SLICE_CONFIG_ALWAYS_MALLOC), !=, was);
28 g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, was);
30 g_test_init (&argc, &argv, NULL);
32 g_test_add_func ("/slice/config", test_slice_config);
33 g_test_add_func ("/slice/config/subprocess", test_slice_config_subprocess);