[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r14923: fix most of the geoip unit tests. one remains broken -- nick (in tor/branches/tor-0_2_0-patches: . src/or)



Author: arma
Date: 2008-06-03 17:15:09 -0400 (Tue, 03 Jun 2008)
New Revision: 14923

Modified:
   tor/branches/tor-0_2_0-patches/ChangeLog
   tor/branches/tor-0_2_0-patches/src/or/test.c
Log:
fix most of the geoip unit tests. one remains broken -- nick,
this looks like a real bug.


Modified: tor/branches/tor-0_2_0-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_2_0-patches/ChangeLog	2008-06-03 20:29:35 UTC (rev 14922)
+++ tor/branches/tor-0_2_0-patches/ChangeLog	2008-06-03 21:15:09 UTC (rev 14923)
@@ -1,3 +1,8 @@
+Changes in version 0.2.0.28-rc - 2008-06-??
+  o Minor fixes:
+    - Fix unit tests in 0.2.0.27-rc. [Actually, one is still broken!]
+
+
 Changes in version 0.2.0.27-rc - 2008-06-03
   o Major features:
     - Include an IP-to-country GeoIP file in the tarball, so relays

Modified: tor/branches/tor-0_2_0-patches/src/or/test.c
===================================================================
--- tor/branches/tor-0_2_0-patches/src/or/test.c	2008-06-03 20:29:35 UTC (rev 14922)
+++ tor/branches/tor-0_2_0-patches/src/or/test.c	2008-06-03 21:15:09 UTC (rev 14923)
@@ -3491,19 +3491,19 @@
     geoip_note_client_seen(i, now-7200);
   s = geoip_get_client_history(now+5*24*60*60);
   test_assert(s);
-  test_streq("zz=24,ab=16", s);
+  test_streq("zz=24,ab=16,xy=8", s);
   tor_free(s);
 
   /* Now clear out all the zz observations. */
   geoip_remove_old_clients(now-6000);
   s = geoip_get_client_history(now+5*24*60*60);
-  test_assert(! s); /* There are only 12 observations left.  Not enough to
-                       build an answer.  Add 4 more in XY... */
+  test_assert(s); /* Any answer is worth reporting. */
+  /* Add 4 more in XY... */
   for (i=55; i < 59; ++i)
     geoip_note_client_seen(i, now-3600);
   s = geoip_get_client_history(now+5*24*60*60);
   test_assert(s);
-  test_streq("ab=16", s);
+  test_streq("ab=16,xy=8", s);
   tor_free(s);
 }