cosmos-sdk/fuzz/tests/tendermint_amino_decodetime_test.go
ipangpang 1bd4351241
style: remove redundant import alias (#20109)
Signed-off-by: ipangpang <arronipangpang@gmail.com>
2024-04-21 19:03:43 +00:00

26 lines
368 B
Go

//go:build gofuzz || go1.18
package tests
import (
"fmt"
"testing"
"github.com/tendermint/go-amino"
)
func FuzzTendermintAminoDecodeTime(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) {
if len(data) == 0 {
return
}
_, n, err := amino.DecodeTime(data)
if err != nil {
return
}
if n < 0 {
panic(fmt.Sprintf("n=%d < 0", n))
}
})
}