Fix lint
This commit is contained in:
parent
442132be70
commit
3497b53b88
@ -9,12 +9,15 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/filecoin-project/go-address"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/types/ethtypes"
|
||||
)
|
||||
|
||||
type TestCase struct {
|
||||
Input interface{}
|
||||
Output interface{}
|
||||
}
|
||||
|
||||
func TestEncode(t *testing.T) {
|
||||
testcases := []ethtypes.TestCase{
|
||||
testcases := []TestCase{
|
||||
{[]byte(""), mustDecodeHex("0x80")},
|
||||
{mustDecodeHex("0x01"), mustDecodeHex("0x01")},
|
||||
{mustDecodeHex("0xaa"), mustDecodeHex("0x81aa")},
|
||||
@ -66,7 +69,7 @@ func TestEncode(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDecodeString(t *testing.T) {
|
||||
testcases := []ethtypes.TestCase{
|
||||
testcases := []TestCase{
|
||||
{"0x00", "0x00"},
|
||||
{"0x80", "0x"},
|
||||
{"0x0f", "0x0f"},
|
||||
@ -98,7 +101,7 @@ func mustDecodeHex(s string) []byte {
|
||||
}
|
||||
|
||||
func TestDecodeList(t *testing.T) {
|
||||
testcases := []ethtypes.TestCase{
|
||||
testcases := []TestCase{
|
||||
{"0xc0", []interface{}{}},
|
||||
{"0xc100", []interface{}{[]byte{0}}},
|
||||
{"0xc3000102", []interface{}{[]byte{0}, []byte{1}, []byte{2}}},
|
||||
|
@ -1,4 +1,3 @@
|
||||
// stm: #unit
|
||||
package ethtypes
|
||||
|
||||
import (
|
||||
|
Loading…
Reference in New Issue
Block a user