diff options
author | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2007-09-10 05:32:44 +0000 |
---|---|---|
committer | bojan <bojan@13f79535-47bb-0310-9956-ffa450edef68> | 2007-09-10 05:32:44 +0000 |
commit | d70d87ad0a768a4769e5c08965520397b3683bf8 (patch) | |
tree | c9bab8972c1f1992970a20880f6056625a3bf6e9 /test/testdate.c | |
parent | df31db9c7c0193041fb9285c38fd50ac1615ee86 (diff) | |
download | libapr-util-d70d87ad0a768a4769e5c08965520397b3683bf8.tar.gz |
Run all tests, then fail make if required
git-svn-id: http://svn.apache.org/repos/asf/apr/apr-util/trunk@574135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testdate.c')
-rw-r--r-- | test/testdate.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/testdate.c b/test/testdate.c index fdb30643..82269a4d 100644 --- a/test/testdate.c +++ b/test/testdate.c @@ -161,7 +161,14 @@ static void test_date_parse_http(abts_case *tc, void *data) guess = lgc(guess); if (guess < 0) guess *= -1; - secstodate = guess + offset; + + /* make sure it fits into time_t */ + secstodate = (time_t)(guess + offset); + + /* and is positive, taking into account we could be at _MIN */ + if (secstodate < 0) + secstodate = -(secstodate + 1); + gm_timestr_822(datestr, secstodate); secstodate *= APR_USEC_PER_SEC; newsecs = apr_date_parse_http(datestr); |