forked from TrueCloudLab/frostfs-node
21 lines
252 B
Go
21 lines
252 B
Go
|
package epoch
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestEpochMarshal(t *testing.T) {
|
||
|
e := FromUint64(1)
|
||
|
e2 := new(Epoch)
|
||
|
|
||
|
require.NoError(t,
|
||
|
e2.UnmarshalBinary(
|
||
|
Marshal(e),
|
||
|
),
|
||
|
)
|
||
|
|
||
|
require.True(t, EQ(e, *e2))
|
||
|
}
|