Commit graph

11 commits

Author SHA1 Message Date
Niels De Graef
6ce2373a75 Create a config.vapi for config.h
Currently, a lot of our build variables that are defined at
configuration time, are spread out across the code base, often declared
as `extern` which can break when moving around sections of the code
across files.

This commit introduces a "Config" namespace which basically maps to the
definitions in `config.h`, but allows us to properly access them too
from the Vala source code.

By doing so, it helps us to more explicitly see where we rely on a
build variable from this file (which should be obvious from the `Config'
namespace).

To make it ourselves a bit easier in Meson too, we can declare an
internal dependency, which helps ensure that we pull in the dependency
where needed.
2025-12-07 01:32:32 +01:00
Michael Gratton
964b03c068 Application.TlsDatabase: Add unit tests for local (non-GCR) pinning
Make the class internal so it can be tested, add unit tests covering
both in-memory-only and on-disk pinning.
2020-08-25 16:40:08 +10:00
Michael Gratton
0ae633d88f Update existing tests to work with ValaUnit 2020-06-30 17:31:07 +10:00
Michael Gratton
56876365ba Rename GearyApplication class and source to match code style
Rename `GearyApplication` => `Application.Client` and
`geary-application.vala to `application-client.vala`. Update call sites
and test cases.
2019-11-17 21:38:29 +11:00
Michael Gratton
e426517b30 Rename Config class and source file to match code style
Rename `Configuration` => `Application.Configuration` and
`geary-config.vala to `application-config.vala`. Update call sites and
test cases.
2019-11-17 16:53:42 +11:00
Christopher Davis
bfcee9bff7 build: Set up dual install for flatpak
Part of https://gitlab.gnome.org/GNOME/Initiatives/issues/1;
Sets up dual installation for flatpaks, allowing us to
build and run geary without affecting our system install.
This will allow testing of nightlies and CI artifacts as well
via the flatpak, so we can iterate on designs and share
bundles to test with.
2019-08-26 09:38:31 -07:00
Rafael Fontenelle
2509c5c4f0 Fix misspellings 2019-05-22 20:47:08 +00:00
Michael Gratton
d4c29c72d7 Add unit tests for app path accessors 2019-04-21 11:13:01 +10:00
Michael James Gratton
15748cef03 Tidy up unit test infrastructure and mock classes.
* 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.
2018-04-07 09:41:18 +10:00
Michael James Gratton
50f73ff252 Allow test fixtures and test methods to throw errors by default.
* test/testcase.vala (TestCase): Add a generic throws clause to both
  TestMethod and set_up and tear_down, update subclasses.
2018-04-07 09:41:18 +10:00
Michael James Gratton
50120c67ff Add simple/demo client unit test using GSettings.
* test/client/application/geary-configuration-test.vala: New unit test
  for Configuration class.

* test/main.vala: Add new unit test to the client suite, ensure the
  memory GSettings backend is used as the default so we get default
  setting values, and never save any changes made.

* test/CMakeLists.txt: Add new unit test source.

* src/client/application/geary-config.vala: Tidy up code a bit to adhere
  to code conventions.
2016-12-26 13:21:58 +10:30