summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests/: fix some leaksRyan Lortie2012-07-162-1/+5
|
* tests/: test sync watch calls on the engineRyan Lortie2012-07-162-3/+73
|
* tests/: test "fast" signal subscriptionRyan Lortie2012-07-161-1/+76
| | | | Test the normal case, plus the race condition case.
* tests/: improve DBus mock interfaceRyan Lortie2012-07-163-7/+26
| | | | | Put the queue of the outstanding async calls in the header and add an interface for defining handlers for sync calls.
* tests/: test reading from various profile setupsRyan Lortie2012-07-153-6/+330
| | | | | | | | | | | Add a testcase that tests the engine by reading from an exhaustive combination of different profile types and states (missing databases, empty databases, databases with values, databases with locks, etc). Among other things, this makes sure the lockdown logic is sane. This is the testcase that caught the bug fixed in the last commit (listing with a missing database file).
* engine: bring back origin_tag logicRyan Lortie2012-07-151-0/+1
| | | | | | | | | The GSettings backend still wants to use this and it does us no harm to have it on the engine API (which is only visible internally). Adjust the various consumers of the engine to the new API. Thanks to Rui Matos for reminding me about this...
* Don't return a value from a void functionBrian Cameron2012-07-151-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=676619
* make sure to dist dconf-mock.hRyan Lortie2012-07-151-0/+1
|
* test/: finish testing of system sourceRyan Lortie2012-07-131-6/+31
| | | | | Use the invalidation capabilities of the mock gvdb backend to test that the system source handles reopening properly.
* tests/ Rework the gvdb mock codeRyan Lortie2012-07-133-45/+81
| | | | Support a table being marked as no-longer-valid.
* tests/: add test for system sourceRyan Lortie2012-07-121-0/+60
|
* DConfEngineSource: return FALSE from NULL refreshRyan Lortie2012-07-121-0/+7
| | | | | | | | | | In the case that we call dconf_engine_source_refresh() on a source that had a NULL database and the result is that we still have a NULL database, return FALSE. This will prevent the unnecessary bumping of the state counter when there was really no change. This happens in the case of a missing system database file.
* DConfEngineSource: remove the external init callRyan Lortie2012-07-121-3/+1
| | | | | Always do init as part of the process of dconf_engine_source_new() to avoid the consumer from having to call it for themselves.
* tests/: add more testing code for engineRyan Lortie2012-07-124-8/+270
| | | | | | | Add an initial implementation of the gvdb mocking support and improve the existing shm mock by adding logging. Use these new features to test the 'user' DConfEngineSource.
* tests/: implement more realistic shm mockingRyan Lortie2012-07-123-2/+82
| | | | | | | | Add an implementation of the mock shm based on a hash table. We can use this to check that all shm handles have been properly closed after each test. Soon will come support for flagging the shm regions, by name.
* tests/: test the libdbus-1 DBus backendRyan Lortie2012-07-113-1/+12
| | | | | | | | | Add a testcase for the libdbus-1 DBus backend. It uses the existing testcase code and undergoes the same tests as the two other backends. There is one exception: we do not test for failure to connect to D-Bus because the D-Bus connections are passed up-front for the libdbus-1 case, as arguments to dconf_dbus_client_new().
* dbus test: signal with strings instead of intsRyan Lortie2012-07-111-2/+2
| | | | | | We should be testing strings and arrays of strings in our signal handling code (since that's what real dconf signals have inside of them).
* dbus test: use GMainContext on signal receipt testRyan Lortie2012-07-111-11/+12
| | | | | For the same reason as a few commits ago: we have to run the main context to get replies out of libdbus-1.
* dbus test: add function to initialise for testingRyan Lortie2012-07-111-3/+2
| | | | | | | We were hardcoding g_type_init() in the D-Bus testcase because the GDBus backend depended on that happening. That is not true for the libdbus-1 backend, so split it out into a separate function implemeneted by the backend.
* dbus test: implement expected return typeRyan Lortie2012-07-111-8/+13
| | | | | | Implement dconf_engine_handle_get_expected_type() from the testcase by storing the expected type as the handle (instead of a pointer to nothing).
* dbus test: use GMainContext instead of GCondRyan Lortie2012-07-111-26/+48
| | | | | | | Wait for the async results to finish using a GMainContext for signalling instead of a GCond. This will let other things run in the mainloop in the meanwhile (which will be important when we add the libdbus-1 backend for testing).
* big docs cleanupRyan Lortie2012-07-101-6/+6
| | | | We're now back at 100% docs coverage with no warnings.
* tests/gvdb: test gvdb_table_get_names()Ryan Lortie2012-07-091-119/+53
| | | | Drop the tests for gvdb_table_walk() which will soon be removed.
* tests/: fix some leaks in testcasesRyan Lortie2012-07-093-0/+5
|
* clean up C compiler warningsRyan Lortie2012-07-081-4/+6
| | | | | | | Disable C compiler warnings entirely while building Vala code. Fix-up a couple of legitimate issues plus one false-positive (in service.c).
* massive Makefile reorganisationRyan Lortie2012-07-0814-74/+146
| | | | | | | | | | Clean up the Makefiles and make them as similar as possible. Move CFLAGS to a common point of definition and stop using -I so much. Replace the 'dbus stub' with libdconf-mock.a in tests/. Fill in some stubs for future mock code for shm and gvdb (just to get things compiling for now).
* tests/: add shm testcaseRyan Lortie2012-07-085-1/+236
|
* clean up and factor out the 'shm' codeRyan Lortie2012-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the shm code from the engine and the service and put it in a separate convenience library in shm/. Remove the vestigial shmdir weirdness from the service (since shmdir is now always relative to XDG_RUNTIME_DIR and has been for some time). The purpose of this is so that dconf-engine can be properly unit-tested. dconf-engine now has five points of contact with the world (excluding the users of the engine themselves): - the DCONF_PROFILE environment variable - fopen() of profile files - shm - gvdb - dbus The environment variable is quite easily controlled. fopen() is intercepted in the engine testcase with a interpose of the libc symbol. With this commit now each of dbus, gvdb and shm are implemented in separate utility modules that can be mocked from the testcases.
* tests/: add forgotten test dataRyan Lortie2012-07-089-1/+38
| | | | Add it to EXTRA_DIST in the Makefile.am as well.
* gvdb test: fix logic for infinite walksRyan Lortie2012-07-081-1/+2
| | | | | | | We were using a negative variable for the value of a counter designed to bound the number of open() calls in a walk. We were decrementing it in that case (which is fine since it would never reach zero again anyway). It was a bit ugly, though.
* tests/: test profile parsingRyan Lortie2012-07-082-3/+170
|
* gvdb test: test reader against corruptionRyan Lortie2012-07-061-0/+182
| | | | | Test the robustness of the gvdb-reader when faced with a corrupted GVDB file.
* gvdb test: Use g_string_append()Ryan Lortie2012-07-061-2/+2
| | | | | | | | Using g_string_append_c() causes GLib headers to appear in the test coverage results (since it's an inline function). Avoid that. It's probably possible to do this in a more clever way but this works for now.
* DConfChangeset test: test serialise/deserialiseRyan Lortie2012-07-061-0/+68
|
* tests/: test NULL against path functionsRyan Lortie2012-07-061-0/+1
|
* tests/: check changeset reset functionalityRyan Lortie2012-07-061-0/+40
|
* tests/: add a testcase for DConfChangesetRyan Lortie2012-07-063-0/+295
|
* fix various 'make distcheck' issuesRyan Lortie2012-07-061-0/+9
|
* tests/: add a testcase for DConfClientRyan Lortie2012-07-064-0/+185
|
* tests/: add a test for DConfEngineRyan Lortie2012-07-063-0/+73
| | | | | So far just a simple test to make sure the threadsafety logic in dconf_engine_unref() is working properly.
* tests/: add a stub D-Bus backend for testingRyan Lortie2012-07-063-0/+75
| | | | | Also add some macros in the Makefile to make LDFLAGS lines for future tests easier.
* Add test for dbus backendsRyan Lortie2012-07-063-0/+408
| | | | | | | Currently we test the gdbus-thread and gdbus-filter backends. It should be possible to use the same code (with minor changes) once the dbus-1 backend is ported to the new world order.
* tests/: convert path test to gtesterRyan Lortie2012-07-062-11/+10
|
* tests/: add gvdb testcaseRyan Lortie2012-07-069-5/+326
| | | | | | So far only the reader is tested. We also include some example gvdb databases for use by the testcase.
* gsettings test: use g_assert_cmpint()Ryan Lortie2012-07-061-1/+1
| | | | This gives more information when it fails...
* add gtester supportRyan Lortie2012-07-061-0/+2
|
* common/: create two convenience librariesRyan Lortie2012-07-011-4/+2
| | | | | | | One -fPIC and one without. This is done instead of pulling the various source files from other Makefiles.
* Fix linking of dbus1 test caseRyan Lortie2011-01-181-1/+1
| | | | | Some linkers care about the order of -l options appearing on the commandline.
* Avoid using -ldbus-1 symbols in the test caseRyan Lortie2011-01-171-3/+1
| | | | ...since we don't link to it.
* Merge branch 'dbus1'Ryan Lortie2011-01-173-2/+355
|\