mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-06 02:52:19 +00:00
fuzz example
This commit is contained in:
parent
8ca2c0cef4
commit
053b99e716
@ -13,24 +13,6 @@ import (
|
|||||||
//gotip doc testing.F.Add
|
//gotip doc testing.F.Add
|
||||||
//gotip doc testing.F.Fuzz
|
//gotip doc testing.F.Fuzz
|
||||||
|
|
||||||
//func FuzzParseQuery(f *testing.F) {
|
|
||||||
// f.Add("x=1&y=2")
|
|
||||||
// f.Fuzz(func(t *testing.T, queryStr string) {
|
|
||||||
// query, err := url.ParseQuery(queryStr)
|
|
||||||
// if err != nil {
|
|
||||||
// t.Skip()
|
|
||||||
// }
|
|
||||||
// queryStr2 := query.Encode()
|
|
||||||
// query2, err := url.ParseQuery(queryStr2)
|
|
||||||
// if err != nil {
|
|
||||||
// t.Fatalf("ParseQuery failed to decode a valid encoded query %s: %v", queryStr2, err)
|
|
||||||
// }
|
|
||||||
// if !reflect.DeepEqual(query, query2) {
|
|
||||||
// t.Errorf("ParseQuery gave different query after being encoded\nbefore: %v\nafter: %v", query, query2)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
//}
|
|
||||||
|
|
||||||
func FuzzPromoteStep(f *testing.F) {
|
func FuzzPromoteStep(f *testing.F) {
|
||||||
f.Add([]uint8{0b11111, 0b10001, 0b10101, 0b00001, 0b00000}, []uint8{0b11111, 0b10001, 0b10101, 0b00001, 0b00000}, []uint8{0b11111, 0b10001, 0b10101, 0b00001, 0b00000})
|
f.Add([]uint8{0b11111, 0b10001, 0b10101, 0b00001, 0b00000}, []uint8{0b11111, 0b10001, 0b10101, 0b00001, 0b00000}, []uint8{0b11111, 0b10001, 0b10101, 0b00001, 0b00000})
|
||||||
f.Fuzz(func(t *testing.T, s1, s2, s3 []uint8) {
|
f.Fuzz(func(t *testing.T, s1, s2, s3 []uint8) {
|
||||||
|
Loading…
Reference in New Issue
Block a user