forked from TrueCloudLab/frostfs-node
Add Inner Ring code
This commit is contained in:
parent
dadfd90dcd
commit
b7b5079934
400 changed files with 11420 additions and 8690 deletions
28
pkg/core/netmap/epoch/math_test.go
Normal file
28
pkg/core/netmap/epoch/math_test.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package epoch
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestEpochMath(t *testing.T) {
|
||||
items := []struct {
|
||||
mathFn func(Epoch, Epoch) Epoch
|
||||
|
||||
a, b, c uint64
|
||||
}{
|
||||
{
|
||||
mathFn: Sum, a: 1, b: 2, c: 3},
|
||||
}
|
||||
|
||||
for _, item := range items {
|
||||
require.Equal(t,
|
||||
item.mathFn(
|
||||
FromUint64(item.a),
|
||||
FromUint64(item.b),
|
||||
),
|
||||
FromUint64(item.c),
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue