Mark some functions 'static' in glib/tests
[platform/upstream/glib.git] / glib / tests / slice.c
1 #include <glib.h>
2
3 static void
4 test_slice_config (void)
5 {
6   if (g_test_trap_fork (1000000, G_TEST_TRAP_SILENCE_STDERR))
7     g_slice_set_config (G_SLICE_CONFIG_ALWAYS_MALLOC, TRUE);
8
9   g_test_trap_assert_failed ();
10 }
11
12 int
13 main (int argc, char **argv)
14 {
15   /* have to do this before using gtester since it uses gslice */
16   gboolean was;
17
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);
22
23   g_test_init (&argc, &argv, NULL);
24
25   g_test_add_func ("/slice/config", test_slice_config);
26
27   return g_test_run ();
28 }