From 26e29cb360e81e4530c218a6ddea339759f078bd Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 3 Jul 2010 13:43:25 -0400 Subject: [PATCH] Move charset conversion tests to the test framework --- glib/tests/Makefile.am | 23 +++++++++++--------- tests/convert-test.c => glib/tests/convert.c | 12 +++++----- tests/Makefile.am | 2 -- 3 files changed, 20 insertions(+), 17 deletions(-) rename tests/convert-test.c => glib/tests/convert.c (98%) diff --git a/glib/tests/Makefile.am b/glib/tests/Makefile.am index 7b9b8692a..b66816602 100644 --- a/glib/tests/Makefile.am +++ b/glib/tests/Makefile.am @@ -64,37 +64,40 @@ TEST_PROGS += regex regex_LDADD = $(progs_ldadd) TEST_PROGS += base64 -base64_LDADD = $(progs_ldadd) +base64_LDADD = $(progs_ldadd) TEST_PROGS += sequence -sequence_LDADD = $(progs_ldadd) +sequence_LDADD = $(progs_ldadd) TEST_PROGS += scannerapi -scannerapi_LDADD = $(progs_ldadd) +scannerapi_LDADD = $(progs_ldadd) TEST_PROGS += collate collate_LDADD = $(progs_ldadd) TEST_PROGS += utf8-pointer -utf8_pointer_LDADD = $(progs_ldadd) +utf8_pointer_LDADD = $(progs_ldadd) TEST_PROGS += utf8-validate -utf8_validate_LDADD = $(progs_ldadd) +utf8_validate_LDADD = $(progs_ldadd) TEST_PROGS += utf8-misc -utf8_misc_LDADD = $(progs_ldadd) +utf8_misc_LDADD = $(progs_ldadd) TEST_PROGS += checksum -checksum_LDADD = $(progs_ldadd) +checksum_LDADD = $(progs_ldadd) TEST_PROGS += hash -hash_LDADD = $(progs_ldadd) +hash_LDADD = $(progs_ldadd) TEST_PROGS += date -date_LDADD = $(progs_ldadd) +date_LDADD = $(progs_ldadd) TEST_PROGS += node -node_LDADD = $(progs_ldadd) +node_LDADD = $(progs_ldadd) + +TEST_PROGS += convert +convert_LDADD = $(progs_ldadd) if OS_UNIX diff --git a/tests/convert-test.c b/glib/tests/convert.c similarity index 98% rename from tests/convert-test.c rename to glib/tests/convert.c index 10b8c0003..faa317e47 100644 --- a/tests/convert-test.c +++ b/glib/tests/convert.c @@ -653,10 +653,12 @@ test_unicode_conversions (void) int main (int argc, char *argv[]) { - test_iconv_state (); - test_one_half (); - test_byte_order (); - test_unicode_conversions (); + g_test_init (&argc, &argv, NULL); - return 0; + g_test_add_func ("/conversion/iconv-state", test_iconv_state); + g_test_add_func ("/conversion/illegal-sequence", test_one_half); + g_test_add_func ("/conversion/byte-order", test_byte_order); + g_test_add_func ("/conversion/unicode", test_unicode_conversions); + + return g_test_run (); } diff --git a/tests/Makefile.am b/tests/Makefile.am index f78e9d514..2e623c260 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -89,7 +89,6 @@ test_programs = \ $(CXX_TEST) \ child-test \ completion-test \ - convert-test \ dirname-test \ file-test \ env-test \ @@ -144,7 +143,6 @@ bit_test_LDADD = $(progs_ldadd) bookmarkfile_test_LDADD = $(progs_ldadd) child_test_LDADD = $(thread_ldadd) completion_test_LDADD = $(progs_ldadd) -convert_test_LDADD = $(progs_ldadd) date_test_LDADD = $(progs_ldadd) dirname_test_LDADD = $(progs_ldadd) file_test_LDADD = $(progs_ldadd)