use based64::{assert_valid_character_table, STANDARD_TABLE, URL_TABLE}; #[test] fn should_correctly_assert_valid_character_table() { assert!(assert_valid_character_table(STANDARD_TABLE)); assert!(assert_valid_character_table(URL_TABLE)); assert!(assert_valid_character_table(b"\rBCDEFGHIJLKMNOPQRSTUVWXYZabcdefghijlkmnopqrstuvwxyz0123456789-_")); assert!(!assert_valid_character_table(b"BCDEFGHIJLKMNOPQRSTUVWXYZabcdefghijlkmnopqrstuvwxyz01=23456789-_")); assert!(!assert_valid_character_table(b"BCDEFGHIJLKMNOPQRSTUVWXYZabcdefghijlkmnopqrstuvwxyz0123456789-_=")); assert!(!assert_valid_character_table(b"BC\xE3\x82\x8D\xE3\x82\x8AFGHIJLKMNOPQRSTUVWXYZabcdefghijlkmnopqrstuvwxyz012345678")); }