From d3a2cc513af6c7b854b0595d0ac22a9fdbb17d2f Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Mon, 24 Jan 2022 22:05:36 +0500 Subject: [PATCH] Try to fix tests on CI (they work locally) --- tests/test_ntoa.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tests/test_ntoa.c b/tests/test_ntoa.c index b208461..5dc3a01 100644 --- a/tests/test_ntoa.c +++ b/tests/test_ntoa.c @@ -380,24 +380,14 @@ static void test_utoa_assert(char *const buffer, const int base) { assert(kernaux_utoa(0, buffer, base) == NULL); assert(assert_count_ctr == ++assert_count_exp); - const char *pos = assert_last_file; - while (*pos) ++pos; - while (pos > assert_last_file) if (*(--pos) == '/') break; - while (pos > assert_last_file) if (*(--pos) == '/') break; - ++pos; - assert(strstr(pos, "src/ntoa.c") != NULL); + assert(strstr(assert_last_file, "src/ntoa.c") != NULL); } static void test_itoa_assert(char *const buffer, const int base) { assert(kernaux_itoa(0, buffer, base) == NULL); assert(assert_count_ctr == ++assert_count_exp); - const char *pos = assert_last_file; - while (*pos) ++pos; - while (pos > assert_last_file) if (*(--pos) == '/') break; - while (pos > assert_last_file) if (*(--pos) == '/') break; - ++pos; - assert(strstr(pos, "src/ntoa.c") != NULL); + assert(strstr(assert_last_file, "src/ntoa.c") != NULL); } int main()