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:
@ -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
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user