1use const_macros::{const_assert_eq, const_assert_ne};
12
13pub const LENGTH: usize = 66;
15
16const_assert_ne!(LENGTH, 0);
18
19#[rustfmt::skip]
21pub const CHARS: [char; LENGTH] = [
22 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
24 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
25 'U', 'V', 'W', 'X', 'Y', 'Z',
26 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
28 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
29 'u', 'v', 'w', 'x', 'y', 'z',
30 '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
32 '-', '.', '_', '~',
34];
35
36pub const STRING: &str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~";
38
39const_assert_eq!(STRING.len(), LENGTH);
40
41#[cfg(test)]
42mod tests {
43 use crate::check::{
44 bytes::is_valid,
45 chars::{CHARS, STRING},
46 };
47
48 #[test]
49 fn equality() {
50 let string: String = CHARS.into_iter().collect();
51
52 assert_eq!(string, STRING);
53 }
54
55 #[test]
56 fn validity() {
57 assert!(STRING.bytes().all(is_valid));
58 }
59}