(given_cp: char)
| 159 | #[test] |
| 160 | fn prop_roundtrip() { |
| 161 | fn p(given_cp: char) -> bool { |
| 162 | let mut tmp = [0; 4]; |
| 163 | let encoded_len = given_cp.encode_utf8(&mut tmp).len(); |
| 164 | let (got_cp, got_len) = decode_utf8(&tmp[..encoded_len]).unwrap(); |
| 165 | encoded_len == got_len && given_cp == got_cp |
| 166 | } |
| 167 | quickcheck(p as fn(char) -> bool) |
| 168 | } |
| 169 |
nothing calls this directly
no test coverage detected