github.com/prysmaticlabs/prysm@v1.4.4/beacon-chain/state/stateutil/validator_root_test.go (about) 1 package stateutil 2 3 import ( 4 "testing" 5 6 ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1" 7 "github.com/prysmaticlabs/prysm/shared/testutil/assert" 8 ) 9 10 func Test_handleValidatorSlice_OutOfRange(t *testing.T) { 11 vals := make([]*ethpb.Validator, 1) 12 indices := []uint64{3} 13 _, err := HandleValidatorSlice(vals, indices, false) 14 assert.ErrorContains(t, "index 3 greater than number of validators 1", err) 15 }