mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 01:36:17 +01:00
tests: Use g_assert_*() rather than g_assert() in gthash tests
It won’t get compiled out with `G_DISABLE_ASSERT`. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
9cbe5ae67d
commit
993eae63ab
@ -39,8 +39,7 @@ test_build_retrieve (void)
|
||||
gi_typelib_hash_builder_add_string (builder, "VolumeMonitor", 9);
|
||||
gi_typelib_hash_builder_add_string (builder, "FileMonitorFlags", 31);
|
||||
|
||||
if (!gi_typelib_hash_builder_prepare (builder))
|
||||
g_assert_not_reached ();
|
||||
g_assert_true (gi_typelib_hash_builder_prepare (builder));
|
||||
|
||||
bufsize = gi_typelib_hash_builder_get_buffer_size (builder);
|
||||
|
||||
@ -50,10 +49,10 @@ test_build_retrieve (void)
|
||||
|
||||
gi_typelib_hash_builder_destroy (builder);
|
||||
|
||||
g_assert (gi_typelib_hash_search (buf, "Action", 4) == 0);
|
||||
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_assert_cmpuint (gi_typelib_hash_search (buf, "Action", 4), ==, 0);
|
||||
g_assert_cmpuint (gi_typelib_hash_search (buf, "ZLibDecompressor", 4), ==, 42);
|
||||
g_assert_cmpuint (gi_typelib_hash_search (buf, "VolumeMonitor", 4), ==, 9);
|
||||
g_assert_cmpuint (gi_typelib_hash_search (buf, "FileMonitorFlags", 4), ==, 31);
|
||||
|
||||
g_free (buf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user