github.com/prysmaticlabs/prysm@v1.4.4/shared/rand/rand_test.go (about) 1 package rand 2 3 import ( 4 "math/rand" 5 "testing" 6 ) 7 8 func TestNewGenerator(t *testing.T) { 9 // Make sure that generation works, no panics. 10 randGen := NewGenerator() 11 _ = randGen.Int63() 12 _ = randGen.Uint64() 13 _ = randGen.Intn(32) 14 var _ = rand.Source64(randGen) 15 } 16 17 func TestNewDeterministicGenerator(t *testing.T) { 18 // Make sure that generation works, no panics. 19 randGen := NewDeterministicGenerator() 20 _ = randGen.Int63() 21 _ = randGen.Uint64() 22 _ = randGen.Intn(32) 23 var _ = rand.Source64(randGen) 24 }