glib/girepository/tests
Philip Withnall 03248e7b18
girepository: Make gi_repository_get_loaded_namespaces() deterministic
As with the previous two commits, the results of calling
`gi_repository_get_loaded_namespaces()` were previously
non-deterministic due to being generated by iterating over a hash table,
which has a non-deterministic iteration order.

Fix that by using the new `ordered_typelibs` and `ordered_lazy_typelibs`
arrays to provide deterministic ordering.

At the same time, significantly reduce the number of allocations needed
to build the return value — previously the results would be built as a
linked list before being turned into an array. The linked list is now
banished to history.

Add some more unit tests to maximise test coverage of this method.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Fixes: #3303
2024-05-16 22:47:49 +01:00
..
autoptr.c girepository: Add g_autoptr() and g_auto() support 2024-02-14 11:54:48 +00:00
cmph-bdz.c cmph-bdz-test: Use more size_t 2024-01-16 18:56:57 +01:00
function-info.c tests: Use runtime casts 2024-01-23 22:04:52 -08:00
gthash.c tests: Use g_assert_*() rather than g_assert() in gthash tests 2024-01-18 13:15:22 +00:00
meson.build girepository: Make gi_repository_find_by_gtype() deterministic 2024-05-16 22:47:35 +01:00
object-info.c tests: Add a test for finding methods and vfuncs in a GIObjectInfo 2024-02-05 18:40:58 +00:00
registered-type-info.c gibaseinfo: Stop building GIBoxedInfo instances 2024-02-12 13:16:07 +00:00
repository-search-paths.c girepository: Drop gi_repository_get_default() 2024-01-26 12:08:17 +00:00
repository.c girepository: Make gi_repository_get_loaded_namespaces() deterministic 2024-05-16 22:47:49 +01:00
struct-info.c gibaseinfo: Stop building GIBoxedInfo instances 2024-02-12 13:16:07 +00:00
test-common.c girepository: Move GIR generation into girepository and prior to tests 2024-01-30 00:50:40 -06:00
test-common.h girepository: Make gi_repository_find_by_gtype() deterministic 2024-05-16 22:47:35 +01:00
throws.c girepository: Remove GI_FUNCTION_THROWS and GI_VFUNC_THROWS flags 2024-01-24 20:45:28 -08:00
union-info.c girepository test: Don't assume doubles are naturally-aligned 2024-02-13 11:33:54 +00:00