()
| 214 | |
| 215 | #[test] |
| 216 | fn utf16_cols() { |
| 217 | let src = "aé😀b"; |
| 218 | // 'a'=1, 'é'=1, '😀'=2 utf16 units; bytes: a=1, é=2, 😀=4 |
| 219 | assert_eq!(utf16_len(src), 5); |
| 220 | let starts = line_starts(src); |
| 221 | assert_eq!(col16(src, &starts, 0, 1), 1); // after 'a' |
| 222 | assert_eq!(col16(src, &starts, 0, 3), 2); // after 'é' |
| 223 | assert_eq!(col16(src, &starts, 0, 7), 4); // after '😀' |
| 224 | } |
| 225 | |
| 226 | #[test] |
| 227 | fn init_sig_short_and_long() { |
nothing calls this directly
no test coverage detected