]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'maint-0.3.4'
authorNick Mathewson <nickm@torproject.org>
Wed, 12 Sep 2018 21:25:40 +0000 (17:25 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 12 Sep 2018 21:25:40 +0000 (17:25 -0400)
1  2 
src/rust/protover/protoset.rs
src/rust/protover/protover.rs
src/rust/protover/tests/protover.rs
src/test/test_protover.c

index db33592f95d07fc2e8d31d8a6bb96988e9cc8b9a,b99e1a99f7921d14003e61339a04fbb0e0b49934..d3eb8b649cd976d58cbbed79db8b2266acc74920
@@@ -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));
      }
  
      #[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 {
Simple merge
Simple merge
Simple merge