mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
17 lines
349 B
Go
17 lines
349 B
Go
package kv
|
|
|
|
import (
|
|
"testing"
|
|
|
|
testpb "github.com/OffchainLabs/prysm/v7/proto/testing"
|
|
"github.com/OffchainLabs/prysm/v7/testing/require"
|
|
)
|
|
|
|
func Test_encode_handlesNilFromFunction(t *testing.T) {
|
|
foo := func() *testpb.Puzzle {
|
|
return nil
|
|
}
|
|
_, err := encode(t.Context(), foo())
|
|
require.ErrorContains(t, "cannot encode nil message", err)
|
|
}
|