ugorji / go

idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.org[Go]
MIT License
1.83k stars 294 forks source link

Tests use rand.Intn(1) for boolean rand, but always returns 0 #402

Closed HouseK closed 8 months ago

HouseK commented 9 months ago

https://github.com/ugorji/go/blob/3a08a64436874f2a5a0047f7837225cf0032c3bd/codec/codec_test.go#L2535

From golang docs: Intn returns, as an int, a non-negative pseudo-random number in the half-open interval [0,n) from the default Source. It panics if n <= 0.