[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Merge branch 'maint-0.3.4'
commit f308e81fa755efd405919d66bd59c873de325276
Merge: b4f20ec8a f8d5fb42a
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Wed Sep 12 17:25:40 2018 -0400
Merge branch 'maint-0.3.4'
changes/bug27649 | 4 ++++
src/rust/protover/protoset.rs | 17 ++++++++---------
src/rust/protover/protover.rs | 4 ++--
src/rust/protover/tests/protover.rs | 14 +++++++-------
src/test/test_protover.c | 22 +++++++++++-----------
5 files changed, 32 insertions(+), 29 deletions(-)
diff --cc src/rust/protover/protoset.rs
index db33592f9,b99e1a99f..d3eb8b649
--- a/src/rust/protover/protoset.rs
+++ b/src/rust/protover/protoset.rs
@@@ -597,17 -586,11 +596,17 @@@ mod test
#[test]
fn test_protoset_contains() {
- let protoset: ProtoSet = ProtoSet::from_slice(&[(0, 5), (7, 9), (13, 14)]).unwrap();
+ let protoset: ProtoSet = ProtoSet::from_slice(&[(1, 5), (7, 9), (13, 14)]).unwrap();
- for x in 0..6 {
- for x in 1..6 { assert!(protoset.contains(&x), format!("should contain {}", x)); }
- for x in 7..10 { assert!(protoset.contains(&x), format!("should contain {}", x)); }
- for x in 13..15 { assert!(protoset.contains(&x), format!("should contain {}", x)); }
++ for x in 1..6 {
+ assert!(protoset.contains(&x), format!("should contain {}", x));
+ }
+ for x in 7..10 {
+ assert!(protoset.contains(&x), format!("should contain {}", x));
+ }
+ for x in 13..15 {
+ assert!(protoset.contains(&x), format!("should contain {}", x));
+ }
for x in [6, 10, 11, 12, 15, 42, 43, 44, 45, 1234584].iter() {
assert!(!protoset.contains(&x), format!("should not contain {}", x));
@@@ -615,12 -598,10 +614,12 @@@
}
#[test]
- fn test_protoset_contains_0_3() {
- let protoset: ProtoSet = ProtoSet::from_slice(&[(0, 3)]).unwrap();
+ fn test_protoset_contains_1_3() {
+ let protoset: ProtoSet = ProtoSet::from_slice(&[(1, 3)]).unwrap();
- for x in 0..4 {
- for x in 1..4 { assert!(protoset.contains(&x), format!("should contain {}", x)); }
++ for x in 1..4 {
+ assert!(protoset.contains(&x), format!("should contain {}", x));
+ }
}
macro_rules! assert_protoset_from_vec_contains_all {
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits