Commit Graph

5 Commits

Author SHA1 Message Date
Matthias Clasen
3db1d260ee testsuite: Make tests not fail in !debug builds
Some of our tests rely on on warning that only
occur in debug builds. Skip them in non-debug
builds.

Fixes: #2656
2022-05-28 08:02:16 -04:00
Philip Withnall
7e9585177d tests: Drop use of g_test_bug_base()
Include the base URI in the `g_test_bug()` calls instead. This resolves
inconsistencies between the old bug base (bugzilla.gnome.org) and the
new bug base (gitlab.gnome.org). It also has the advantage that the URI
passed to `g_test_bug()` is now clickable in the code editor, rather
than being split across two locations.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/275#note_303175

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-05-13 22:16:27 +01:00
Dan Winship
5cab3fcec1 gobject: re-allow finalization from constructor()
Although returning NULL from constructor is strongly discouraged, some
old libraries need to keep doing it for ABI-compatibility reasons.
Given this, it's rude to forbid finalization from within
constructor(), since it would otherwise work correctly now anyway (and
the critical when returning NULL should discourage any new uses of
returning NULL from constructor()).

https://bugzilla.gnome.org/show_bug.cgi?id=661576
2014-02-15 10:20:53 -05:00
Matthias Clasen
c34cc2348c Simplify subprocesses in tests
Use the new way of running tests in a subprocess without
registering extra 'subprocess' test cases where appropriate.
2013-12-15 11:50:00 -05:00
Dan Winship
0d62eb467f gobject: forbid finalization-during-construction
If a constructor() implementation created an object but then unreffed
it rather than returning it, that object would get left on the
construction_objects list, which would cause problems later when that
memory location got reused by another object.

"Fix" this by making it fail intentionally, and add a test for it (and
for the normal, working singleton case).

https://bugzilla.gnome.org/show_bug.cgi?id=661576
2013-10-22 11:01:15 -04:00