Commit 63e61b0a authored by Ghislain MARY's avatar Ghislain MARY

Use macros to define the tests.

parent ca4a43a6
...@@ -118,7 +118,7 @@ else() ...@@ -118,7 +118,7 @@ else()
list(APPEND STRICT_OPTIONS_CXX "-stdlib=libc++") list(APPEND STRICT_OPTIONS_CXX "-stdlib=libc++")
endif() endif()
if(ENABLE_STRICT) if(ENABLE_STRICT)
list(APPEND STRICT_OPTIONS_CPP "-Werror" "-Wextra" "-Wno-unused-parameter" "-Wno-missing-field-initializers" "-fno-strict-aliasing") list(APPEND STRICT_OPTIONS_CPP "-Werror" "-Wextra" "-Wno-unused-parameter" "-fno-strict-aliasing")
endif() endif()
endif() endif()
if(STRICT_OPTIONS_CPP) if(STRICT_OPTIONS_CPP)
......
...@@ -32,7 +32,7 @@ AM_SILENT_RULES(yes) ...@@ -32,7 +32,7 @@ AM_SILENT_RULES(yes)
# Checks for programs. # Checks for programs.
AC_PROG_CXX AC_PROG_CXX
CXXFLAGS="$CXXFLAGS -std=c++11 -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers" CXXFLAGS="$CXXFLAGS -std=c++11 -Wall -Werror -Wextra -Wno-unused-parameter"
# Checks for libraries. # Checks for libraries.
dnl ################################################## dnl ##################################################
......
...@@ -27,7 +27,7 @@ static void adr_property(void) { ...@@ -27,7 +27,7 @@ static void adr_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "Adr", adr_property }, TEST_NO_TAG("Adr", adr_property),
}; };
test_suite_t vcard_addressing_properties_test_suite = { test_suite_t vcard_addressing_properties_test_suite = {
...@@ -38,4 +38,4 @@ test_suite_t vcard_addressing_properties_test_suite = { ...@@ -38,4 +38,4 @@ test_suite_t vcard_addressing_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -35,9 +35,9 @@ static void caluri_property(void) { ...@@ -35,9 +35,9 @@ static void caluri_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "FBURL", fburl_property }, TEST_NO_TAG("FBURL", fburl_property),
{ "CALADRURI", caladruri_property }, TEST_NO_TAG("CALADRURI", caladruri_property),
{ "CALURI", caluri_property }, TEST_NO_TAG("CALURI", caluri_property),
}; };
test_suite_t vcard_calendar_properties_test_suite = { test_suite_t vcard_calendar_properties_test_suite = {
...@@ -48,4 +48,4 @@ test_suite_t vcard_calendar_properties_test_suite = { ...@@ -48,4 +48,4 @@ test_suite_t vcard_calendar_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -42,10 +42,10 @@ static void lang_property(void) { ...@@ -42,10 +42,10 @@ static void lang_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "Tel", tel_property }, TEST_NO_TAG("Tel", tel_property),
{ "Email", email_property }, TEST_NO_TAG("Email", email_property),
{ "IMPP", impp_property }, TEST_NO_TAG("IMPP", impp_property),
{ "Language", lang_property }, TEST_NO_TAG("Language", lang_property),
}; };
test_suite_t vcard_communication_properties_test_suite = { test_suite_t vcard_communication_properties_test_suite = {
...@@ -56,4 +56,4 @@ test_suite_t vcard_communication_properties_test_suite = { ...@@ -56,4 +56,4 @@ test_suite_t vcard_communication_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -55,14 +55,14 @@ static void url_property(void) { ...@@ -55,14 +55,14 @@ static void url_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "CATEGORIES", categories_property }, TEST_NO_TAG("CATEGORIES", categories_property),
{ "NOTE", note_property }, TEST_NO_TAG("NOTE", note_property),
{ "PRODID", prodid_property }, TEST_NO_TAG("PRODID", prodid_property),
{ "REV", rev_property }, TEST_NO_TAG("REV", rev_property),
{ "SOUND", sound_property }, TEST_NO_TAG("SOUND", sound_property),
{ "UID", uid_property }, TEST_NO_TAG("UID", uid_property),
{ "CLIENTPIDMAP", clientpidmap_property }, TEST_NO_TAG("CLIENTPIDMAP", clientpidmap_property),
{ "URL", url_property }, TEST_NO_TAG("URL", url_property),
}; };
test_suite_t vcard_explanatory_properties_test_suite = { test_suite_t vcard_explanatory_properties_test_suite = {
...@@ -73,4 +73,4 @@ test_suite_t vcard_explanatory_properties_test_suite = { ...@@ -73,4 +73,4 @@ test_suite_t vcard_explanatory_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -36,9 +36,9 @@ static void xml_property(void) { ...@@ -36,9 +36,9 @@ static void xml_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "Kind", kind_property }, TEST_NO_TAG("Kind", kind_property),
{ "Source", source_property }, TEST_NO_TAG("Source", source_property),
{ "XML", xml_property }, TEST_NO_TAG("XML", xml_property),
}; };
test_suite_t vcard_general_properties_test_suite = { test_suite_t vcard_general_properties_test_suite = {
...@@ -49,4 +49,4 @@ test_suite_t vcard_general_properties_test_suite = { ...@@ -49,4 +49,4 @@ test_suite_t vcard_general_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -31,8 +31,8 @@ static void geo_property(void) { ...@@ -31,8 +31,8 @@ static void geo_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "TZ", tz_property }, TEST_NO_TAG("TZ", tz_property),
{ "Geo", geo_property }, TEST_NO_TAG("Geo", geo_property),
}; };
test_suite_t vcard_geographical_properties_test_suite = { test_suite_t vcard_geographical_properties_test_suite = {
...@@ -43,4 +43,4 @@ test_suite_t vcard_geographical_properties_test_suite = { ...@@ -43,4 +43,4 @@ test_suite_t vcard_geographical_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -55,13 +55,13 @@ static void photo_property(void) { ...@@ -55,13 +55,13 @@ static void photo_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "Full name", fn_property }, TEST_NO_TAG("Full name", fn_property),
{ "Name", n_property }, TEST_NO_TAG("Name", n_property),
{ "Nickname", nickname_property }, TEST_NO_TAG("Nickname", nickname_property),
{ "Birthday", bday_property }, TEST_NO_TAG("Birthday", bday_property),
{ "Anniversary", anniversary_property }, TEST_NO_TAG("Anniversary", anniversary_property),
{ "Gender", gender_property }, TEST_NO_TAG("Gender", gender_property),
{ "Photo", photo_property }, TEST_NO_TAG("Photo", photo_property),
}; };
test_suite_t vcard_identification_properties_test_suite = { test_suite_t vcard_identification_properties_test_suite = {
...@@ -72,4 +72,4 @@ test_suite_t vcard_identification_properties_test_suite = { ...@@ -72,4 +72,4 @@ test_suite_t vcard_identification_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -54,12 +54,12 @@ static void related_property(void) { ...@@ -54,12 +54,12 @@ static void related_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "TITLE", title_property }, TEST_NO_TAG("TITLE", title_property),
{ "ROLE", role_property }, TEST_NO_TAG("ROLE", role_property),
{ "LOGO", logo_property }, TEST_NO_TAG("LOGO", logo_property),
{ "ORG", org_property }, TEST_NO_TAG("ORG", org_property),
{ "MEMBER", member_property }, TEST_NO_TAG("MEMBER", member_property),
{ "RELATED", related_property }, TEST_NO_TAG("RELATED", related_property),
}; };
test_suite_t vcard_organizational_properties_test_suite = { test_suite_t vcard_organizational_properties_test_suite = {
...@@ -70,4 +70,4 @@ test_suite_t vcard_organizational_properties_test_suite = { ...@@ -70,4 +70,4 @@ test_suite_t vcard_organizational_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -42,9 +42,9 @@ static void death_date_property(void) { ...@@ -42,9 +42,9 @@ static void death_date_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "Birth place", birth_place_property }, TEST_NO_TAG("Birth place", birth_place_property),
{ "Death place", death_place_property }, TEST_NO_TAG("Death place", death_place_property),
{ "Death date", death_date_property }, TEST_NO_TAG("Death date", death_date_property),
}; };
test_suite_t vcard_rfc6474_properties_test_suite = { test_suite_t vcard_rfc6474_properties_test_suite = {
...@@ -55,4 +55,4 @@ test_suite_t vcard_rfc6474_properties_test_suite = { ...@@ -55,4 +55,4 @@ test_suite_t vcard_rfc6474_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -28,7 +28,7 @@ static void key_property(void) { ...@@ -28,7 +28,7 @@ static void key_property(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "Key", key_property }, TEST_NO_TAG("Key", key_property),
}; };
test_suite_t vcard_security_properties_test_suite = { test_suite_t vcard_security_properties_test_suite = {
...@@ -39,4 +39,4 @@ test_suite_t vcard_security_properties_test_suite = { ...@@ -39,4 +39,4 @@ test_suite_t vcard_security_properties_test_suite = {
NULL, NULL,
sizeof(tests) / sizeof(tests[0]), sizeof(tests) / sizeof(tests[0]),
tests tests
}; };
\ No newline at end of file
...@@ -122,12 +122,12 @@ static void property_sort_using_pref_param(void) { ...@@ -122,12 +122,12 @@ static void property_sort_using_pref_param(void) {
} }
static test_t tests[] = { static test_t tests[] = {
{ "Folding", folding }, TEST_NO_TAG("Folding", folding),
{ "Unfolding", unfolding }, TEST_NO_TAG("Unfolding", unfolding),
{ "VCard parsing", vcard_parsing }, TEST_NO_TAG("VCard parsing", vcard_parsing),
{ "VCards parsing", vcards_parsing }, TEST_NO_TAG("VCards parsing", vcards_parsing),
{ "VCard created from scratch", create_vcard_from_api }, TEST_NO_TAG("VCard created from scratch", create_vcard_from_api),
{ "Property sort using pref param", property_sort_using_pref_param }, TEST_NO_TAG("Property sort using pref param", property_sort_using_pref_param),
}; };
test_suite_t vcard_test_suite = { test_suite_t vcard_test_suite = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment