Add test for k-invites
This commit is contained in:
parent
faf40caf3a
commit
7647564c1e
|
@ -394,6 +394,21 @@ fn test_open_invite() {
|
|||
assert!(bridgeline == bucket.0[0]);
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn test_k_invites() {
|
||||
let mut th = TestHarness::new();
|
||||
for i in 0..25 {
|
||||
let _ = th.open_invite();
|
||||
if (i+1) % OPENINV_K != 0 {
|
||||
assert!(th.bdb.current_k == (i+1)%OPENINV_K, "the current_k should be (i+1)%OPENINV_K");
|
||||
} else {
|
||||
assert!(th.bdb.current_k == OPENINV_K, "the current_k should be OPENINV_K");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_trust_promotion() {
|
||||
let mut th = TestHarness::new();
|
||||
|
|
Loading…
Reference in New Issue