diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-08-07 02:46:16 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-08-07 02:46:16 +0000 |
commit | f6cc21874243b4d84a2db212e5c66058365bd7e7 (patch) | |
tree | edde9db07ea5ff6a3f28591302fea7caac8388f9 /src/or/test.c | |
parent | f47fe829dd722b502a186b9c437cf8f57bf55405 (diff) | |
download | tor-f6cc21874243b4d84a2db212e5c66058365bd7e7.tar tor-f6cc21874243b4d84a2db212e5c66058365bd7e7.tar.gz |
Refactor ISO-style (yyyy-mm-dd hh:mm:ss) time parsing into util.c; rename format/parse_rfc1123_time; make rephist remember used bandwidth; published used bandwidth in descriptors in 15-minute chunks. Breaks unittests.
svn:r2182
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/test.c b/src/or/test.c index dd3951370..0a993fbf9 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -482,13 +482,13 @@ test_util() { a_time.tm_mday = 10; test_eq((time_t) 1076393695UL, tor_timegm(&a_time)); - tor_format_rfc1123_time(timestr, 0); + format_rfc1123_time(timestr, 0); test_streq("Thu, 01 Jan 1970 00:00:00 GMT", timestr); - tor_format_rfc1123_time(timestr, (time_t)1091580502UL); + format_rfc1123_time(timestr, (time_t)1091580502UL); test_streq("Wed, 04 Aug 2004 00:48:22 GMT", timestr); t_res = 0; - i = tor_parse_rfc1123_time(timestr, &t_res); + i = parse_rfc1123_time(timestr, &t_res); test_eq(i,0); test_eq(t_res, (time_t)1091580502UL); @@ -923,8 +923,9 @@ main(int c, char**v){ #endif crypto_seed_rng(); - setup_directory(); + rep_hist_init(); + // puts("========================== Buffers ========================="); // test_buffers(); puts("\n========================== Crypto =========================="); |