changeset 760:eba9a3d0c484

formats: Fix the tests.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 05 Jan 2021 04:28:45 +0100
parents abcb586566e6
children f506ad5c9b17
files formats/src/th06/pbg3.rs
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/formats/src/th06/pbg3.rs	Tue Jan 05 04:28:30 2021 +0100
+++ b/formats/src/th06/pbg3.rs	Tue Jan 05 04:28:45 2021 +0100
@@ -166,12 +166,11 @@
 #[cfg(test)]
 mod tests {
     use super::*;
-    use crate::util::SeekableSlice;
-    use std::fs::File;
+    use std::io::Cursor;
 
     #[test]
     fn bitstream() {
-        let data = SeekableSlice::new(b"Hello world!\0");
+        let data = Cursor::new(b"Hello world!\0");
         let bitstream = BitStream::new(data);
         let mut pbg3 = PBG3BitStream::new(bitstream);
         assert_eq!(pbg3.read_string(42).unwrap(), b"Hello world!");
@@ -193,7 +192,7 @@
         let mut pbg3 = PBG3::from_file(file).unwrap();
         let files = pbg3.list_files().cloned().collect::<Vec<String>>();
         for filename in files {
-            pbg3.get_file(filename, true).unwrap();
+            pbg3.get_file(&filename, true).unwrap();
         }
     }
 }