[glib] Mark utf8 performance tests as such



commit bea994199379f4e09091b030c46fd922b304d0d2
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 23 20:55:51 2012 -0400

    Mark utf8 performance tests as such

 glib/tests/utf8-performance.c |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)
---
diff --git a/glib/tests/utf8-performance.c b/glib/tests/utf8-performance.c
index 03b1442..fa1e2c2 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 ();
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]