cosmos-sdk/collections/values_test.go
testinginprod fca24b6687
feat(collections): Initialise core (Prefix, KeyEncoder, ValueEncoder, Map) (#14134)
Co-authored-by: testinginprod <testinginprod@somewhere.idk>
Co-authored-by: Aaron Craelius <aaron@regen.network>
2022-12-08 15:57:21 +00:00

19 lines
344 B
Go

package collections
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestUint64Value(t *testing.T) {
t.Run("bijective", func(t *testing.T) {
checkValueCodec(t, Uint64Value, 555)
})
t.Run("invalid size", func(t *testing.T) {
_, err := Uint64Value.Decode([]byte{0x1, 0x2})
require.ErrorIs(t, err, ErrEncoding)
})
}