diff options
author | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2024-07-19 15:37:58 +0300 |
commit | a990de90fe41456a23e58bd087d2f107d321f3a1 (patch) | |
tree | 15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/weezl/tests/implicit_reset.rs | |
parent | 3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff) | |
download | fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip |
Deleted vendor folder
Diffstat (limited to 'vendor/weezl/tests/implicit_reset.rs')
-rw-r--r-- | vendor/weezl/tests/implicit_reset.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/vendor/weezl/tests/implicit_reset.rs b/vendor/weezl/tests/implicit_reset.rs deleted file mode 100644 index 69dd8a8..0000000 --- a/vendor/weezl/tests/implicit_reset.rs +++ /dev/null @@ -1,21 +0,0 @@ -use std::{env, fs}; -use weezl::{decode, encode, BitOrder}; - -#[test] -fn read_from_mangled() { - let file = env::args().next().unwrap(); - let data = fs::read(file).unwrap(); - - // For simplicity, encode 7-bit data. - let data: Vec<_> = data.iter().copied().map(|b| b & 0x7f).collect(); - - let mut encoder = encode::Encoder::new(BitOrder::Lsb, 7); - let mut buffer = Vec::with_capacity(2 * data.len() + 40); - let _ = encoder.into_stream(&mut buffer).encode_all(&*data); - - let mut decoder = decode::Decoder::new(BitOrder::Lsb, 7); - let mut compare = vec![]; - let result = decoder.into_stream(&mut compare).decode_all(&buffer[1..]); - assert!(result.status.is_ok(), "{:?}", result.status); - assert!(data == &*compare, "{:?}\n{:?}", data, compare); -} |