diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2012-09-24 12:34:33 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2012-10-25 16:43:47 +0200 |
commit | d588e929e1b2e98a52c221bad50f1baedb0e220f (patch) | |
tree | 7a3750b0452c6ab0cd8ea59166b7d8175ddc1aa5 /src/dbus/server/pim/folks.cpp | |
parent | a044071e0c294f5151dc8e9aa1cf2ae220e038c7 (diff) |
Folks: disable tests which never worked
The tests were originally added to test compilation of code written
against the proposed APIs. After implementing them it turned out that
creating FolksIndividual instances and setting properties is not
supported by libfolks
(https://bugzilla.gnome.org/show_bug.cgi?id=684557), and thus testing
like this is impossible.
Keeping the tests anyway, without running them, because perhaps such
testing becomes possible at some point (mock FolksIndividual?!) and
the tests still cover compilation against the APIs.
Diffstat (limited to 'src/dbus/server/pim/folks.cpp')
-rw-r--r-- | src/dbus/server/pim/folks.cpp | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/src/dbus/server/pim/folks.cpp b/src/dbus/server/pim/folks.cpp index 0c43719f..15792d29 100644 --- a/src/dbus/server/pim/folks.cpp +++ b/src/dbus/server/pim/folks.cpp @@ -208,8 +208,17 @@ class FolksTest : public CppUnit::TestFixture { CPPUNIT_TEST(open); CPPUNIT_TEST(asyncError); CPPUNIT_TEST(gvalue); - CPPUNIT_TEST(fullview); - CPPUNIT_TEST(filter); + + // The tests are not working because it is currently not possible + // to create FolksIndividual instances directly with some chosen + // properties. Testing the FullView and IndividualFilter thus must + // be done by putting real data into EDS and reading it via libfolks. + // See testpim.py. + // CPPUNIT_TEST(fullview); + // CPPUNIT_TEST(filter); + + // aggregate() works, but doesn't do anything. Keeping it and the + // other two tests as compile test for the API. CPPUNIT_TEST(aggregate); CPPUNIT_TEST_SUITE_END(); @@ -224,8 +233,24 @@ public: FolksStructuredName *fn; contact = FolksIndividualCXX::steal(folks_individual_new(NULL)); - folks_name_details_set_full_name(FOLKS_NAME_DETAILS(contact.get()), "Abraham Zzz"); - fn = folks_name_details_get_structured_name(FOLKS_NAME_DETAILS(contact.get())); + FolksNameDetails *nd = FOLKS_NAME_DETAILS(contact.get()); + + // Crashes due to bug in Vala: + // https://bugzilla.gnome.org/show_bug.cgi?id=684557 + // GErrorCXX gerror; + // SYNCEVO_GLIB_CALL_SYNC(NULL, gerror, + // folks_name_details_change_full_name, + // nd, + // "Abraham Zzz"); + // if (gerror) { + // gerror.throwError("folks_name_details_change_full_name(Abraham Zzz)"); + // } + + // Doesn't have any effect: without an associated store, + // properties in a FolksIndividual are not writable. + folks_name_details_set_full_name(nd, "Abraham Zzz"); + + fn = folks_name_details_get_structured_name(nd); folks_structured_name_set_family_name(fn, "Zzz"); folks_structured_name_set_given_name(fn, "Abraham"); m_contactA = contact; |