1 //! Extracted from the unicode-xid exhaustive test all_valid_chars_do_not_panic_for_is_xid_continue
3 use unicode_xid::UnicodeXID;
5 /// A `char` in Rust is a Unicode Scalar Value
7 /// See: http://www.unicode.org/glossary/#unicode_scalar_value
8 fn all_valid_chars() -> impl Iterator<Item = char> {
9 (0u32..=0xD7FF).chain(0xE000u32..=0x10FFFF).map(|u| {
10 core::convert::TryFrom::try_from(u)
11 .expect("The selected range should be infallible if the docs match impl")
16 // Take only the first few chars because we don't want to wait all day
17 for c in all_valid_chars().take(1_500) {
18 let _ = UnicodeXID::is_xid_continue(c);