Module Name: src Committed By: maya Date: Sun Jun 3 08:48:37 UTC 2018
Modified Files: src/tests/lib/libc/time: t_strptime.c Log Message: use ATF_CHECK instead of ATF_REQUIRE (continue on failure, to see the rest of the failures) >From Ngie Cooper in PR bin/51834 To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/time/t_strptime.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/libc/time/t_strptime.c diff -u src/tests/lib/libc/time/t_strptime.c:1.14 src/tests/lib/libc/time/t_strptime.c:1.15 --- src/tests/lib/libc/time/t_strptime.c:1.14 Fri Oct 27 05:14:11 2017 +++ src/tests/lib/libc/time/t_strptime.c Sun Jun 3 08:48:37 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strptime.c,v 1.14 2017/10/27 05:14:11 kre Exp $ */ +/* $NetBSD: t_strptime.c,v 1.15 2018/06/03 08:48:37 maya Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_strptime.c,v 1.14 2017/10/27 05:14:11 kre Exp $"); +__RCSID("$NetBSD: t_strptime.c,v 1.15 2018/06/03 08:48:37 maya Exp $"); #include <time.h> #include <stdlib.h> @@ -51,12 +51,12 @@ h_pass(const char *buf, const char *fmt, exp = buf + len; ret = strptime(buf, fmt, &tm); - ATF_REQUIRE_MSG(ret == exp, + ATF_CHECK_MSG(ret == exp, "strptime(\"%s\", \"%s\", tm): incorrect return code: " "expected: %p, got: %p", buf, fmt, exp, ret); #define H_REQUIRE_FIELD(field) \ - ATF_REQUIRE_MSG(tm.field == field, \ + ATF_CHECK_MSG(tm.field == field, \ "strptime(\"%s\", \"%s\", tm): incorrect %s: " \ "expected: %d, but got: %d", buf, fmt, \ ___STRING(field), field, tm.field) @@ -78,7 +78,7 @@ h_fail(const char *buf, const char *fmt) { struct tm tm = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, NULL }; - ATF_REQUIRE_MSG(strptime(buf, fmt, &tm) == NULL, "strptime(\"%s\", " + ATF_CHECK_MSG(strptime(buf, fmt, &tm) == NULL, "strptime(\"%s\", " "\"%s\", &tm) should fail, but it didn't", buf, fmt); } @@ -182,7 +182,7 @@ ztest1(const char *name, const char *fmt break; } - ATF_REQUIRE_MSG(tm.tm_gmtoff == value, + ATF_CHECK_MSG(tm.tm_gmtoff == value, "strptime(\"%s\", \"%s\", &tm): " "expected: tm.tm_gmtoff=%ld, got: tm.tm_gmtoff=%ld", name, fmt, value, tm.tm_gmtoff);