1
0
Fork 0
mirror of https://codeberg.org/icewind/bitbuffer.git synced 2026-06-03 16:44:06 +02:00
This commit is contained in:
Robin Appelman 2023-07-02 16:23:19 +02:00
commit 5d703405d2

View file

@ -261,8 +261,8 @@ fn test_read_str_no_null_termination_be() {
#[test] #[test]
fn test_read_str_le() { fn test_read_str_le() {
let bytes = vec![ let bytes = vec![
b'h', b'e', b'l', b'l', b'o', b' ', b'w', b'o', b'h', b'e', b'l', b'l', b'o', b' ', b'w', b'o', b'r', b'l', b'd', 0, b'f', b'o', b'o', 0,
b'r', b'l', b'd', 0, b'f', b'o', b'o', 0, 0, 0, 0, 0, 0, 0, 0, 0,
]; ];
let buffer = BitReadBuffer::new(&bytes, LittleEndian); let buffer = BitReadBuffer::new(&bytes, LittleEndian);
assert_eq!(buffer.read_string(0, Some(3)).unwrap(), "hel".to_owned()); assert_eq!(buffer.read_string(0, Some(3)).unwrap(), "hel".to_owned());