rand: add test for rand.uuid_v4()

pull/5965/head
Delyan Angelov 2020-07-24 14:01:48 +03:00
parent bba0edf9a3
commit c429fa7e27
1 changed files with 12 additions and 0 deletions

View File

@ -175,3 +175,15 @@ fn test_rand_f64_in_range() {
assert value < max 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
}