1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

rand: add test for rand.uuid_v4()

This commit is contained in:
Delyan Angelov 2020-07-24 14:01:48 +03:00
parent bba0edf9a3
commit c429fa7e27

View File

@ -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
}