21 lines
441 B
Rust
21 lines
441 B
Rust
#[cfg(test)]
|
|
mod uuid_test {
|
|
#[test]
|
|
fn gen_uuid() {
|
|
let uuid = rs_toolbox::serial_code::uuid::new();
|
|
println!("{}", uuid);
|
|
}
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod short_uuid_test {
|
|
#[test]
|
|
fn gen_short() {
|
|
let short_uuid = rs_toolbox::serial_code::short_uuid::new(10);
|
|
println!("{}", short_uuid);
|
|
if short_uuid.len() != 10 {
|
|
panic!("short_uuid length is not enough");
|
|
}
|
|
}
|
|
}
|