If an IdleManager or TimeoutManager had been scheduled, it would not get
destroyed until it was executed by the main loop, causing criticals
if the objects enclosed by its callback had been destroyed.
This adds a weak reference to the manager object itself when scheduling
on the main loop, so it can get safely dropped.
* test/api/*.vala: Renamed files that contained mock objects to *-mock.vala,
not *-test.vala.
* test/testcase.vala: Renamed to test-case.vala for consistency, remove
TestCase class from Gee package since that's really not true. Clean up
code for consistency.
* test/meson.build, test/CMakeLists.txt: Split TestCase compilation out
into a separate test lib.
This allows us to compile the engine tests against the internal VAPI, so
we can unit test internal classes.
* CMakeLists.txt: Add top-level targets test-engine-run and
test-client-run that execute the respective test binaries. Make
the tests target depend on them and make them depend on their
binaries.
* Makefile.in: Add test-client and test-engin targets for convenience.
* src/CMakeLists.txt: Make the right invocation of valac to generate a
correct geary-engine-internal.vapi. Make gsettings schema generation
depend on geary-client so it exists for test-client if the main binary
hasn't been built.
* test/CMakeLists.txt: Split everything up into to builds, one for
test-engine and the other for test-client. Use geary-engine-internal
when building test-engine for access to internal classes and members.
* test/engine/util-idle-manager-test.vala,
test/engine/util-timeout-manager-test.vala: Use Glib MainContext rather
than the GTK main loop for pumping events so the test cases compile
without GTK.
* test/test-engine.vala, test/test-client.vala: New main source file for
test binaries based on old main.vala.