From ec72ade8d574e17a64495c50d3b9de9aa46e62cd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 18 Apr 2021 12:56:01 +0100 Subject: [PATCH] packetframe: Tests: Fold first read_all into lumpreader test With a buffer of len+1 this is equivalent. This will make it easier to change the way FrameReader is constructed. Signed-off-by: Ian Jackson --- src/packetframe.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/packetframe.rs b/src/packetframe.rs index 0d60ad51..7fd71717 100644 --- a/src/packetframe.rs +++ b/src/packetframe.rs @@ -489,12 +489,11 @@ fn write_test(){ expect_good(&mut rd, b"longer!"); expect_good_eof(&mut rd); }; - read_all(&mut &*msg.buf); // try lumpy reads (ie, short reads) at every plausible boundary size // this approach is not very principled but ought to test every boundary #[cfg(not(miri))] - for lumpsize in 1..=msg.buf.len() { + for lumpsize in 1..=msg.buf.len()+1 { #[derive(Debug)] struct LumpReader { inner: R, -- 2.30.2