diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2018-11-20 01:16:08 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2018-11-20 01:16:08 -0500 |
commit | 831ba74382e35f110006539f22bebce4d57c8502 (patch) | |
tree | 158878fbef7c75a41f8ebf5ee4d3e9cd32a756cd /test | |
parent | c49e43c1ffee0e9664da6202ace493d932b725a1 (diff) |
Fix Codacy "issues"
Diffstat (limited to 'test')
-rw-r--r-- | test/api/test-buffer.c | 5 | ||||
-rw-r--r-- | test/api/test-object.c | 2 | ||||
-rw-r--r-- | test/api/test-ot-name.c | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/test/api/test-buffer.c b/test/api/test-buffer.c index 5fba3b22..64ab3db9 100644 --- a/test/api/test-buffer.c +++ b/test/api/test-buffer.c @@ -379,14 +379,15 @@ static void test_buffer_utf8_conversion (void) { hb_buffer_t *b; - hb_glyph_info_t *glyphs; - unsigned int bytes, chars, i, j, len; + unsigned int chars, i, j, len; b = hb_buffer_create (); hb_buffer_set_replacement_codepoint (b, (hb_codepoint_t) -1); for (i = 0; i < G_N_ELEMENTS (utf8_conversion_tests); i++) { + unsigned int bytes; + hb_glyph_info_t *glyphs; const utf8_conversion_test_t *test = &utf8_conversion_tests[i]; char *escaped; diff --git a/test/api/test-object.c b/test/api/test-object.c index 02b9760d..093615e8 100644 --- a/test/api/test-object.c +++ b/test/api/test-object.c @@ -235,7 +235,7 @@ test_object (void) { unsigned int j; - data_t data[2] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}}; + data_t data[1000] = {{MAGIC0, FALSE}, {MAGIC1, FALSE}}; deadlock_test_t deadlock_test; g_test_message ("Testing object %s", o->name); diff --git a/test/api/test-ot-name.c b/test/api/test-ot-name.c index 71a8727b..9e88015f 100644 --- a/test/api/test-ot-name.c +++ b/test/api/test-ot-name.c @@ -81,7 +81,7 @@ test_ot_name (void) hb_ot_name_id_t name_id = entries[3].name_id; g_assert_cmpuint (3, ==, name_id); hb_language_t lang = entries[3].language; - g_assert_cmpstr ("en", ==, hb_language_to_string (lang)); + g_assert_cmpstr (hb_language_to_string (lang), ==, "en"); char text[10]; unsigned int text_size = 10; g_assert_cmpuint (27, ==, hb_ot_name_get_utf8 (face, name_id, lang, &text_size, text)); |