1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#![no_std]
mod category;
mod tables;
pub use category::get_general_category;
pub use tables::GeneralCategory;
pub const UNICODE_VERSION: (u64, u64, u64) = (15, 0, 0);
#[cfg(test)]
mod test {
use super::{get_general_category, GeneralCategory};
#[test]
fn test_get_category() {
assert_eq!(get_general_category('a'), GeneralCategory::LowercaseLetter);
assert_eq!(get_general_category('.'), GeneralCategory::OtherPunctuation);
assert_eq!(get_general_category('カ'), GeneralCategory::OtherLetter);
assert_eq!(get_general_category('🦳'), GeneralCategory::OtherSymbol);
}
}