summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2011-01-15 22:39:15 -0500
committerRoger Dingledine <arma@torproject.org>2011-01-15 22:39:15 -0500
commit4ff97e3775316ceb500cb5d2a562ec5dfd8dfb23 (patch)
tree77b0407257fb8cd4cb94719df396969095d69e88 /src/test
parent8e9b25e6c7a2e70c370881ab5748651b1c7de66f (diff)
parent7699014e1e9e183d1fd840e59909bcf77ba3321b (diff)
downloadtor-4ff97e3775316ceb500cb5d2a562ec5dfd8dfb23.tar.gz
tor-4ff97e3775316ceb500cb5d2a562ec5dfd8dfb23.zip
Merge branch 'maint-0.2.2'
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_dir.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index 836de94d20..161eda9cd7 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -609,8 +609,11 @@ test_dir_param_voting(void)
"abcd=20 c=60 cw=500 x-yz=-9 zzzzz=101", NULL, 0, 0);
smartlist_split_string(vote4.net_params,
"ab=900 abcd=200 c=1 cw=51 x-yz=100", NULL, 0, 0);
- test_eq(100, networkstatus_get_param(&vote4, "x-yz", 50));
- test_eq(222, networkstatus_get_param(&vote4, "foobar", 222));
+ test_eq(100, networkstatus_get_param(&vote4, "x-yz", 50, 0, 300));
+ test_eq(222, networkstatus_get_param(&vote4, "foobar", 222, 0, 300));
+ test_eq(80, networkstatus_get_param(&vote4, "ab", 12, 0, 80));
+ test_eq(-8, networkstatus_get_param(&vote4, "ab", -12, -100, -8));
+ test_eq(0, networkstatus_get_param(&vote4, "foobar", 0, -100, 8));
smartlist_add(votes, &vote1);
smartlist_add(votes, &vote2);