diff options
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/or/test.c b/src/or/test.c index 6ce0aaeb47..d43eb8f225 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -2492,7 +2492,7 @@ test_util_gzip(void) test_assert(buf3); test_streq(buf1,buf3); - /* Check whether we can uncompress concatenated, compresed strings. */ + /* Check whether we can uncompress concatenated, compressed strings. */ tor_free(buf3); buf2 = tor_realloc(buf2, len1*2); memcpy(buf2+len1, buf2, len1); @@ -2514,7 +2514,7 @@ test_util_gzip(void) test_assert(!tor_gzip_compress(&buf2, &len1, buf1, strlen(buf1)+1, ZLIB_METHOD)); tor_assert(len1>16); - /* when we allow an uncomplete string, we should succeed.*/ + /* when we allow an incomplete string, we should succeed.*/ tor_assert(!tor_gzip_uncompress(&buf3, &len2, buf2, len1-16, ZLIB_METHOD, 0, LOG_INFO)); buf3[len2]='\0'; @@ -3004,7 +3004,7 @@ test_dir_format(void) test_assert(!crypto_pk_get_fingerprint(pk2, fingerprint, 1)); strlcat(buf2, fingerprint, sizeof(buf2)); strlcat(buf2, "\nuptime 0\n" - /* XXX the "0" above is hardcoded, but even if we made it reflect + /* XXX the "0" above is hard-coded, but even if we made it reflect * uptime, that still wouldn't make it right, because the two * descriptors might be made on different seconds... hm. */ "bandwidth 1000 5000 10000\n" @@ -4616,25 +4616,25 @@ test_geoip(void) get_options()->BridgeRecordUsageByCountry = 1; /* Put 9 observations in AB... */ for (i=32; i < 40; ++i) - geoip_note_client_seen(GEOIP_CLIENT_CONNECT, i, now); - geoip_note_client_seen(GEOIP_CLIENT_CONNECT, 225, now); + geoip_note_client_seen(GEOIP_CLIENT_CONNECT, i, now-7200); + geoip_note_client_seen(GEOIP_CLIENT_CONNECT, 225, now-7200); /* and 3 observations in XY, several times. */ for (j=0; j < 10; ++j) for (i=52; i < 55; ++i) geoip_note_client_seen(GEOIP_CLIENT_CONNECT, i, now-3600); /* and 17 observations in ZZ... */ for (i=110; i < 127; ++i) - geoip_note_client_seen(GEOIP_CLIENT_CONNECT, i, now-7200); + geoip_note_client_seen(GEOIP_CLIENT_CONNECT, i, now); s = geoip_get_client_history(now+5*24*60*60, GEOIP_CLIENT_CONNECT); test_assert(s); test_streq("zz=24,ab=16,xy=8", s); tor_free(s); - /* Now clear out all the zz observations. */ + /* Now clear out all the AB observations. */ geoip_remove_old_clients(now-6000); s = geoip_get_client_history(now+5*24*60*60, GEOIP_CLIENT_CONNECT); test_assert(s); - test_streq("ab=16,xy=8", s); + test_streq("zz=24,xy=8", s); done: tor_free(s); |