diff --git a/test/api/test-cplusplus.cc b/test/api/test-cplusplus.cc index b2561886e..60e42bf16 100644 --- a/test/api/test-cplusplus.cc +++ b/test/api/test-cplusplus.cc @@ -41,7 +41,6 @@ #include "hb-cplusplus.hh" -#include #include #include @@ -52,28 +51,28 @@ test_smart_ptrs (void) hb::shared_ptr pb {b}; /* Test copy-construction. */ - assert (bool (pb)); + g_assert_true (bool (pb)); hb::shared_ptr pb2 {pb}; - assert (bool (pb2)); - assert (bool (pb)); + g_assert_true (bool (pb2)); + g_assert_true (bool (pb)); /* Test move-construction. */ - assert (bool (pb2)); + g_assert_true (bool (pb2)); hb::shared_ptr pb4 {std::move (pb2)}; - assert (!bool (pb2)); - assert (bool (pb4)); + g_assert_true (!bool (pb2)); + g_assert_true (bool (pb4)); /* Test copy-assignment. */ hb::shared_ptr pb3; - assert (!bool (pb3)); + g_assert_true (!bool (pb3)); pb3 = pb; - assert (bool (pb3)); - assert (bool (pb)); + g_assert_true (bool (pb3)); + g_assert_true (bool (pb)); /* Test move-assignment. */ - assert (bool (pb)); + g_assert_true (bool (pb)); pb2 = std::move (pb); - assert (!bool (pb)); + g_assert_true (!bool (pb)); pb.reference (); pb.destroy (); @@ -96,9 +95,9 @@ test_smart_ptrs (void) std::hash> hash2 {}; std::hash> hash3 {}; - assert (hash (b) == hash2 (pb4)); - assert (hash2 (pb4) == hash2 (pb2)); - assert (hash (b) == hash3 (pb5)); + g_assert_true (hash (b) == hash2 (pb4)); + g_assert_true (hash2 (pb4) == hash2 (pb2)); + g_assert_true (hash (b) == hash3 (pb5)); g_assert_true (pb != pb.get_empty ()); g_assert_true (pb != pb2); diff --git a/test/api/test-get-table-tags.c b/test/api/test-get-table-tags.c index f60dbf432..192943708 100644 --- a/test/api/test-get-table-tags.c +++ b/test/api/test-get-table-tags.c @@ -142,10 +142,10 @@ test_get_table_tags_ct (void) hb_blob_get_data (blob, NULL), hb_blob_get_length (blob), NULL); - assert (provider); + g_assert_true (provider); CGFontRef cg_font = CGFontCreateWithDataProvider (provider); - assert (cg_font); + g_assert_true (cg_font); CGDataProviderRelease (provider); hb_face_t *face = hb_coretext_face_create (cg_font); diff --git a/test/fuzzing/hb-subset-fuzzer.cc b/test/fuzzing/hb-subset-fuzzer.cc index 93153ed83..d6cf2f68e 100644 --- a/test/fuzzing/hb-subset-fuzzer.cc +++ b/test/fuzzing/hb-subset-fuzzer.cc @@ -34,7 +34,8 @@ trySubset (hb_face_t *face, unsigned int bytes_count = 0; for (unsigned int i = 0; i < length; ++i) if (data[i]) ++bytes_count; - assert (bytes_count || !length); + if (!(bytes_count || !length)) + abort (); hb_blob_destroy (blob); } diff --git a/test/threads/hb-shape-threads.cc b/test/threads/hb-shape-threads.cc index b7c13709d..d200a1512 100644 --- a/test/threads/hb-shape-threads.cc +++ b/test/threads/hb-shape-threads.cc @@ -126,7 +126,8 @@ static void test_backend (const char *backend, } bool ret = hb_font_set_funcs_using (font, backend); - assert (ret); + if (!ret) + abort (); std::vector threads; for (unsigned i = 0; i < num_threads; i++)