github.com/xaionaro-go/rand@v0.0.0-20191005105903-aba1befc54a5/mathrand/uint32_autogenerated_test.go (about) 1 package mathrand_test 2 3 import ( 4 "testing" 5 6 "github.com/xaionaro-go/rand/mathrand" 7 ) 8 9 // This file was automatically generated by github.com/xaionaro-go/rand/internal/autogen 10 11 func TestUint32AddRotateMultiply(t *testing.T) { 12 //testUint32(t, mathrand.GlobalPRNG.Uint32AddRotateMultiply) 13 } 14 func BenchmarkUint32AddRotateMultiply(b *testing.B) { 15 prng := mathrand.New() 16 b.SetBytes(4) 17 b.ResetTimer() 18 for i := 0; i < b.N; i++ { 19 prng.Uint32AddRotateMultiply() 20 } 21 } 22 23 func TestUint32MultiplyAdd(t *testing.T) { 24 //testUint32(t, mathrand.GlobalPRNG.Uint32MultiplyAdd) 25 } 26 func BenchmarkUint32MultiplyAdd(b *testing.B) { 27 prng := mathrand.New() 28 b.SetBytes(4) 29 b.ResetTimer() 30 for i := 0; i < b.N; i++ { 31 prng.Uint32MultiplyAdd() 32 } 33 } 34 35 func TestUint32AddRotate(t *testing.T) { 36 //testUint32(t, mathrand.GlobalPRNG.Uint32AddRotate) 37 } 38 func BenchmarkUint32AddRotate(b *testing.B) { 39 prng := mathrand.New() 40 b.SetBytes(4) 41 b.ResetTimer() 42 for i := 0; i < b.N; i++ { 43 prng.Uint32AddRotate() 44 } 45 } 46 47 func TestUint32AddIfShiftXOR(t *testing.T) { 48 //testUint32(t, mathrand.GlobalPRNG.Uint32AddIfShiftXOR) 49 } 50 func BenchmarkUint32AddIfShiftXOR(b *testing.B) { 51 prng := mathrand.New() 52 b.SetBytes(4) 53 b.ResetTimer() 54 for i := 0; i < b.N; i++ { 55 prng.Uint32AddIfShiftXOR() 56 } 57 } 58 59 func TestUint32Xorshift(t *testing.T) { 60 //testUint32(t, mathrand.GlobalPRNG.Uint32Xorshift) 61 } 62 func BenchmarkUint32Xorshift(b *testing.B) { 63 prng := mathrand.New() 64 b.SetBytes(4) 65 b.ResetTimer() 66 for i := 0; i < b.N; i++ { 67 prng.Uint32Xorshift() 68 } 69 } 70 71 func TestUint32PCG(t *testing.T) { 72 //testUint32(t, mathrand.GlobalPRNG.Uint32PCG) 73 } 74 func BenchmarkUint32PCG(b *testing.B) { 75 prng := mathrand.New() 76 b.SetBytes(4) 77 b.ResetTimer() 78 for i := 0; i < b.N; i++ { 79 prng.Uint32PCG() 80 } 81 }