use super::LaneIdent;
#[test]
fn the_default_lane_is_the_standards_own_word() {
assert_eq!(&**LaneIdent::UND, "und");
assert_eq!(LaneIdent::new("und"), LaneIdent::UND);
}
#[test]
fn every_word_is_a_lane_key() {
for word in ["", "zh", "zh-Hant", "zh_hant", "ключ", "a b c", "!!"] {
assert_eq!(&**LaneIdent::new(word), word);
}
}
#[test]
fn a_key_is_a_str_at_the_abi() {
let key = LaneIdent::new("zh");
assert_eq!(key.as_ref() as &str, "zh");
assert_eq!(key.len(), 2, "Deref reaches str's own methods");
assert_eq!(LaneIdent::new("zh"), key);
assert_ne!(
LaneIdent::new("ZH"),
key,
"the type compares bytes; the FOLD is the gate's"
);
}