girepository: Add gthash test to tests and run it

This commit is contained in:
Marco Trevisan (Treviño) 2023-12-20 07:36:04 +01:00
parent 0c9fe8156a
commit 8a4755106d
3 changed files with 4 additions and 0 deletions

View File

@ -131,6 +131,7 @@ gi_typelib_hash_builder_prepare (GITypelibHashBuilder *builder)
builder->dirmap_offset = ALIGN_VALUE (offset, 4);
builder->packed_size = builder->dirmap_offset + (num_elts * sizeof(guint16));
out:
g_strfreev (strs);
cmph_config_destroy (config);
cmph_io_vector_adapter_destroy (io);
return builder->buildable;

View File

@ -53,6 +53,8 @@ test_build_retrieve (void)
g_assert (gi_typelib_hash_search (buf, "ZLibDecompressor", 4) == 42);
g_assert (gi_typelib_hash_search (buf, "VolumeMonitor", 4) == 9);
g_assert (gi_typelib_hash_search (buf, "FileMonitorFlags", 4) == 31);
g_free (buf);
}
int

View File

@ -3,6 +3,7 @@ girepository_tests = {}
# Some GIR files are needed to test against
if enable_gir
girepository_tests += {
'gthash' : {},
'repository' : {
'depends': [glib_gir, gobject_gir],
},