Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Aug 6, 2024
1 parent d3a414b commit 2a3ba95
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions neqo-udp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,20 @@ mod tests {
Ok(socket)
}

#[test]
fn zero_sized_read() -> Result<(), io::Error> {
let socket = Socket::new(std::net::UdpSocket::bind("127.0.0.1:0")?)?;
let addr: SocketAddr = "127.0.0.1:0".parse().unwrap();
socket
.recv(&addr)
.expect("receive to succeed")
.into_iter()
.next()
.expect("receive to yield datagram");

Ok(())
}

#[test]
fn datagram_tos() -> Result<(), io::Error> {
let sender = socket()?;
Expand Down

0 comments on commit 2a3ba95

Please sign in to comment.