Skip to content

Commit

Permalink
Update version.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
al8n committed Dec 22, 2024
1 parent c9125f5 commit fe083d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ mod tests {
assert_eq!(DelegateVersion::V1 as u8, 1);
assert_eq!(DelegateVersion::V1.to_string(), "V1");
assert_eq!(DelegateVersion::try_from(1), Ok(DelegateVersion::V1));
assert_eq!(DelegateVersion::try_from(1), Err(UnknownDelegateVersion(1)));
assert_eq!(DelegateVersion::try_from(2), Err(UnknownDelegateVersion(2)));
}

#[test]
fn test_protocol_version() {
assert_eq!(ProtocolVersion::V1 as u8, 1);
assert_eq!(ProtocolVersion::V1.to_string(), "V1");
assert_eq!(ProtocolVersion::try_from(1), Ok(ProtocolVersion::V1));
assert_eq!(ProtocolVersion::try_from(1), Err(UnknownProtocolVersion(1)));
assert_eq!(ProtocolVersion::try_from(2), Err(UnknownProtocolVersion(2)));
}
}

0 comments on commit fe083d9

Please sign in to comment.