4 test_slice_config (void)
6 if (g_test_trap_fork (1000000, G_TEST_TRAP_SILENCE_STDERR))
7 g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE);
9 g_test_trap_assert_failed ();
13 main (int argc, char **argv)
15 /* have to do this before using gtester since it uses gslice */
18 was = g_slice_get_config (G_SLICE_CONFIG_ALWAYS_MALLOC);
19 g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, !was);
20 g_assert_cmpint (g_slice_get_config (G_SLICE_CONFIG_ALWAYS_MALLOC), !=, was);
21 g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, was);
23 g_test_init (&argc, &argv, NULL);
25 g_test_add_func ("/slice/config", test_slice_config);