// SPDX-License-Identifier: Apache-2.0 OR MIT // // Modifications Copyright Kani Contributors // See GitHub history for details. // Original copyright tokio contributors. // origin: tokio/tests/tokio/ at commit b2ada60e701d5c9e6644cf8fc42a100774f8e23f #![warn(rust_2018_idioms)] #![cfg(feature = "full")] use tokio::io::AsyncReadExt; use tokio_test::assert_ok; #[cfg(disabled)] // because it timed out after 2h #[kani::proof] #[kani::unwind(2)] async fn chain() { let mut buf = Vec::new(); let rd1: &[u8] = b"hello "; let rd2: &[u8] = b"world"; let mut rd = rd1.chain(rd2); assert_ok!(rd.read_to_end(&mut buf).await); assert_eq!(buf, b"hello world"); }