diff --git a/vlib/rand/random_numbers_test.v b/vlib/rand/random_numbers_test.v index 6d6e5506ad..c63f8e9010 100644 --- a/vlib/rand/random_numbers_test.v +++ b/vlib/rand/random_numbers_test.v @@ -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 +}