(f *testing.F)
| 8 | ) |
| 9 | |
| 10 | func FuzzFieldReduceOnce8(f *testing.F) { |
| 11 | var z uint32 |
| 12 | f.Add(z, z, z, z, z, z, z, z) |
| 13 | f.Fuzz(func(t *testing.T, a0, a1, a2, a3, a4, a5, a6, a7 uint32) { |
| 14 | in := [8]uint32{a0, a1, a2, a3, a4, a5, a6, a7} |
| 15 | exp := [8]FieldElement{} |
| 16 | |
| 17 | for i := range in { |
| 18 | exp[i] = FieldReduceOnce(in[i]) |
| 19 | } |
| 20 | |
| 21 | in8 := Uint32x8FromArray(in) |
| 22 | got8 := FieldReduceOnce8(in8) |
| 23 | got := FieldElement8AsArray(got8) |
| 24 | |
| 25 | if exp != got { |
| 26 | t.Fatalf("wrong result in:%v exp:%v got:%v", in, exp, got) |
| 27 | } |
| 28 | }) |
| 29 | } |
| 30 | |
| 31 | func FuzzFieldReduceOnceRef(f *testing.F) { |
| 32 | var z uint32 |
nothing calls this directly
no test coverage detected