Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libutil Whitespace. No changes. OK christos@
details: https://anonhg.NetBSD.org/src/rev/2a2697e88f10
branches: trunk
changeset: 345031:2a2697e88f10
user: kre <kre%NetBSD.org@localhost>
date: Tue May 03 18:10:38 2016 +0000
description:
Whitespace. No changes. OK christos@
diffstat:
tests/lib/libutil/t_parsedate.c | 198 ++++++++++++++++++++--------------------
1 files changed, 99 insertions(+), 99 deletions(-)
diffs (235 lines):
diff -r f5bf2c8369dc -r 2a2697e88f10 tests/lib/libutil/t_parsedate.c
--- a/tests/lib/libutil/t_parsedate.c Tue May 03 17:23:17 2016 +0000
+++ b/tests/lib/libutil/t_parsedate.c Tue May 03 18:10:38 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_parsedate.c,v 1.20 2016/05/01 16:39:47 gson Exp $ */
+/* $NetBSD: t_parsedate.c,v 1.21 2016/05/03 18:10:38 kre 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.20 2016/05/01 16:39:47 gson Exp $");
+__RCSID("$NetBSD: t_parsedate.c,v 1.21 2016/05/03 18:10:38 kre Exp $");
#include <atf-c.h>
#include <errno.h>
@@ -283,119 +283,119 @@
ATF_CHECK(localtime_r(&now, &tm) != NULL);
if (tm.tm_wday > 4)
- tm.tm_mday += 7;
- tm.tm_mday += 4 - tm.tm_wday;
- /* if a day name is mentioned, it means midnight (by default) */
- tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
- tm.tm_isdst = -1;
- REL_CHECK("this thursday", now, tm);
+ tm.tm_mday += 7;
+ tm.tm_mday += 4 - tm.tm_wday;
+ /* if a day name is mentioned, it means midnight (by default) */
+ tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
+ tm.tm_isdst = -1;
+ REL_CHECK("this thursday", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_mday += 14 - (tm.tm_wday ? tm.tm_wday : 7);
- tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
- tm.tm_isdst = -1;
- REL_CHECK("next sunday", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_mday += 14 - (tm.tm_wday ? tm.tm_wday : 7);
+ tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
+ tm.tm_isdst = -1;
+ REL_CHECK("next sunday", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- if (tm.tm_wday <= 5)
- tm.tm_mday -= 7;
- tm.tm_mday += 5 - tm.tm_wday;
- tm.tm_sec = tm.tm_min = 0;
- tm.tm_hour = 16;
- tm.tm_isdst = -1;
- REL_CHECK("last friday 4 p.m.", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ if (tm.tm_wday <= 5)
+ tm.tm_mday -= 7;
+ tm.tm_mday += 5 - tm.tm_wday;
+ tm.tm_sec = tm.tm_min = 0;
+ tm.tm_hour = 16;
+ tm.tm_isdst = -1;
+ REL_CHECK("last friday 4 p.m.", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_mday += 14;
- if (tm.tm_wday > 3)
- tm.tm_mday += 7;
- tm.tm_mday += 3 - tm.tm_wday;
- tm.tm_sec = tm.tm_min = 0;
- tm.tm_hour = 3;
- tm.tm_isdst = -1;
- REL_CHECK("we fortnight 3 a.m.", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_mday += 14;
+ if (tm.tm_wday > 3)
+ tm.tm_mday += 7;
+ tm.tm_mday += 3 - tm.tm_wday;
+ tm.tm_sec = tm.tm_min = 0;
+ tm.tm_hour = 3;
+ tm.tm_isdst = -1;
+ REL_CHECK("we fortnight 3 a.m.", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_min -= 5;
- tm.tm_isdst = -1;
- REL_CHECK("5 minutes ago", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_min -= 5;
+ tm.tm_isdst = -1;
+ REL_CHECK("5 minutes ago", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_hour++;
- tm.tm_min += 37;
- tm.tm_isdst = -1;
- REL_CHECK("97 minutes", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_hour++;
+ tm.tm_min += 37;
+ tm.tm_isdst = -1;
+ REL_CHECK("97 minutes", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_mon++;
- tm.tm_isdst = -1;
- REL_CHECK("month", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_mon++;
+ tm.tm_isdst = -1;
+ REL_CHECK("month", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_mon += 2; /* "next" means add 2 ... */
- tm.tm_isdst = -1;
- REL_CHECK("next month", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_mon += 2; /* "next" means add 2 ... */
+ tm.tm_isdst = -1;
+ REL_CHECK("next month", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_mon--;
- tm.tm_isdst = -1;
- REL_CHECK("last month", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_mon--;
+ tm.tm_isdst = -1;
+ REL_CHECK("last month", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_mon += 6;
- tm.tm_mday += 2;
- tm.tm_isdst = -1;
- REL_CHECK("+6 months 2 days", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_mon += 6;
+ tm.tm_mday += 2;
+ tm.tm_isdst = -1;
+ REL_CHECK("+6 months 2 days", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_mon -= 9;
- tm.tm_isdst = -1;
- REL_CHECK("9 months ago", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_mon -= 9;
+ tm.tm_isdst = -1;
+ REL_CHECK("9 months ago", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- if (tm.tm_wday <= 2)
- tm.tm_mday -= 7;
- tm.tm_mday += 2 - tm.tm_wday;
- tm.tm_isdst = -1;
- tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
- REL_CHECK("1 week ago Tu", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ if (tm.tm_wday <= 2)
+ tm.tm_mday -= 7;
+ tm.tm_mday += 2 - tm.tm_wday;
+ tm.tm_isdst = -1;
+ tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+ REL_CHECK("1 week ago Tu", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_isdst = -1;
- tm.tm_mday++;
- tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
- REL_CHECK("midnight tomorrow", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_isdst = -1;
+ tm.tm_mday++;
+ tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+ REL_CHECK("midnight tomorrow", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_isdst = -1;
- tm.tm_mday++;
- tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
- REL_CHECK("tomorrow midnight", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_isdst = -1;
+ tm.tm_mday++;
+ tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+ REL_CHECK("tomorrow midnight", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- tm.tm_isdst = -1;
- tm.tm_mday++;
- tm.tm_hour = 12;
- tm.tm_min = tm.tm_sec = 0;
- REL_CHECK("noon tomorrow", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ tm.tm_isdst = -1;
+ tm.tm_mday++;
+ tm.tm_hour = 12;
+ tm.tm_min = tm.tm_sec = 0;
+ REL_CHECK("noon tomorrow", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- if (tm.tm_wday > 2)
- tm.tm_mday += 7;
- tm.tm_mday += 2 - tm.tm_wday;
- tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
- tm.tm_isdst = -1;
- REL_CHECK("midnight Tuesday", now, tm);
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ if (tm.tm_wday > 2)
+ tm.tm_mday += 7;
+ tm.tm_mday += 2 - tm.tm_wday;
+ tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
+ tm.tm_isdst = -1;
+ REL_CHECK("midnight Tuesday", now, tm);
- ATF_CHECK(localtime_r(&now, &tm) != NULL);
- if (tm.tm_wday > 2 + 1)
- tm.tm_mday += 7;
- tm.tm_mday += 2 - tm.tm_wday;
- tm.tm_mday++; /* xxx midnight --> the next day */
- tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
- tm.tm_isdst = -1;
- REL_CHECK("Tuesday midnight", now, tm);
- }
+ ATF_CHECK(localtime_r(&now, &tm) != NULL);
+ if (tm.tm_wday > 2 + 1)
+ tm.tm_mday += 7;
+ tm.tm_mday += 2 - tm.tm_wday;
+ tm.tm_mday++; /* xxx midnight --> the next day */
+ tm.tm_sec = tm.tm_min = tm.tm_hour = 0;
+ tm.tm_isdst = -1;
+ REL_CHECK("Tuesday midnight", now, tm);
+ }
}
ATF_TC(atsecs);
Home |
Main Index |
Thread Index |
Old Index