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

[tor-commits] [tor/master] Trivially change unittests to make them more readable.



commit 85c556a4c265f6ce9587c46d0040f57cb09618bc
Author: George Kadianakis <desnacked@xxxxxxxxxx>
Date:   Sat Jun 29 14:46:45 2013 +0300

    Trivially change unittests to make them more readable.
    
    Pluggable transport names are now in alphabetical order like they
    appear in the bridge-ip-transports string.
---
 src/test/test.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/test/test.c b/src/test/test.c
index cf4febf..822f93a 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -1916,38 +1916,38 @@ test_geoip_with_pt(void)
     geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, NULL, now-7200);
   }
 
-  /* 9 connections with "when" */
+  /* 9 connections with "alpha" */
   for (i=4; i < 13; ++i) {
     SET_TEST_ADDRESS(i);
-    geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "when", now-7200);
+    geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "alpha", now-7200);
   }
 
-  /* one connection with "I" */
+  /* one connection with "beta" */
   SET_TEST_ADDRESS(13);
-  geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "I", now-7200);
+  geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "beta", now-7200);
 
-  /* 14 connections with "was" */
+  /* 14 connections with "charlie" */
   for (i=14; i < 28; ++i) {
     SET_TEST_ADDRESS(i);
-    geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "was", now-7200);
+    geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "charlie", now-7200);
   }
 
-  /* 131 connections with "a" */
+  /* 131 connections with "ddr" */
   for (i=28; i < 159; ++i) {
     SET_TEST_ADDRESS(i);
-    geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "a", now-7200);
+    geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "ddr", now-7200);
   }
 
-  /* 8 connections with "yout" */
+  /* 8 connections with "entropy" */
   for (i=159; i < 167; ++i) {
     SET_TEST_ADDRESS(i);
-    geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "yout", now-7200);
+    geoip_note_client_seen(GEOIP_CLIENT_CONNECT, &addr, "entropy", now-7200);
   }
 
   /* Test the transport history string. */
   s = geoip_get_transport_history();
   tor_assert(s);
-  test_streq(s, "<OR>=8,I=8,a=136,was=16,when=16,yout=8");
+  test_streq(s, "<OR>=8,alpha=16,beta=8,charlie=16,ddr=136,entropy=8");
 
   /* Stop collecting entry statistics. */
   geoip_entry_stats_term();



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits