From afb97caf1afd2e78daf43b702da9a64172151216 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 18 Mar 2013 12:52:40 +0000 Subject: [PATCH] All tests: switch to a calling convention that does not rely on leaking The standard main() used in each test relied on the fact that get_suite() kept a ref to the TestCase subclass instance, which would be stored in the global variables of the GTest infrastructure, resulting in the TestCase never being freed and its final_teardown() never being executed. That's undesirable if final_teardown() is going to do something significant, like terminating a temporary session bus. As a first step towards that, run the tests with the TestCase subclass instance globally referenced (so that the version passed to GTest can eventually be a weak reference), and explicitly run final_tear_down() so that even if there is a ref leak (as there is now), it gets executed. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=695381 Signed-off-by: Simon McVittie Reviewed-by: Philip Withnall --- tests/eds/add-contacts-stress-test.vala | 6 +++--- tests/eds/add-persona.vala | 6 +++--- tests/eds/anti-linking.vala | 6 +++--- tests/eds/avatar-details.vala | 6 +++--- tests/eds/create-remove-stores.vala | 6 +++--- tests/eds/email-details.vala | 6 +++--- tests/eds/enable-disable-stores.vala | 6 +++--- tests/eds/im-details.vala | 6 +++--- tests/eds/individual-retrieval.vala | 6 +++--- tests/eds/link-personas-diff-stores.vala | 6 +++--- tests/eds/link-personas.vala | 6 +++--- tests/eds/linkable-properties.vala | 6 +++--- tests/eds/name-details.vala | 6 +++--- tests/eds/persona-store-tests.vala | 6 +++--- tests/eds/phone-details.vala | 6 +++--- tests/eds/postal-address-details.vala | 6 +++--- tests/eds/remove-persona.vala | 6 +++--- tests/eds/removing-contacts.vala | 6 +++--- tests/eds/set-avatar.vala | 6 +++--- tests/eds/set-birthday.vala | 6 +++--- tests/eds/set-emails.vala | 6 +++--- tests/eds/set-gender.vala | 6 +++--- tests/eds/set-im-addresses.vala | 6 +++--- tests/eds/set-is-favourite.vala | 6 +++--- tests/eds/set-names.vala | 6 +++--- tests/eds/set-notes.vala | 6 +++--- tests/eds/set-phones.vala | 6 +++--- tests/eds/set-postal-addresses.vala | 6 +++--- tests/eds/set-properties-race.vala | 6 +++--- tests/eds/set-roles.vala | 6 +++--- tests/eds/set-structured-name.vala | 6 +++--- tests/eds/set-urls.vala | 6 +++--- tests/eds/store-removed.vala | 6 +++--- tests/eds/updating-contacts.vala | 6 +++--- tests/folks/abstract-field-details.vala | 6 +++--- tests/folks/aggregation.vala | 6 +++--- tests/folks/async-locking.vala | 6 +++--- tests/folks/avatar-cache.vala | 6 +++--- tests/folks/backend-loading.vala | 6 +++--- tests/folks/init.vala | 6 +++--- tests/folks/object-cache.vala | 6 +++--- tests/folks/utils.vala | 6 +++--- tests/key-file/individual-retrieval.vala | 6 +++--- tests/lib/test-case.vala | 7 ++++++- tests/libsocialweb/aggregation.vala | 6 +++--- tests/libsocialweb/dummy-lsw.vala | 6 +++--- tests/telepathy/individual-properties.vala | 6 +++--- tests/telepathy/individual-retrieval.vala | 6 +++--- tests/telepathy/init.vala | 6 +++--- tests/telepathy/persona-store-capabilities.vala | 6 +++--- tests/tracker/add-contact.vala | 6 +++--- tests/tracker/add-persona.vala | 6 +++--- tests/tracker/additional-names-updates.vala | 6 +++--- tests/tracker/avatar-details-interface.vala | 6 +++--- tests/tracker/avatar-updates.vala | 6 +++--- tests/tracker/birthday-details-interface.vala | 6 +++--- tests/tracker/birthday-updates.vala | 6 +++--- tests/tracker/default-contact.vala | 6 +++--- tests/tracker/duplicated-emails.vala | 6 +++--- tests/tracker/duplicated-phones.vala | 6 +++--- tests/tracker/email-details-interface.vala | 6 +++--- tests/tracker/emails-updates.vala | 6 +++--- tests/tracker/family-name-updates.vala | 6 +++--- tests/tracker/favourite-details-interface.vala | 6 +++--- tests/tracker/favourite-updates.vala | 6 +++--- tests/tracker/fullname-updates.vala | 6 +++--- tests/tracker/gender-details-interface.vala | 6 +++--- tests/tracker/given-name-updates.vala | 6 +++--- tests/tracker/im-details-interface.vala | 6 +++--- tests/tracker/imaddresses-updates.vala | 6 +++--- tests/tracker/individual-retrieval.vala | 6 +++--- tests/tracker/link-personas-via-local-ids.vala | 6 +++--- tests/tracker/link-personas.vala | 6 +++--- tests/tracker/match-all.vala | 6 +++--- tests/tracker/match-email-addresses.vala | 6 +++--- tests/tracker/match-im-addresses.vala | 6 +++--- tests/tracker/match-known-emails.vala | 6 +++--- tests/tracker/match-name.vala | 6 +++--- tests/tracker/match-phone-number.vala | 6 +++--- tests/tracker/name-details-interface.vala | 6 +++--- tests/tracker/nickname-updates.vala | 6 +++--- tests/tracker/note-details-interface.vala | 6 +++--- tests/tracker/phone-details-interface.vala | 6 +++--- tests/tracker/phones-updates.vala | 6 +++--- tests/tracker/postal-address-details-interface.vala | 6 +++--- tests/tracker/prefix-name-updates.vala | 6 +++--- tests/tracker/remove-contact.vala | 6 +++--- tests/tracker/remove-persona.vala | 6 +++--- tests/tracker/role-details-interface.vala | 6 +++--- tests/tracker/set-avatar.vala | 6 +++--- tests/tracker/set-birthday.vala | 6 +++--- tests/tracker/set-duplicate-email.vala | 6 +++--- tests/tracker/set-emails.vala | 6 +++--- tests/tracker/set-favourite.vala | 6 +++--- tests/tracker/set-full-name.vala | 6 +++--- tests/tracker/set-gender.vala | 6 +++--- tests/tracker/set-im-addresses.vala | 6 +++--- tests/tracker/set-nickname.vala | 6 +++--- tests/tracker/set-notes.vala | 6 +++--- tests/tracker/set-null-avatar.vala | 6 +++--- tests/tracker/set-phones.vala | 6 +++--- tests/tracker/set-postal-addresses.vala | 6 +++--- tests/tracker/set-roles.vala | 6 +++--- tests/tracker/set-structured-name.vala | 6 +++--- tests/tracker/set-urls.vala | 6 +++--- tests/tracker/suffix-name-updates.vala | 6 +++--- tests/tracker/url-details-interface.vala | 6 +++--- tests/tracker/website-updates.vala | 6 +++--- 108 files changed, 327 insertions(+), 322 deletions(-) diff --git a/tests/eds/add-contacts-stress-test.vala b/tests/eds/add-contacts-stress-test.vala index c750892..bd7fe0c 100644 --- a/tests/eds/add-contacts-stress-test.vala +++ b/tests/eds/add-contacts-stress-test.vala @@ -188,10 +188,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AddContactsStressTestTests ().get_suite ()); - + var tests = new AddContactsStressTestTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala index 961f2c4..37f6ec4 100644 --- a/tests/eds/add-persona.vala +++ b/tests/eds/add-persona.vala @@ -493,10 +493,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AddPersonaTests ().get_suite ()); - + var tests = new AddPersonaTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/anti-linking.vala b/tests/eds/anti-linking.vala index 7d7baac..ed129a7 100644 --- a/tests/eds/anti-linking.vala +++ b/tests/eds/anti-linking.vala @@ -382,10 +382,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AntiLinkingTests ().get_suite ()); - + var tests = new AntiLinkingTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/avatar-details.vala b/tests/eds/avatar-details.vala index d8339f6..0def5f3 100644 --- a/tests/eds/avatar-details.vala +++ b/tests/eds/avatar-details.vala @@ -139,10 +139,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AvatarDetailsTests ().get_suite ()); - + var tests = new AvatarDetailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/create-remove-stores.vala b/tests/eds/create-remove-stores.vala index 78f3490..271570f 100644 --- a/tests/eds/create-remove-stores.vala +++ b/tests/eds/create-remove-stores.vala @@ -161,10 +161,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new CreateRemoveStoresTests ().get_suite ()); - + var tests = new CreateRemoveStoresTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/email-details.vala b/tests/eds/email-details.vala index 8316077..30646e3 100644 --- a/tests/eds/email-details.vala +++ b/tests/eds/email-details.vala @@ -193,10 +193,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new EmailDetailsTests ().get_suite ()); - + var tests = new EmailDetailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/enable-disable-stores.vala b/tests/eds/enable-disable-stores.vala index 22ceed7..5b08c09 100644 --- a/tests/eds/enable-disable-stores.vala +++ b/tests/eds/enable-disable-stores.vala @@ -178,10 +178,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new EnableDisableStoresTests ().get_suite ()); - + var tests = new EnableDisableStoresTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/im-details.vala b/tests/eds/im-details.vala index a95874d..f9e5dac 100644 --- a/tests/eds/im-details.vala +++ b/tests/eds/im-details.vala @@ -155,10 +155,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new ImDetailsTests ().get_suite ()); - + var tests = new ImDetailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/individual-retrieval.vala b/tests/eds/individual-retrieval.vala index ae6d129..b69cce0 100644 --- a/tests/eds/individual-retrieval.vala +++ b/tests/eds/individual-retrieval.vala @@ -126,10 +126,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new IndividualRetrievalTests ().get_suite ()); - + var tests = new IndividualRetrievalTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/link-personas-diff-stores.vala b/tests/eds/link-personas-diff-stores.vala index b67c80f..fced5c9 100644 --- a/tests/eds/link-personas-diff-stores.vala +++ b/tests/eds/link-personas-diff-stores.vala @@ -278,10 +278,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new LinkPersonasDiffStoresTests ().get_suite ()); - + var tests = new LinkPersonasDiffStoresTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/link-personas.vala b/tests/eds/link-personas.vala index be9bd60..ec88be9 100644 --- a/tests/eds/link-personas.vala +++ b/tests/eds/link-personas.vala @@ -497,10 +497,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new LinkPersonasTests ().get_suite ()); - + var tests = new LinkPersonasTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/linkable-properties.vala b/tests/eds/linkable-properties.vala index 26fc273..3903e10 100644 --- a/tests/eds/linkable-properties.vala +++ b/tests/eds/linkable-properties.vala @@ -224,10 +224,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new LinkablePropertiesTests ().get_suite ()); - + var tests = new LinkablePropertiesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/name-details.vala b/tests/eds/name-details.vala index 11844f6..fb46c48 100644 --- a/tests/eds/name-details.vala +++ b/tests/eds/name-details.vala @@ -204,10 +204,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new NameDetailsTests ().get_suite ()); - + var tests = new NameDetailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/persona-store-tests.vala b/tests/eds/persona-store-tests.vala index 855f27b..b9ec43c 100644 --- a/tests/eds/persona-store-tests.vala +++ b/tests/eds/persona-store-tests.vala @@ -202,10 +202,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new PersonaStoreTests ().get_suite ()); - + var tests = new PersonaStoreTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/phone-details.vala b/tests/eds/phone-details.vala index 82d90e2..316c8f6 100644 --- a/tests/eds/phone-details.vala +++ b/tests/eds/phone-details.vala @@ -198,10 +198,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new PhoneDetailsTests ().get_suite ()); - + var tests = new PhoneDetailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/postal-address-details.vala b/tests/eds/postal-address-details.vala index 69b4781..8c068d2 100644 --- a/tests/eds/postal-address-details.vala +++ b/tests/eds/postal-address-details.vala @@ -164,10 +164,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new PostalAddressDetailsTests ().get_suite ()); - + var tests = new PostalAddressDetailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/remove-persona.vala b/tests/eds/remove-persona.vala index e545a39..61881f4 100644 --- a/tests/eds/remove-persona.vala +++ b/tests/eds/remove-persona.vala @@ -192,10 +192,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new RemovePersonaTests ().get_suite ()); - + var tests = new RemovePersonaTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/removing-contacts.vala b/tests/eds/removing-contacts.vala index 58b0443..fc895ec 100644 --- a/tests/eds/removing-contacts.vala +++ b/tests/eds/removing-contacts.vala @@ -122,10 +122,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new RemovingContactsTests ().get_suite ()); - + var tests = new RemovingContactsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-avatar.vala b/tests/eds/set-avatar.vala index a9a06e8..9b23bed 100644 --- a/tests/eds/set-avatar.vala +++ b/tests/eds/set-avatar.vala @@ -303,10 +303,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetAvatarTests ().get_suite ()); - + var tests = new SetAvatarTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-birthday.vala b/tests/eds/set-birthday.vala index 10a1c47..0c4df83 100644 --- a/tests/eds/set-birthday.vala +++ b/tests/eds/set-birthday.vala @@ -137,10 +137,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetBirthdayTests ().get_suite ()); - + var tests = new SetBirthdayTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-emails.vala b/tests/eds/set-emails.vala index 69f7bf1..52ca688 100644 --- a/tests/eds/set-emails.vala +++ b/tests/eds/set-emails.vala @@ -136,10 +136,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetEmailsTests ().get_suite ()); - + var tests = new SetEmailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-gender.vala b/tests/eds/set-gender.vala index 6ea474a..8d5a6b7 100644 --- a/tests/eds/set-gender.vala +++ b/tests/eds/set-gender.vala @@ -138,10 +138,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetGenderTests ().get_suite ()); - + var tests = new SetGenderTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-im-addresses.vala b/tests/eds/set-im-addresses.vala index 5cd74d7..7e7a3dc 100644 --- a/tests/eds/set-im-addresses.vala +++ b/tests/eds/set-im-addresses.vala @@ -140,10 +140,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetIMAddressesTests ().get_suite ()); - + var tests = new SetIMAddressesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-is-favourite.vala b/tests/eds/set-is-favourite.vala index 1305601..df29a85 100644 --- a/tests/eds/set-is-favourite.vala +++ b/tests/eds/set-is-favourite.vala @@ -138,10 +138,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetIsFavouriteTests ().get_suite ()); - + var tests = new SetIsFavouriteTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-names.vala b/tests/eds/set-names.vala index 3950e4b..a24ec9b 100644 --- a/tests/eds/set-names.vala +++ b/tests/eds/set-names.vala @@ -177,10 +177,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetNamesTests ().get_suite ()); - + var tests = new SetNamesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-notes.vala b/tests/eds/set-notes.vala index 693dc00..d56545a 100644 --- a/tests/eds/set-notes.vala +++ b/tests/eds/set-notes.vala @@ -139,10 +139,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetNotesTests ().get_suite ()); - + var tests = new SetNotesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-phones.vala b/tests/eds/set-phones.vala index c7be0e4..e00e328 100644 --- a/tests/eds/set-phones.vala +++ b/tests/eds/set-phones.vala @@ -144,10 +144,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetPhonesTests ().get_suite ()); - + var tests = new SetPhonesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-postal-addresses.vala b/tests/eds/set-postal-addresses.vala index f7207fc..9d3ef30 100644 --- a/tests/eds/set-postal-addresses.vala +++ b/tests/eds/set-postal-addresses.vala @@ -152,10 +152,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetPostalAddressesTests ().get_suite ()); - + var tests = new SetPostalAddressesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-properties-race.vala b/tests/eds/set-properties-race.vala index 8c447e9..ee207c2 100644 --- a/tests/eds/set-properties-race.vala +++ b/tests/eds/set-properties-race.vala @@ -160,10 +160,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetPropertiesRaceTests ().get_suite ()); - + var tests = new SetPropertiesRaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-roles.vala b/tests/eds/set-roles.vala index 37ba751..b0b0edb 100644 --- a/tests/eds/set-roles.vala +++ b/tests/eds/set-roles.vala @@ -136,10 +136,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetRolesTests ().get_suite ()); - + var tests = new SetRolesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-structured-name.vala b/tests/eds/set-structured-name.vala index 3e4540b..8cf33f0 100644 --- a/tests/eds/set-structured-name.vala +++ b/tests/eds/set-structured-name.vala @@ -135,10 +135,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetStructuredNameTests ().get_suite ()); - + var tests = new SetStructuredNameTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/set-urls.vala b/tests/eds/set-urls.vala index a18833f..29ed296 100644 --- a/tests/eds/set-urls.vala +++ b/tests/eds/set-urls.vala @@ -183,10 +183,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetUrlsTests ().get_suite ()); - + var tests = new SetUrlsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/store-removed.vala b/tests/eds/store-removed.vala index 9073765..784bf3f 100644 --- a/tests/eds/store-removed.vala +++ b/tests/eds/store-removed.vala @@ -175,10 +175,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new StoreRemovedTests ().get_suite ()); - + var tests = new StoreRemovedTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/eds/updating-contacts.vala b/tests/eds/updating-contacts.vala index 4fad912..5d66d66 100644 --- a/tests/eds/updating-contacts.vala +++ b/tests/eds/updating-contacts.vala @@ -140,10 +140,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new UpdatingContactsTests ().get_suite ()); - + var tests = new UpdatingContactsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/folks/abstract-field-details.vala b/tests/folks/abstract-field-details.vala index 762b492..0bf2bbd 100644 --- a/tests/folks/abstract-field-details.vala +++ b/tests/folks/abstract-field-details.vala @@ -223,10 +223,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new EmailFieldDetailsTests ().get_suite ()); - + var tests = new EmailFieldDetailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/folks/aggregation.vala b/tests/folks/aggregation.vala index 2919292..8b19b56 100644 --- a/tests/folks/aggregation.vala +++ b/tests/folks/aggregation.vala @@ -1441,10 +1441,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AggregationTests ().get_suite ()); - + var tests = new AggregationTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/folks/async-locking.vala b/tests/folks/async-locking.vala index fdd203b..c632e54 100644 --- a/tests/folks/async-locking.vala +++ b/tests/folks/async-locking.vala @@ -151,10 +151,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AsyncLockingTests ().get_suite ()); - + var tests = new AsyncLockingTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/folks/avatar-cache.vala b/tests/folks/avatar-cache.vala index 37e63fa..d2f436e 100644 --- a/tests/folks/avatar-cache.vala +++ b/tests/folks/avatar-cache.vala @@ -265,10 +265,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AvatarCacheTests ().get_suite ()); - + var tests = new AvatarCacheTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/folks/backend-loading.vala b/tests/folks/backend-loading.vala index d40be7a..b84a881 100644 --- a/tests/folks/backend-loading.vala +++ b/tests/folks/backend-loading.vala @@ -284,10 +284,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new BackendLoadingTests ().get_suite ()); - + var tests = new BackendLoadingTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/folks/init.vala b/tests/folks/init.vala index 8d7fb9d..3dd44e6 100644 --- a/tests/folks/init.vala +++ b/tests/folks/init.vala @@ -176,10 +176,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new InitTests ().get_suite ()); - + var tests = new InitTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/folks/object-cache.vala b/tests/folks/object-cache.vala index dd48937..62d208e 100644 --- a/tests/folks/object-cache.vala +++ b/tests/folks/object-cache.vala @@ -537,10 +537,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new ObjectCacheTests ().get_suite ()); - + var tests = new ObjectCacheTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/folks/utils.vala b/tests/folks/utils.vala index cf3616d..9971c47 100644 --- a/tests/folks/utils.vala +++ b/tests/folks/utils.vala @@ -61,10 +61,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new UtilsTests ().get_suite ()); - + var tests = new UtilsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/key-file/individual-retrieval.vala b/tests/key-file/individual-retrieval.vala index e4afc2b..ce33e7f 100644 --- a/tests/key-file/individual-retrieval.vala +++ b/tests/key-file/individual-retrieval.vala @@ -155,10 +155,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new IndividualRetrievalTests ().get_suite ()); - + var tests = new IndividualRetrievalTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/lib/test-case.vala b/tests/lib/test-case.vala index 8abfbfe..dd7afc2 100644 --- a/tests/lib/test-case.vala +++ b/tests/lib/test-case.vala @@ -47,6 +47,11 @@ public abstract class Folks.TestCase : Object Environment.set_variable ("FOLKS_BACKENDS_ALLOWED", "", true); } + public void register () + { + TestSuite.get_root ().add_suite (this.get_suite ()); + } + public void add_test (string name, TestMethod test) { var adaptor = new Adaptor (name, test, this); @@ -98,7 +103,7 @@ public abstract class Folks.TestCase : Object this.final_tear_down (); } - public GLib.TestSuite get_suite () + private GLib.TestSuite get_suite () { return this._suite; } diff --git a/tests/libsocialweb/aggregation.vala b/tests/libsocialweb/aggregation.vala index 15b5866..9e197e4 100644 --- a/tests/libsocialweb/aggregation.vala +++ b/tests/libsocialweb/aggregation.vala @@ -271,10 +271,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AggregationTests ().get_suite ()); - + var tests = new AggregationTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/libsocialweb/dummy-lsw.vala b/tests/libsocialweb/dummy-lsw.vala index 2e9afd5..e34c131 100644 --- a/tests/libsocialweb/dummy-lsw.vala +++ b/tests/libsocialweb/dummy-lsw.vala @@ -282,10 +282,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new DummyLswTests ().get_suite ()); - + var tests = new DummyLswTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/telepathy/individual-properties.vala b/tests/telepathy/individual-properties.vala index c0347bb..931098f 100644 --- a/tests/telepathy/individual-properties.vala +++ b/tests/telepathy/individual-properties.vala @@ -590,10 +590,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new IndividualPropertiesTests ().get_suite ()); - + var tests = new IndividualPropertiesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/telepathy/individual-retrieval.vala b/tests/telepathy/individual-retrieval.vala index fabddfb..490a8a8 100644 --- a/tests/telepathy/individual-retrieval.vala +++ b/tests/telepathy/individual-retrieval.vala @@ -320,10 +320,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new IndividualRetrievalTests ().get_suite ()); - + var tests = new IndividualRetrievalTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/telepathy/init.vala b/tests/telepathy/init.vala index 828c706..df057e4 100644 --- a/tests/telepathy/init.vala +++ b/tests/telepathy/init.vala @@ -81,10 +81,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new InitTests ().get_suite ()); - + var tests = new InitTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/telepathy/persona-store-capabilities.vala b/tests/telepathy/persona-store-capabilities.vala index bb3974d..e3d9acd 100644 --- a/tests/telepathy/persona-store-capabilities.vala +++ b/tests/telepathy/persona-store-capabilities.vala @@ -182,10 +182,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new PersonaStoreCapabilitiesTests ().get_suite ()); - + var tests = new PersonaStoreCapabilitiesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/add-contact.vala b/tests/tracker/add-contact.vala index 9890961..27678d6 100644 --- a/tests/tracker/add-contact.vala +++ b/tests/tracker/add-contact.vala @@ -127,10 +127,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AddContactTests ().get_suite ()); - + var tests = new AddContactTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/add-persona.vala b/tests/tracker/add-persona.vala index 7d56ed8..d90536e 100644 --- a/tests/tracker/add-persona.vala +++ b/tests/tracker/add-persona.vala @@ -517,10 +517,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AddPersonaTests ().get_suite ()); - + var tests = new AddPersonaTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/additional-names-updates.vala b/tests/tracker/additional-names-updates.vala index 67c2be6..6d60dfa 100644 --- a/tests/tracker/additional-names-updates.vala +++ b/tests/tracker/additional-names-updates.vala @@ -148,10 +148,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AdditionalNamesUpdatesTests ().get_suite ()); - + var tests = new AdditionalNamesUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/avatar-details-interface.vala b/tests/tracker/avatar-details-interface.vala index 91b3bf0..52833c3 100644 --- a/tests/tracker/avatar-details-interface.vala +++ b/tests/tracker/avatar-details-interface.vala @@ -130,10 +130,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AvatarDetailsInterfaceTests ().get_suite ()); - + var tests = new AvatarDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/avatar-updates.vala b/tests/tracker/avatar-updates.vala index f5f630b..4eda6c1 100644 --- a/tests/tracker/avatar-updates.vala +++ b/tests/tracker/avatar-updates.vala @@ -167,10 +167,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new AvatarUpdatesTests ().get_suite ()); - + var tests = new AvatarUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/birthday-details-interface.vala b/tests/tracker/birthday-details-interface.vala index 2d8513d..73c4988 100644 --- a/tests/tracker/birthday-details-interface.vala +++ b/tests/tracker/birthday-details-interface.vala @@ -136,10 +136,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new BirthdayDetailsInterfaceTests ().get_suite ()); - + var tests = new BirthdayDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/birthday-updates.vala b/tests/tracker/birthday-updates.vala index 0dc2584..2f7e241 100644 --- a/tests/tracker/birthday-updates.vala +++ b/tests/tracker/birthday-updates.vala @@ -167,10 +167,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new BirthdayUpdatesTests ().get_suite ()); - + var tests = new BirthdayUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/default-contact.vala b/tests/tracker/default-contact.vala index b2de4a3..c83c4d1 100644 --- a/tests/tracker/default-contact.vala +++ b/tests/tracker/default-contact.vala @@ -128,10 +128,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new DefaultContactTests ().get_suite ()); - + var tests = new DefaultContactTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/duplicated-emails.vala b/tests/tracker/duplicated-emails.vala index dcc48de..709fc59 100644 --- a/tests/tracker/duplicated-emails.vala +++ b/tests/tracker/duplicated-emails.vala @@ -203,10 +203,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new DuplicatedEmailsTests ().get_suite ()); - + var tests = new DuplicatedEmailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/duplicated-phones.vala b/tests/tracker/duplicated-phones.vala index 40e4626..c9461a5 100644 --- a/tests/tracker/duplicated-phones.vala +++ b/tests/tracker/duplicated-phones.vala @@ -203,10 +203,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new DuplicatedPhonesTests ().get_suite ()); - + var tests = new DuplicatedPhonesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/email-details-interface.vala b/tests/tracker/email-details-interface.vala index 0fde3f2..74a9aad 100644 --- a/tests/tracker/email-details-interface.vala +++ b/tests/tracker/email-details-interface.vala @@ -134,10 +134,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new EmailDetailsInterfaceTests ().get_suite ()); - + var tests = new EmailDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/emails-updates.vala b/tests/tracker/emails-updates.vala index a3dc253..a5f9766 100644 --- a/tests/tracker/emails-updates.vala +++ b/tests/tracker/emails-updates.vala @@ -193,10 +193,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new EmailsUpdatesTests ().get_suite ()); - + var tests = new EmailsUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/family-name-updates.vala b/tests/tracker/family-name-updates.vala index e22f5f6..d2b924d 100644 --- a/tests/tracker/family-name-updates.vala +++ b/tests/tracker/family-name-updates.vala @@ -145,10 +145,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new FamilyNameUpdatesTests ().get_suite ()); - + var tests = new FamilyNameUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/favourite-details-interface.vala b/tests/tracker/favourite-details-interface.vala index eff49fe..93e1a5b 100644 --- a/tests/tracker/favourite-details-interface.vala +++ b/tests/tracker/favourite-details-interface.vala @@ -150,10 +150,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new FavouriteDetailsInterfaceTests ().get_suite ()); - + var tests = new FavouriteDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/favourite-updates.vala b/tests/tracker/favourite-updates.vala index 8174358..498cc1f 100644 --- a/tests/tracker/favourite-updates.vala +++ b/tests/tracker/favourite-updates.vala @@ -167,10 +167,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new FavouriteUpdatesTests ().get_suite ()); - + var tests = new FavouriteUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/fullname-updates.vala b/tests/tracker/fullname-updates.vala index 863b947..a617c2b 100644 --- a/tests/tracker/fullname-updates.vala +++ b/tests/tracker/fullname-updates.vala @@ -138,10 +138,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new FullnameUpdatesTests ().get_suite ()); - + var tests = new FullnameUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/gender-details-interface.vala b/tests/tracker/gender-details-interface.vala index ae499be..4343083 100644 --- a/tests/tracker/gender-details-interface.vala +++ b/tests/tracker/gender-details-interface.vala @@ -129,10 +129,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new GenderDetailsInterfaceTests ().get_suite ()); - + var tests = new GenderDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/given-name-updates.vala b/tests/tracker/given-name-updates.vala index 57358c8..2c2db0b 100644 --- a/tests/tracker/given-name-updates.vala +++ b/tests/tracker/given-name-updates.vala @@ -146,10 +146,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new GivenNameUpdatesTests ().get_suite ()); - + var tests = new GivenNameUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/im-details-interface.vala b/tests/tracker/im-details-interface.vala index f947d12..557e01a 100644 --- a/tests/tracker/im-details-interface.vala +++ b/tests/tracker/im-details-interface.vala @@ -152,10 +152,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new ImDetailsInterfaceTests ().get_suite ()); - + var tests = new ImDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/imaddresses-updates.vala b/tests/tracker/imaddresses-updates.vala index 89ce3f5..89c0abe 100644 --- a/tests/tracker/imaddresses-updates.vala +++ b/tests/tracker/imaddresses-updates.vala @@ -192,10 +192,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new IMAddressesUpdatesTests ().get_suite ()); - + var tests = new IMAddressesUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/individual-retrieval.vala b/tests/tracker/individual-retrieval.vala index 854870e..048bdd6 100644 --- a/tests/tracker/individual-retrieval.vala +++ b/tests/tracker/individual-retrieval.vala @@ -122,10 +122,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new IndividualRetrievalTests ().get_suite ()); - + var tests = new IndividualRetrievalTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/link-personas-via-local-ids.vala b/tests/tracker/link-personas-via-local-ids.vala index 8fdec67..eb28392 100644 --- a/tests/tracker/link-personas-via-local-ids.vala +++ b/tests/tracker/link-personas-via-local-ids.vala @@ -280,10 +280,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new LinkPersonasViaLocalIDsTests ().get_suite ()); - + var tests = new LinkPersonasViaLocalIDsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/link-personas.vala b/tests/tracker/link-personas.vala index 90ebd0f..9a9c22f 100644 --- a/tests/tracker/link-personas.vala +++ b/tests/tracker/link-personas.vala @@ -293,10 +293,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new LinkPersonasTests ().get_suite ()); - + var tests = new LinkPersonasTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/match-all.vala b/tests/tracker/match-all.vala index c0f4d26..21c4bf4 100644 --- a/tests/tracker/match-all.vala +++ b/tests/tracker/match-all.vala @@ -229,10 +229,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new MatchAllTests ().get_suite ()); - + var tests = new MatchAllTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/match-email-addresses.vala b/tests/tracker/match-email-addresses.vala index 73b007c..c55901c 100644 --- a/tests/tracker/match-email-addresses.vala +++ b/tests/tracker/match-email-addresses.vala @@ -208,10 +208,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new MatchEmailAddressesTests ().get_suite ()); - + var tests = new MatchEmailAddressesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/match-im-addresses.vala b/tests/tracker/match-im-addresses.vala index 7329c5e..4b2a267 100644 --- a/tests/tracker/match-im-addresses.vala +++ b/tests/tracker/match-im-addresses.vala @@ -208,10 +208,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new MatchIMAddressesTests ().get_suite ()); - + var tests = new MatchIMAddressesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/match-known-emails.vala b/tests/tracker/match-known-emails.vala index 3515108..ea7f547 100644 --- a/tests/tracker/match-known-emails.vala +++ b/tests/tracker/match-known-emails.vala @@ -216,10 +216,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new MatchKnownEmailsTests ().get_suite ()); - + var tests = new MatchKnownEmailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/match-name.vala b/tests/tracker/match-name.vala index 198dd4b..f62cebb 100644 --- a/tests/tracker/match-name.vala +++ b/tests/tracker/match-name.vala @@ -246,10 +246,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new MatchNameTests ().get_suite ()); - + var tests = new MatchNameTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/match-phone-number.vala b/tests/tracker/match-phone-number.vala index 0819aec..c37d2d2 100644 --- a/tests/tracker/match-phone-number.vala +++ b/tests/tracker/match-phone-number.vala @@ -210,10 +210,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new MatchPhoneNumberTests ().get_suite ()); - + var tests = new MatchPhoneNumberTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/name-details-interface.vala b/tests/tracker/name-details-interface.vala index 93836ce..4805437 100644 --- a/tests/tracker/name-details-interface.vala +++ b/tests/tracker/name-details-interface.vala @@ -160,10 +160,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new NameDetailsInterfaceTests ().get_suite ()); - + var tests = new NameDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/nickname-updates.vala b/tests/tracker/nickname-updates.vala index db99b2d..f4a6f15 100644 --- a/tests/tracker/nickname-updates.vala +++ b/tests/tracker/nickname-updates.vala @@ -144,10 +144,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new NicknameUpdatesTests ().get_suite ()); - + var tests = new NicknameUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/note-details-interface.vala b/tests/tracker/note-details-interface.vala index 6531f5d..60296e6 100644 --- a/tests/tracker/note-details-interface.vala +++ b/tests/tracker/note-details-interface.vala @@ -152,10 +152,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new NoteDetailsInterfaceTests ().get_suite ()); - + var tests = new NoteDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/phone-details-interface.vala b/tests/tracker/phone-details-interface.vala index 240a09e..346da38 100644 --- a/tests/tracker/phone-details-interface.vala +++ b/tests/tracker/phone-details-interface.vala @@ -133,10 +133,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new PhoneDetailsInterfaceTests ().get_suite ()); - + var tests = new PhoneDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/phones-updates.vala b/tests/tracker/phones-updates.vala index 30c287a..531d499 100644 --- a/tests/tracker/phones-updates.vala +++ b/tests/tracker/phones-updates.vala @@ -182,10 +182,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new PhonesUpdatesTests ().get_suite ()); - + var tests = new PhonesUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/postal-address-details-interface.vala b/tests/tracker/postal-address-details-interface.vala index c6a72c7..2abadd3 100644 --- a/tests/tracker/postal-address-details-interface.vala +++ b/tests/tracker/postal-address-details-interface.vala @@ -177,10 +177,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new PostalAddressDetailsInterfaceTests ().get_suite ()); - + var tests = new PostalAddressDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/prefix-name-updates.vala b/tests/tracker/prefix-name-updates.vala index af424f1..98408f4 100644 --- a/tests/tracker/prefix-name-updates.vala +++ b/tests/tracker/prefix-name-updates.vala @@ -144,10 +144,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new PrefixNameUpdatesTests ().get_suite ()); - + var tests = new PrefixNameUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/remove-contact.vala b/tests/tracker/remove-contact.vala index b30d589..ac54e12 100644 --- a/tests/tracker/remove-contact.vala +++ b/tests/tracker/remove-contact.vala @@ -130,10 +130,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new RemoveContactTests ().get_suite ()); - + var tests = new RemoveContactTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/remove-persona.vala b/tests/tracker/remove-persona.vala index e7a9613..4f04010 100644 --- a/tests/tracker/remove-persona.vala +++ b/tests/tracker/remove-persona.vala @@ -204,10 +204,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new RemovePersonaTests ().get_suite ()); - + var tests = new RemovePersonaTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/role-details-interface.vala b/tests/tracker/role-details-interface.vala index be0768c..4d3b0de 100644 --- a/tests/tracker/role-details-interface.vala +++ b/tests/tracker/role-details-interface.vala @@ -143,10 +143,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new RoleDetailsInterfaceTests ().get_suite ()); - + var tests = new RoleDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-avatar.vala b/tests/tracker/set-avatar.vala index 331a662..25c5b1c 100644 --- a/tests/tracker/set-avatar.vala +++ b/tests/tracker/set-avatar.vala @@ -136,10 +136,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetAvatarTests ().get_suite ()); - + var tests = new SetAvatarTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-birthday.vala b/tests/tracker/set-birthday.vala index 8187497..e558c49 100644 --- a/tests/tracker/set-birthday.vala +++ b/tests/tracker/set-birthday.vala @@ -140,10 +140,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetBirthdayTests ().get_suite ()); - + var tests = new SetBirthdayTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-duplicate-email.vala b/tests/tracker/set-duplicate-email.vala index e15fc5b..c5110a3 100644 --- a/tests/tracker/set-duplicate-email.vala +++ b/tests/tracker/set-duplicate-email.vala @@ -214,10 +214,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetDuplicateEmailTests ().get_suite ()); - + var tests = new SetDuplicateEmailTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-emails.vala b/tests/tracker/set-emails.vala index 66aa067..63be541 100644 --- a/tests/tracker/set-emails.vala +++ b/tests/tracker/set-emails.vala @@ -149,10 +149,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetEmailsTests ().get_suite ()); - + var tests = new SetEmailsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-favourite.vala b/tests/tracker/set-favourite.vala index 6a228bf..287c707 100644 --- a/tests/tracker/set-favourite.vala +++ b/tests/tracker/set-favourite.vala @@ -170,10 +170,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetFavouriteTests ().get_suite ()); - + var tests = new SetFavouriteTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-full-name.vala b/tests/tracker/set-full-name.vala index 07cdba1..981e74e 100644 --- a/tests/tracker/set-full-name.vala +++ b/tests/tracker/set-full-name.vala @@ -131,10 +131,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetFullNameTests ().get_suite ()); - + var tests = new SetFullNameTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-gender.vala b/tests/tracker/set-gender.vala index 5e473bf..1272850 100644 --- a/tests/tracker/set-gender.vala +++ b/tests/tracker/set-gender.vala @@ -128,10 +128,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetGenderTests ().get_suite ()); - + var tests = new SetGenderTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-im-addresses.vala b/tests/tracker/set-im-addresses.vala index 3b72ec1..e18debd 100644 --- a/tests/tracker/set-im-addresses.vala +++ b/tests/tracker/set-im-addresses.vala @@ -165,10 +165,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetIMAddressesTests ().get_suite ()); - + var tests = new SetIMAddressesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-nickname.vala b/tests/tracker/set-nickname.vala index 0d64b7e..18efcb4 100644 --- a/tests/tracker/set-nickname.vala +++ b/tests/tracker/set-nickname.vala @@ -151,10 +151,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetNicknameTests ().get_suite ()); - + var tests = new SetNicknameTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-notes.vala b/tests/tracker/set-notes.vala index 1b59506..acc3248 100644 --- a/tests/tracker/set-notes.vala +++ b/tests/tracker/set-notes.vala @@ -141,10 +141,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetNotesTests ().get_suite ()); - + var tests = new SetNotesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-null-avatar.vala b/tests/tracker/set-null-avatar.vala index 432e7ac..5612570 100644 --- a/tests/tracker/set-null-avatar.vala +++ b/tests/tracker/set-null-avatar.vala @@ -124,10 +124,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetNullAvatarTests ().get_suite ()); - + var tests = new SetNullAvatarTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-phones.vala b/tests/tracker/set-phones.vala index c70f0e8..f81ab4b 100644 --- a/tests/tracker/set-phones.vala +++ b/tests/tracker/set-phones.vala @@ -150,10 +150,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetPhonesTests ().get_suite ()); - + var tests = new SetPhonesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-postal-addresses.vala b/tests/tracker/set-postal-addresses.vala index f741a42..6d007da 100644 --- a/tests/tracker/set-postal-addresses.vala +++ b/tests/tracker/set-postal-addresses.vala @@ -161,10 +161,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetPostalAddressesTests ().get_suite ()); - + var tests = new SetPostalAddressesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-roles.vala b/tests/tracker/set-roles.vala index 6f691a3..6fe73bb 100644 --- a/tests/tracker/set-roles.vala +++ b/tests/tracker/set-roles.vala @@ -145,10 +145,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetRolesTests ().get_suite ()); - + var tests = new SetRolesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-structured-name.vala b/tests/tracker/set-structured-name.vala index 67e3349..8050270 100644 --- a/tests/tracker/set-structured-name.vala +++ b/tests/tracker/set-structured-name.vala @@ -142,10 +142,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetStructuredNameTests ().get_suite ()); - + var tests = new SetStructuredNameTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/set-urls.vala b/tests/tracker/set-urls.vala index 39accea..05f7c85 100644 --- a/tests/tracker/set-urls.vala +++ b/tests/tracker/set-urls.vala @@ -167,10 +167,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SetURLsTests ().get_suite ()); - + var tests = new SetURLsTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/suffix-name-updates.vala b/tests/tracker/suffix-name-updates.vala index caa52d3..aa973df 100644 --- a/tests/tracker/suffix-name-updates.vala +++ b/tests/tracker/suffix-name-updates.vala @@ -146,10 +146,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new SuffixNameUpdatesTests ().get_suite ()); - + var tests = new SuffixNameUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/url-details-interface.vala b/tests/tracker/url-details-interface.vala index 1487694..a1a2d2e 100644 --- a/tests/tracker/url-details-interface.vala +++ b/tests/tracker/url-details-interface.vala @@ -135,10 +135,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new UrlDetailsInterfaceTests ().get_suite ()); - + var tests = new UrlDetailsInterfaceTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } diff --git a/tests/tracker/website-updates.vala b/tests/tracker/website-updates.vala index 485a908..a053163 100644 --- a/tests/tracker/website-updates.vala +++ b/tests/tracker/website-updates.vala @@ -161,10 +161,10 @@ public int main (string[] args) { Test.init (ref args); - TestSuite root = TestSuite.get_root (); - root.add_suite (new WebsiteUpdatesTests ().get_suite ()); - + var tests = new WebsiteUpdatesTests (); + tests.register (); Test.run (); + tests.final_tear_down (); return 0; } -- 2.7.4