rand: add test for rand.uuid_v4()
parent
bba0edf9a3
commit
c429fa7e27
|
@ -175,3 +175,15 @@ fn test_rand_f64_in_range() {
|
|||
assert value < max
|
||||
}
|
||||
}
|
||||
|
||||
fn test_rand_uuid_v4() {
|
||||
uuid1 := rand.uuid_v4()
|
||||
uuid2 := rand.uuid_v4()
|
||||
uuid3 := rand.uuid_v4()
|
||||
assert uuid1 != uuid2
|
||||
assert uuid1 != uuid3
|
||||
assert uuid2 != uuid3
|
||||
assert uuid1.len == 36
|
||||
assert uuid2.len == 36
|
||||
assert uuid3.len == 36
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue