Skip to content

Commit

Permalink
Refactor test case
Browse files Browse the repository at this point in the history
  • Loading branch information
sile committed May 21, 2023
1 parent aabcbbe commit ed89e1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zlib.rs
Expand Up @@ -947,11 +947,12 @@ mod tests {
let mut buf = Vec::new();
let result = decoder.read_to_end(&mut buf);
assert!(result.is_err());
buf.extend_from_slice(decoder.unread_decoded_data());

let decoded_data = [
255, 254, 49, 0, 58, 0, 77, 0, 121, 0, 110, 0, 101, 0, 119, 0, 115, 0, 101, 0, 99, 0,
116, 0, 105, 0, 111, 0, 110, 0, 13, 0, 10,
];
assert_eq!(decoder.unread_decoded_data(), decoded_data);
assert_eq!(buf, decoded_data);
}
}

0 comments on commit ed89e1d

Please sign in to comment.