libdnf/0001-tests-Fix-incorrect-usage-of-the-fail-unless-macro.patch
2020-08-10 15:12:27 +02:00

37 lines
1.4 KiB
Diff

From 89930d46c8fe833b9baf1cf76662275bfcb2f0d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hr=C3=A1zk=C3=BD?= <lhrazky@redhat.com>
Date: Thu, 6 Aug 2020 10:59:59 +0200
Subject: [PATCH] tests: Fix incorrect usage of the fail_unless macro
---
tests/hawkey/test_query.cpp | 2 +-
tests/hawkey/test_sack.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/hawkey/test_query.cpp b/tests/hawkey/test_query.cpp
index bf21e3349..12c7733c8 100644
--- a/tests/hawkey/test_query.cpp
+++ b/tests/hawkey/test_query.cpp
@@ -306,7 +306,7 @@ START_TEST(test_query_pkg)
hy_query_filter(q, HY_PKG_NAME, HY_EQ, "jay");
pset = hy_query_run_set(q);
hy_query_free(q);
- fail_unless(dnf_packageset_count(pset), 2);
+ fail_unless(dnf_packageset_count(pset) == 2);
// use hy_query_filter_package_in():
q = hy_query_create(test_globals.sack);
diff --git a/tests/hawkey/test_sack.cpp b/tests/hawkey/test_sack.cpp
index ba54602d1..5eab83b3f 100644
--- a/tests/hawkey/test_sack.cpp
+++ b/tests/hawkey/test_sack.cpp
@@ -83,7 +83,7 @@ START_TEST(test_list_arches)
const char ** arches = dnf_sack_list_arches(sack);
/* noarch, x86_64, athlon, i686, i586, i486, i386 */
- fail_unless(g_strv_length((gchar**)arches), 7);
+ fail_unless(g_strv_length((gchar**)arches) == 7);
if (strcmp(arches[2], "athlon") == 0) {
// Fedora, Mageia