From 03358df460bf8034de2bb06237b1c5d34813ae28 Mon Sep 17 00:00:00 2001 From: Truman Kilen Date: Tue, 7 Feb 2023 23:07:07 -0600 Subject: [PATCH] Remove redundant tests --- repak/src/pak.rs | 58 ------------------------------------------------ 1 file changed, 58 deletions(-) diff --git a/repak/src/pak.rs b/repak/src/pak.rs index 5ceb55e..632f9d1 100644 --- a/repak/src/pak.rs +++ b/repak/src/pak.rs @@ -554,61 +554,3 @@ fn encrypt(key: Aes256Enc, bytes: &mut [u8]) { key.encrypt_block(aes::Block::from_mut_slice(chunk)) } } - -#[cfg(test)] -mod test { - #[test] - fn test_rewrite_pak_v8b() { - use std::io::Cursor; - let bytes = include_bytes!("../tests/packs/pack_v8b.pak"); - - let mut reader = Cursor::new(bytes); - let pak_reader = super::PakReader::new_any(&mut reader, None).unwrap(); - let writer = Cursor::new(vec![]); - let mut pak_writer = super::PakWriter::new( - writer, - None, - super::Version::V8B, - pak_reader.mount_point().to_owned(), - None, - ); - - for path in pak_reader.files() { - let data = pak_reader.get(&path, &mut reader).unwrap(); - pak_writer - .write_file(&path, &mut std::io::Cursor::new(data)) - .unwrap(); - } - - let out_bytes = pak_writer.write_index().unwrap().into_inner(); - assert_eq!(&bytes[..], &out_bytes[..]); - } - - #[test] - fn test_rewrite_pak_v11() { - use std::io::Cursor; - let bytes = include_bytes!("../tests/packs/pack_v11.pak"); - - let mut reader = Cursor::new(bytes); - let pak_reader = super::PakReader::new_any(&mut reader, None).unwrap(); - let writer = Cursor::new(vec![]); - let mut pak_writer = super::PakWriter::new( - writer, - None, - super::Version::V11, - pak_reader.mount_point().to_owned(), - Some(0x205C5A7D), - ); - - for path in pak_reader.files() { - let data = pak_reader.get(&path, &mut reader).unwrap(); - pak_writer - .write_file(&path, &mut std::io::Cursor::new(data)) - .unwrap(); - } - - let out_bytes = pak_writer.write_index().unwrap().into_inner(); - - assert_eq!(&bytes[..], &out_bytes[..]); - } -}