use mad_hatter::short_hex_id;

#[test]
fn test_length() {
    let id = short_hex_id();
    assert_eq!(id.len(), 6);
}

#[test]
fn test_all_hex_chars() {
    let id = short_hex_id();
    assert!(id.chars().all(|c| c.is_ascii_hexdigit()));
}

#[test]
fn test_lowercase() {
    let id = short_hex_id();
    assert!(id.chars().all(|c| !c.is_ascii_uppercase()));
}

#[test]
fn test_uniqueness() {
    let a = short_hex_id();
    let b = short_hex_id();
    assert_ne!(a, b);
}