Module Name: src
Committed By: dholland
Date: Thu Dec 31 10:56:13 UTC 2015
Modified Files:
src/tests/lib/libutil: t_parsedate.c
Log Message:
Fix REL_CHECK error output; it had "expected" and "obtained" swapped.
While here, improve the general legibility of the printout. Not
actually relevant to PR 50574, but anyone looking at that should be
aware of this change.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/tests/lib/libutil/t_parsedate.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libutil/t_parsedate.c
diff -u src/tests/lib/libutil/t_parsedate.c:1.18 src/tests/lib/libutil/t_parsedate.c:1.19
--- src/tests/lib/libutil/t_parsedate.c:1.18 Thu Dec 31 10:18:00 2015
+++ src/tests/lib/libutil/t_parsedate.c Thu Dec 31 10:56:13 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: t_parsedate.c,v 1.18 2015/12/31 10:18:00 dholland Exp $ */
+/* $NetBSD: t_parsedate.c,v 1.19 2015/12/31 10:56:13 dholland Exp $ */
/*-
* Copyright (c) 2010, 2015 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_parsedate.c,v 1.18 2015/12/31 10:18:00 dholland Exp $");
+__RCSID("$NetBSD: t_parsedate.c,v 1.19 2015/12/31 10:56:13 dholland Exp $");
#include <atf-c.h>
#include <errno.h>
@@ -245,10 +245,11 @@ ATF_TC_BODY(relative, tc)
#define REL_CHECK(s, now, tm) do { \
time_t p, q; \
char pb[30], qb[30]; \
- ATF_CHECK_EQ_MSG((p = parsedate(s, &now, NULL)), \
- (q = mktime(&tm)), \
- "From %s Expected %jd: %24.24s Obtained %jd: %24.24s", s, \
- (uintmax_t)p, ctime_r(&p, pb), (uintmax_t)q, \
+ p = parsedate(s, &now, NULL); \
+ q = mktime(&tm); \
+ ATF_CHECK_EQ_MSG(p, q, \
+ "From \"%s\", obtained %jd (%24.24s); expected %jd (%24.24s)", \
+ s, (uintmax_t)p, ctime_r(&p, pb), (uintmax_t)q, \
ctime_r(&q, qb)); \
} while (/*CONSTCOND*/0)