Commit Graph

12 Commits (b578e60dd52dfb3252ecb83b7855de90b3569e15)

Author SHA1 Message Date
Henrixounez 5086fd537c
checker: prompt error on implicit int overflow by literal (#6410) 2020-09-20 16:29:01 +02:00
penguindark 7d52d612ce
rand: add rand.ulid() (#5979)
* removed debug println

* added newline to the end of the file

* time: add .unix_time_milli() method; rand,time: add tests

* rand: add more ulid tests; move tests to a separate file random_identifiers_test.v

* run vfmt over vlib/rand/random_identifiers_test.v

* speed up time.unix_time_milli

* simplify and speedup time.unix_time/0 and time.new_time/1

* update comment about rand.ulid()

* fix terminating 0 off by 1 issue in rand.ulid()

* optimize time.new_time()

* restore the master version of vlib/time/parse.v

* make test_unix_time more robust

Co-authored-by: Delyan Angelov <delian66@gmail.com>
2020-07-26 13:10:56 +03:00
Delyan Angelov 289974dd15 rand: use time microseconds too in default rand initialization; generate proper uuid_v4 2020-07-24 14:33:58 +03:00
Delyan Angelov c429fa7e27 rand: add test for rand.uuid_v4() 2020-07-24 14:01:48 +03:00
Hungry Blue Dev e649cf84e3
rand: reorganize: phase 2 2020-06-09 15:06:07 +02:00
Enzo Baldisserri 11b7b97311
parser: fail when assigning to _ with := 2020-06-08 00:47:04 +02:00
ka-weihe 13c68eb81e
rand: fix warnings 2020-06-02 06:39:38 +02:00
Hungry Blue Dev a7c84834f4
rand: reorganize (step 1) 2020-06-01 21:13:56 +02:00
Hungry Blue Dev e89ae7e194
rand: refactor rand.v and random_numbers_test.v 2020-05-28 02:16:17 +03:00
Larpon 8c753ddf8d
rand: add random functions for f32 and f64, [0,max] and [min,max] versions 2020-05-27 16:41:37 +03:00
Enzo Baldisserri 682838a0cf
checker: check array and fields mutability 2020-04-27 22:53:26 +02:00
Delyan Angelov 8e06f4e519 tests: rename vlib/rand/rand_test.v to random_numbers_test.v to fix sporadic CI fails 2020-04-08 03:04:04 +03:00