mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
b23f63a064
* v2 state initialize and semantic paths * ensure build * gaz changes to ignored build files * gaz
25 lines
754 B
Go
25 lines
754 B
Go
package v1
|
|
|
|
import (
|
|
"testing"
|
|
|
|
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
|
|
"github.com/prysmaticlabs/prysm/shared/testutil/assert"
|
|
)
|
|
|
|
func Test_handlePendingAttestation_OutOfRange(t *testing.T) {
|
|
items := make([]*pb.PendingAttestation, 1)
|
|
indices := []uint64{3}
|
|
_, err := handlePendingAttestation(items, indices, false)
|
|
assert.ErrorContains(t, "index 3 greater than number of pending attestations 1", err)
|
|
}
|
|
|
|
func Test_handleEth1DataSlice_OutOfRange(t *testing.T) {
|
|
items := make([]*ethpb.Eth1Data, 1)
|
|
indices := []uint64{3}
|
|
_, err := HandleEth1DataSlice(items, indices, false)
|
|
assert.ErrorContains(t, "index 3 greater than number of items in eth1 data slice 1", err)
|
|
|
|
}
|