diff options
Diffstat (limited to 'support/support_test_compare_failure.c')
-rw-r--r-- | support/support_test_compare_failure.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/support/support_test_compare_failure.c b/support/support_test_compare_failure.c index a789283f86..e5596fd121 100644 --- a/support/support_test_compare_failure.c +++ b/support/support_test_compare_failure.c @@ -20,14 +20,14 @@ #include <support/check.h> static void -report (const char *which, const char *expr, long long value, int negative, +report (const char *which, const char *expr, long long value, int positive, int size) { printf (" %s: ", which); - if (negative) - printf ("%lld", value); - else + if (positive) printf ("%llu", (unsigned long long) value); + else + printf ("%lld", value); unsigned long long mask = (~0ULL) >> (8 * (sizeof (unsigned long long) - size)); printf (" (0x%llx); from: %s\n", (unsigned long long) value & mask, expr); @@ -37,11 +37,11 @@ void support_test_compare_failure (const char *file, int line, const char *left_expr, long long left_value, - int left_negative, + int left_positive, int left_size, const char *right_expr, long long right_value, - int right_negative, + int right_positive, int right_size) { support_record_failure (); @@ -50,6 +50,6 @@ support_test_compare_failure (const char *file, int line, file, line, left_size * 8, right_size * 8); else printf ("%s:%d: numeric comparison failure\n", file, line); - report (" left", left_expr, left_value, left_negative, left_size); - report ("right", right_expr, right_value, right_negative, right_size); + report (" left", left_expr, left_value, left_positive, left_size); + report ("right", right_expr, right_value, right_positive, right_size); } |