mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-27 16:51:34 +00:00
add a small test case for Err result
This commit is contained in:
@ -108,6 +108,8 @@ mod tests {
|
||||
fn multiaddr_to_tcp_conversion() {
|
||||
use std::net::Ipv6Addr;
|
||||
|
||||
assert!(multiaddr_to_socketaddr(&Multiaddr::new("/ip4/127.0.0.1/udp/1234").unwrap()).is_err());
|
||||
|
||||
assert_eq!(
|
||||
multiaddr_to_socketaddr(&Multiaddr::new("/ip4/127.0.0.1/tcp/12345").unwrap()),
|
||||
Ok(SocketAddr::new(
|
||||
|
@ -23,7 +23,7 @@
|
||||
use protocol::MultistreamSelectError;
|
||||
use std::io::Error as IoError;
|
||||
|
||||
/// Error that can happen when negociating a protocol with the remote.
|
||||
/// Error that can happen when negotiating a protocol with the remote.
|
||||
#[derive(Debug)]
|
||||
pub enum ProtocolChoiceError {
|
||||
/// Error in the protocol.
|
||||
|
Reference in New Issue
Block a user