()
| 21 | } |
| 22 | |
| 23 | async fn read_and_verify_varints() -> io::Result<()> { |
| 24 | let f = tokio::fs::File::open("/tmp/varintbytes").await?; |
| 25 | let mut f = tokio::io::BufReader::new(f); |
| 26 | let i1: u32 = f.read_varint_async().await?; |
| 27 | let i2: u32 = f.read_varint_async().await?; |
| 28 | let i3: u32 = f.read_varint_async().await?; |
| 29 | let i4: u32 = f.read_varint_async().await?; |
| 30 | assert!(f.read_varint_async::<u32>().await.is_err()); |
| 31 | println!("{:?}", (i1, i2, i3, i4)); |
| 32 | assert!(i2 == 2 * i1 && i3 == 3 * i1); |
| 33 | Ok(()) |
| 34 | } |
| 35 | |
| 36 | async fn read_and_verify_fixedints() -> io::Result<()> { |
| 37 | let f = tokio::fs::File::open("/tmp/fixedintbytes").await?; |
no test coverage detected