The pkcs11 tests were using g_assert(!G_IS_OBJECT()) to verify that
objects had been destroyed, but that's just crazy, and will crash
sometimes. Fix them to do a ref_count check instead.
teardown_pin (TestPin *test,
gconstpointer unused)
{
+ g_assert_cmpint (G_OBJECT (test->pin)->ref_count, ==, 1);
g_object_unref (test->pin);
- g_assert (!G_IS_OBJECT (test->pin));
}
static void
{
CK_RV rv;
+ g_assert_cmpint (G_OBJECT (test->slot)->ref_count, ==, 1);
g_object_unref (test->slot);
- g_assert (!G_IS_OBJECT (test->slot));
+ g_assert_cmpint (G_OBJECT (test->not_present)->ref_count, ==, 1);
g_object_unref (test->not_present);
- g_assert (!G_IS_OBJECT (test->not_present));
rv = p11_kit_finalize_module (&test->funcs);
g_assert (rv == CKR_OK);