Skip to content

Commit da298a9

Browse files
committed
Verify port in test. Ensures endianness is correct
1 parent 6d08187 commit da298a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/all.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ macro_rules! t {
1616
#[test]
1717
fn smoke_build_listener() {
1818
let b = t!(TcpBuilder::new_v4());
19-
t!(b.bind("127.0.0.1:0"));
19+
t!(b.bind("127.0.0.1:6543"));
2020

2121
let addr = t!(b.local_addr());
2222
assert_eq!(addr.ip(), IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)));
23+
assert_eq!(addr.port(), 6543);
2324

2425
let listener = t!(b.listen(200));
2526

0 commit comments

Comments
 (0)