()
| 122 | |
| 123 | #[test] |
| 124 | fn test_encode_empty_string() { |
| 125 | let encoder = &TYPE_NAME_ENCODER; |
| 126 | let decoder = &TYPE_NAME_DECODER; |
| 127 | for encoding in [ |
| 128 | Encoding::LowerSpecial, |
| 129 | Encoding::LowerUpperDigitSpecial, |
| 130 | Encoding::FirstToLowerSpecial, |
| 131 | Encoding::AllToLowerSpecial, |
| 132 | Encoding::Utf8, |
| 133 | ] { |
| 134 | let meta_string = encoder.encode_with_encoding("", encoding).unwrap(); |
| 135 | assert_eq!(meta_string.bytes.len(), 0); |
| 136 | let decoded = decoder |
| 137 | .decode(&meta_string.bytes, meta_string.encoding) |
| 138 | .unwrap(); |
| 139 | assert_eq!(decoded, meta_string); |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | #[test] |
| 144 | fn test_encode_characters_outside_of_lower_special() { |
nothing calls this directly
no test coverage detected