()
| 162 | |
| 163 | #[test] |
| 164 | fn utf16_cols() { |
| 165 | let src = "aé😀b"; |
| 166 | // 'a'=1, 'é'=1, '😀'=2 utf16 units; bytes: a=1, é=2, 😀=4 |
| 167 | assert_eq!(utf16_len(src), 5); |
| 168 | let starts = line_starts(src); |
| 169 | assert_eq!(col16(src, &starts, 0, 1), 1); // after 'a' |
| 170 | assert_eq!(col16(src, &starts, 0, 3), 2); // after 'é' |
| 171 | assert_eq!(col16(src, &starts, 0, 7), 4); // after '😀' |
| 172 | } |
| 173 | |
| 174 | #[test] |
| 175 | fn init_sig_short_and_long() { |
nothing calls this directly
no test coverage detected