From cbae73caf35553e6d9cf72d7cf23acacbb8b0aaf Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 3 May 2021 16:08:33 -0700 Subject: [PATCH] fix test --- lib/pure/random.nim | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/lib/pure/random.nim b/lib/pure/random.nim index 330a97ae2c2db..9e28a56db1564 100644 --- a/lib/pure/random.nim +++ b/lib/pure/random.nim @@ -343,19 +343,13 @@ proc rand*[T: SomeInteger](t: typedesc[T]): T = ## * `rand proc<#rand,float>`_ that returns a floating point number ## * `rand proc<#rand,HSlice[T: Ordinal or float or float32 or float64,T: Ordinal or float or float32 or float64]>`_ ## that accepts a slice - runnableExamples("-r:off"): + runnableExamples: randomize(567) - # implementation defined - assert rand(int8) == 55 - assert rand(int8) == -42 - assert rand(int8) == 43 - assert rand(uint32) == 578980729'u32 - assert rand(uint32) == 4052940463'u32 - assert rand(uint32) == 2163872389'u32 - assert rand(range[1..16]) == 11 - assert rand(range[1..16]) == 4 - assert rand(range[1..16]) == 16 - + if false: # implementation defined + assert rand(int8) == -42 + assert rand(uint32) == 578980729'u32 + assert rand(range[1..16]) == 11 + # pending csources >= 1.4.0, use `runnableExamples("-r:off")` instead (a strang error) when T is range: result = rand(state, low(T)..high(T)) else: