Commit graph

6 commits

Author SHA1 Message Date
Niels De Graef
81859bd3c3 Adapt vala-unit and tests to GLib 2.70 and later
`GLib.TestSuite` is a special type of object, as it doesn't actually
have an associated copy function or a reference/unreference function.
In practice, that actually means there's no way to actually have 2
strong references to such an object, or to copy it somehow. Due to the
way GObject properties in Vala work, that means you can't really use
them either.

Ever since vala commit 5f0a146f65, this got reflected properly in the
internally maintained GLib VAPI (as people were experiencing double
frees otherwise), but it was added only conditionally for GLib 2.70 or
later. In practice, that means you only get vala compiler issues if you
(impliclty) set `--target-glib=2.70` (or a later version).

To fix this for vala-unit and our own Geary tests, this commit changes
the `ValaUnit.TestCase` class to only allow "stealing" the strong
reference to the `GLib.TestSuite`, rather than somehowing allowing
people to hold a weak reference, and by also making it a protected field
rather than a property.

Since this changes the API of ValaUnit, we also bump the version. In
general though, I hope people aren't using ValaUnit externally, since
these types of API/ABI breaks can happen with Vala libraries.

Link: 5f0a146f65
2025-12-07 11:37:22 +01:00
Michael Gratton
0ae633d88f Update existing tests to work with ValaUnit 2020-06-30 17:31:07 +10:00
Michael Gratton
b0ca8c9e0a Switch to using GLib structured logging
This converts the logging infrastructure to using structured logging
calls, adds and sets a structured logging writer.
2019-06-30 16:15:03 +10:00
Michael Gratton
788a06144f Ensure test drivers all have sane locales set 2019-06-22 14:08:03 +10:00
Michael Gratton
c58d0b74e9 Add simple SMTP integration test 2019-04-24 17:18:03 +10:00
Michael Gratton
cddbb28a43 Add initial integration test famework and IMAP client session tests 2019-03-31 02:05:14 +11:00