mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-24 20:37:17 +00:00
26 lines
588 B
Go
26 lines
588 B
Go
|
package store
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
||
|
"github.com/prysmaticlabs/prysm/testing/require"
|
||
|
)
|
||
|
|
||
|
func TestNew(t *testing.T) {
|
||
|
j := ðpb.Checkpoint{
|
||
|
Epoch: 0,
|
||
|
Root: []byte("hi"),
|
||
|
}
|
||
|
f := ðpb.Checkpoint{
|
||
|
Epoch: 0,
|
||
|
Root: []byte("hello"),
|
||
|
}
|
||
|
s := New(j, f)
|
||
|
require.DeepSSZEqual(t, s.JustifiedCheckpt(), j)
|
||
|
require.DeepSSZEqual(t, s.BestJustifiedCheckpt(), j)
|
||
|
require.DeepSSZEqual(t, s.PrevJustifiedCheckpt(), j)
|
||
|
require.DeepSSZEqual(t, s.FinalizedCheckpt(), f)
|
||
|
require.DeepSSZEqual(t, s.PrevFinalizedCheckpt(), f)
|
||
|
}
|