Co-authored-by: testinginprod <testinginprod@somewhere.idk> Co-authored-by: Aaron Craelius <aaron@regen.network>
19 lines
344 B
Go
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)
|
|
})
|
|
}
|