From 072cfa6a0b5566d7686c64061b68689f1afe852c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 26 Aug 2023 10:49:17 -0400 Subject: [PATCH] Tweak g_assert_cmpfloat_with_epsilon While it is nice to see the expression symbolically, it is much more useful to see the actual value of epsilon. I don't really care if the variable that was passed in there is called eps, epsilon or blast_radius. --- glib/gtestutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/gtestutils.h b/glib/gtestutils.h index 688f2eae7..8457b1c8a 100644 --- a/glib/gtestutils.h +++ b/glib/gtestutils.h @@ -99,7 +99,7 @@ typedef void (*GTestFixtureFunc) (gpointer fixture, double __n1 = (n1), __n2 = (n2), __epsilon = (epsilon); \ if (G_APPROX_VALUE (__n1, __n2, __epsilon)) ; else \ g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ - #n1 " == " #n2 " (+/- " #epsilon ")", __n1, "==", __n2, 'f'); \ + #n1 " == " #n2 " (+/- " epsilon ")", __n1, "==", __n2, 'f'); \ } G_STMT_END #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_78 #define g_assert_cmpmem(m1, l1, m2, l2) G_STMT_START {\