Skip to content

Commit

Permalink
Fixup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ifd3f committed May 23, 2024
1 parent 0eb1c10 commit 057f710
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,11 @@ fn test_streaming() {
// Test resetting to a new file while keeping the old decoder

let mut content = fs::File::open("./decodecorpus_files/z000068.zst").unwrap();
let mut stream =
crate::streaming_decoder::StreamingDecoder::new_with_decoder(&mut content, stream.inner())
.unwrap();
let mut stream = crate::streaming_decoder::StreamingDecoder::new_with_decoder(
&mut content,
stream.into_frame_decoder(),
)
.unwrap();

let mut result = Vec::new();
Read::read_to_end(&mut stream, &mut result).unwrap();
Expand Down Expand Up @@ -415,9 +417,11 @@ fn test_streaming_no_std() {

let content = include_bytes!("../../decodecorpus_files/z000068.zst");
let mut content = content.as_slice();
let mut stream =
crate::streaming_decoder::StreamingDecoder::new_with_decoder(&mut content, stream.inner())
.unwrap();
let mut stream = crate::streaming_decoder::StreamingDecoder::new_with_decoder(
&mut content,
stream.into_frame_decoder(),
)
.unwrap();

let original = include_bytes!("../../decodecorpus_files/z000068");
let mut result = vec![0; original.len()];
Expand Down

0 comments on commit 057f710

Please sign in to comment.