From 318742af26883e2539f07df8f243bd7b5702edb6 Mon Sep 17 00:00:00 2001 From: David Llewellyn-Jones Date: Sun, 19 Apr 2020 19:58:50 +0300 Subject: [PATCH] Use internal count for tests --- tests/test_contrac.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test_contrac.c b/tests/test_contrac.c index ffa09c1..b697a94 100644 --- a/tests/test_contrac.c +++ b/tests/test_contrac.c @@ -272,7 +272,6 @@ START_TEST (check_match) { Dtk * dtk; MatchList * matches; MatchListItem const * match; - int match_count; // Generate some keys, check the results Contrac * contrac; @@ -321,7 +320,6 @@ START_TEST (check_match) { match = match_list_first(matches); - match_count = 0; while (match) { result = false; for (pos = 0; pos < 4; ++pos) { @@ -332,10 +330,9 @@ START_TEST (check_match) { ck_assert(result); - match_count++; match = match_list_next(match); } - ck_assert_int_eq(match_count, 4); + ck_assert_int_eq(match_list_count(matches), 4); // Clean up match_list_delete(matches); -- 2.25.1