about summary refs log tree commit diff
path: root/library/std/src/net/tcp/tests.rs
AgeCommit message (Collapse)AuthorLines
2025-09-08std: make address resolution weirdness local to SGXjoboet-1/+1
2025-03-17Update test for SGX now implementing read_bufThalia Archibald-6/+2
In #108326, `read_buf` was implemented for a variety of types, but SGX was saved for later. Update a test from then, now that #137355 implemented it for SGX types.
2024-09-29Fix std tests for wasm32-wasip2 targetNicola Krumschmidt-2/+27
2024-07-29Reformat `use` declarations.Nicholas Nethercote-2/+1
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-24Replace `MaybeUninit::uninit_array()` with array repeat expression.Kevin Reid-1/+1
This is possible now that inline const blocks are stable; the idea was even mentioned as an alternative when `uninit_array()` was added: <https://github.com/rust-lang/rust/pull/65580#issuecomment-544200681> > if it’s stabilized soon enough maybe it’s not worth having a > standard library method that will be replaceable with > `let buffer = [MaybeUninit::<T>::uninit(); $N];` Const array repetition and inline const blocks are now stable (in the next release), so that circumstance has come to pass, and we no longer have reason to want `uninit_array()` other than convenience. Therefore, let’s evaluate the inconvenience by not using `uninit_array()` in the standard library, before potentially deleting it entirely.
2024-03-06fix `close_read_wakes_up` testLukas Markeffsky-15/+18
2023-12-10remove redundant importssurechen-1/+1
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-06-20Remove useless unit testsEval EXEC-21/+0
2023-06-20Ignore `connect_timeout` unit test on SGX platformEval EXEC-0/+1
Co-authored-by: Chris Denton <christophersdenton@gmail.com>
2023-06-18Add unit test to connect to an unreachable addressEval EXEC-0/+11
Signed-off-by: Eval EXEC <execvy@gmail.com>
2023-06-18Add unit test for `TcpStream::connect_timeout`Eval EXEC-0/+20
Signed-off-by: Eval EXEC <execvy@gmail.com>
2023-03-06Implement read_buf for a few more typesTomasz Miąsko-1/+27
Implement read_buf for TcpStream, Stdin, StdinLock, ChildStdout, ChildStderr (and internally for AnonPipe, Handle, Socket), so that it skips buffer initialization. The other provided methods like read_to_string and read_to_end are implemented in terms of read_buf and so benefit from the optimization as well. This commit also implements read_vectored and is_read_vectored where applicable.
2023-02-28Add QNX Neutrino support to libstdFlorian Bartels-1/+4
Co-authored-by: gh-tr <troach@qnx.com>
2022-03-10Use implicit capture syntax in format_argsT-O-R-U-S-6/+5
This updates the standard library's documentation to use the new syntax. The documentation is worthwhile to update as it should be more idiomatic (particularly for features like this, which are nice for users to get acquainted with). The general codebase is likely more hassle than benefit to update: it'll hurt git blame, and generally updates can be done by folks updating the code if (and when) that makes things more readable with the new format. A few places in the compiler and library code are updated (mostly just due to already having been done when this commit was first authored).
2022-03-09Ignore `close_read_wakes_up` test on SGX platformRaoul Strackx-0/+1
2022-03-07Enable `close_read_wakes_up` on WindowsChris Denton-1/+0
2021-08-30add `TcpStream::set_linger` and `TcpStream::linger`ibraheemdev-0/+15
2021-06-15Rename ErrorKind::Unknown to Uncategorized.Mara Bos-1/+1
2021-06-15Redefine `ErrorKind::Other` and stop using it in std.Mara Bos-1/+1
2020-08-31std: move "mod tests/benches" to separate filesLzu Tao-0/+862
Also doing fmt inplace as requested.