1 use super::*; 2 3 #[test] 4 fn slice_debug_output() { 5 let input = unsafe { Slice::from_encoded_bytes_unchecked(b"\xF0hello,\tworld") }; 6 let expected = r#""\xF0hello,\tworld""#; 7 let output = format!("{input:?}"); 8 9 assert_eq!(output, expected); 10 } 11 12 #[test] 13 fn display() { 14 assert_eq!("Hello\u{FFFD}\u{FFFD} There\u{FFFD} Goodbye", unsafe { 15 Slice::from_encoded_bytes_unchecked(b"Hello\xC0\x80 There\xE6\x83 Goodbye").to_string() 16 },); 17 } 18