diff --git a/src/colormap.rs b/src/colormap.rs index a22b81c..27bcbae 100644 --- a/src/colormap.rs +++ b/src/colormap.rs @@ -86,20 +86,3 @@ pub fn map_char_to_color(data: u8) -> String { } } } - -#[cfg(test)] -mod tests { - use super::{map_u8_to_color, map_char_to_color}; - - #[test] - fn map_u8_to_color_test() { - assert_eq!("\u{1b}[38;5;12m32\u{1b}[39m", map_u8_to_color(0x32)); - assert_eq!("\u{1b}[38;5;6m64\u{1b}[39m", map_u8_to_color(0x64)); - } - - #[test] - fn map_char8_to_color_test() { - assert_eq!("\u{1b}[38;5;12m2\u{1b}[39m", map_char_to_color(0x32)); - assert_eq!("\u{1b}[38;5;6md\u{1b}[39m", map_char_to_color(0x64)); - } -} diff --git a/src/tohex.rs b/src/tohex.rs index 6cfb166..fa22c2d 100644 --- a/src/tohex.rs +++ b/src/tohex.rs @@ -61,23 +61,3 @@ pub fn hexdump(mut reader: Box, length: usize) { } } } - -#[cfg(test)] -mod tests { - use super::{dump_to_chr, dump_to_hex}; - - #[test] - fn dump_to_chr_test() { - let mut buf = [0; 1]; - assert_eq!("\u{1b}[38;5;8m.\u{1b}[39m", dump_to_chr(&mut buf[0..1])); - } - - #[test] - fn dump_to_hex_test() { - let mut buf = [0; 1]; - assert_eq!( - "\u{1b}[38;5;8m00\u{1b}[39m ", - dump_to_hex(&mut buf[0..1]) - ); - } -}