diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-12 17:24:41 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-12 17:24:41 -0400 |
commit | f8d5fb42a392a764da9f46102583ea2dff960939 (patch) | |
tree | d7ccac57b585ddd9f110497a56d6ef203b00c7a7 /src/rust/protover/tests/protover.rs | |
parent | 73ba308d3d568eac81da358c4df29fda3f32e921 (diff) | |
parent | 4fa46fca8e71e085883dab6183df498759bc439f (diff) | |
download | tor-f8d5fb42a392a764da9f46102583ea2dff960939.tar.gz tor-f8d5fb42a392a764da9f46102583ea2dff960939.zip |
Merge branch 'maint-0.3.3' into maint-0.3.4
Diffstat (limited to 'src/rust/protover/tests/protover.rs')
-rw-r--r-- | src/rust/protover/tests/protover.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/rust/protover/tests/protover.rs b/src/rust/protover/tests/protover.rs index 2db01a1634..59a4b5a8a0 100644 --- a/src/rust/protover/tests/protover.rs +++ b/src/rust/protover/tests/protover.rs @@ -106,10 +106,10 @@ fn protocol_all_supported_with_unsupported_versions() { #[test] fn protocol_all_supported_with_unsupported_low_version() { - let protocols: UnvalidatedProtoEntry = "Cons=0-1".parse().unwrap(); + let protocols: UnvalidatedProtoEntry = "HSIntro=2-3".parse().unwrap(); let unsupported: Option<UnvalidatedProtoEntry> = protocols.all_supported(); assert_eq!(true, unsupported.is_some()); - assert_eq!("Cons=0", &unsupported.unwrap().to_string()); + assert_eq!("HSIntro=2", &unsupported.unwrap().to_string()); } #[test] @@ -354,18 +354,18 @@ fn protover_all_supported_should_exclude_some_versions_and_entire_protocols() { #[test] fn protover_all_supported_should_not_dos_anyones_computer() { - let proto: UnvalidatedProtoEntry = "Sleen=0-2147483648".parse().unwrap(); + let proto: UnvalidatedProtoEntry = "Sleen=1-2147483648".parse().unwrap(); let result: String = proto.all_supported().unwrap().to_string(); - assert_eq!(result, "Sleen=0-2147483648".to_string()); + assert_eq!(result, "Sleen=1-2147483648".to_string()); } #[test] fn protover_all_supported_should_not_dos_anyones_computer_max_versions() { - let proto: UnvalidatedProtoEntry = "Sleen=0-4294967294".parse().unwrap(); + let proto: UnvalidatedProtoEntry = "Sleen=1-4294967294".parse().unwrap(); let result: String = proto.all_supported().unwrap().to_string(); - assert_eq!(result, "Sleen=0-4294967294".to_string()); + assert_eq!(result, "Sleen=1-4294967294".to_string()); } #[test] @@ -388,7 +388,7 @@ fn protover_unvalidatedprotoentry_should_err_entirely_unparseable_things() { #[test] fn protover_all_supported_over_maximum_limit() { - let proto: Result<UnvalidatedProtoEntry, ProtoverError> = "Sleen=0-4294967295".parse(); + let proto: Result<UnvalidatedProtoEntry, ProtoverError> = "Sleen=1-4294967295".parse(); assert_eq!(Err(ProtoverError::ExceedsMax), proto); } |