mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-15 14:38:20 +00:00
1835f54197
* Refactor for DRY state getters_validator_test and getters_test * Add BUILD.bazel to beacon-chain/state/testing * Handle type assertion error in beacon-chain/state tests * Fix with gazelle Co-authored-by: Nishant Das <nishdas93@gmail.com>
19 lines
572 B
Go
19 lines
572 B
Go
package v1_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/state"
|
|
v1 "github.com/prysmaticlabs/prysm/beacon-chain/state/state-native/v1"
|
|
testtmpl "github.com/prysmaticlabs/prysm/beacon-chain/state/testing"
|
|
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
|
)
|
|
|
|
func TestBeaconState_ValidatorAtIndexReadOnly_HandlesNilSlice(t *testing.T) {
|
|
testtmpl.VerifyBeaconState_ValidatorAtIndexReadOnly_HandlesNilSlice(t, func() (state.BeaconState, error) {
|
|
return v1.InitializeFromProtoUnsafe(ðpb.BeaconState{
|
|
Validators: nil,
|
|
})
|
|
})
|
|
}
|