aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLinus Nordberg <linus@torproject.org>2012-10-17 14:01:02 +0200
committerLinus Nordberg <linus@torproject.org>2012-10-17 14:01:02 +0200
commite2313d8622aebc2704ce016dfef2be975fa535c3 (patch)
tree59c4408fd8c7de9d5f042167b1da5ad0a8062bf2 /src/test
parent74c6dafed63a3e51441dd484d652c0e337585949 (diff)
downloadtor-e2313d8622aebc2704ce016dfef2be975fa535c3.tar
tor-e2313d8622aebc2704ce016dfef2be975fa535c3.tar.gz
White space.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/test/test.c b/src/test/test.c
index f34a22cad..0c5e84ddb 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -1485,13 +1485,15 @@ test_geoip(void)
/* Make sure that country ID actually works. */
#define SET_TEST_IPV6(i) in6.s6_addr32[3] = htonl((uint32_t) i)
-#define CHECK_COUNTRY(country, val) do { \
- /* test ipv4 country lookup */ \
- test_streq(country, geoip_get_country_name(geoip_get_country_by_ipv4(val))); \
- /* test ipv6 country lookup */ \
- SET_TEST_IPV6(val); \
- test_streq(country, geoip_get_country_name(geoip_get_country_by_ipv6(&in6))); \
- } while(0)
+#define CHECK_COUNTRY(country, val) do { \
+ /* test ipv4 country lookup */ \
+ test_streq(country, \
+ geoip_get_country_name(geoip_get_country_by_ipv4(val))); \
+ /* test ipv6 country lookup */ \
+ SET_TEST_IPV6(val); \
+ test_streq(country, \
+ geoip_get_country_name(geoip_get_country_by_ipv6(&in6))); \
+ } while (0)
CHECK_COUNTRY("??", 3);
CHECK_COUNTRY("ab", 32);
@@ -1511,14 +1513,14 @@ test_geoip(void)
* using ipv4. Since our fake geoip database is the same between
* ipv4 and ipv6, we should get the same result no matter which
* address family we pick for each IP. */
-#define SET_TEST_ADDRESS(i) do { \
- if ((i) & 1) { \
- SET_TEST_IPV6(i); \
- tor_addr_from_in6(&addr, &in6); \
- } else { \
+#define SET_TEST_ADDRESS(i) do { \
+ if ((i) & 1) { \
+ SET_TEST_IPV6(i); \
+ tor_addr_from_in6(&addr, &in6); \
+ } else { \
tor_addr_from_ipv4h(&addr, (uint32_t) i); \
- } \
- } while(0)
+ } \
+ } while (0)
get_options_mutable()->BridgeRelay = 1;
get_options_mutable()->BridgeRecordUsageByCountry = 1;