diff --git a/glib/tests/utf8-performance.c b/glib/tests/utf8-performance.c index 03b1442d5..fa1e2c2bd 100644 --- a/glib/tests/utf8-performance.c +++ b/glib/tests/utf8-performance.c @@ -184,19 +184,17 @@ int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); - g_test_add_data_func ("/utf8/perf/get_char", - grind_get_char, perform); - g_test_add_data_func ("/utf8/perf/get_char-backwards", - grind_get_char_backwards, perform); - g_test_add_data_func ("/utf8/perf/get_char_validated", - grind_get_char_validated, perform); - g_test_add_data_func ("/utf8/perf/utf8_to_ucs4", - grind_utf8_to_ucs4, perform); - g_test_add_data_func ("/utf8/perf/utf8_to_ucs4-sized", - grind_utf8_to_ucs4_sized, perform); - g_test_add_data_func ("/utf8/perf/utf8_to_ucs4_fast", - grind_utf8_to_ucs4_fast, perform); - g_test_add_data_func ("/utf8/perf/utf8_to_ucs4_fast-sized", - grind_utf8_to_ucs4_fast_sized, perform); + + if (g_test_perf ()) + { + g_test_add_data_func ("/utf8/perf/get_char", grind_get_char, perform); + g_test_add_data_func ("/utf8/perf/get_char-backwards", grind_get_char_backwards, perform); + g_test_add_data_func ("/utf8/perf/get_char_validated", grind_get_char_validated, perform); + g_test_add_data_func ("/utf8/perf/utf8_to_ucs4", grind_utf8_to_ucs4, perform); + g_test_add_data_func ("/utf8/perf/utf8_to_ucs4-sized", grind_utf8_to_ucs4_sized, perform); + g_test_add_data_func ("/utf8/perf/utf8_to_ucs4_fast", grind_utf8_to_ucs4_fast, perform); + g_test_add_data_func ("/utf8/perf/utf8_to_ucs4_fast-sized", grind_utf8_to_ucs4_fast_sized, perform); + } + return g_test_run (); }