Add Inner Ring code
This commit is contained in:
parent
dadfd90dcd
commit
b7b5079934
400 changed files with 11420 additions and 8690 deletions
24
pkg/core/netmap/node/options_test.go
Normal file
24
pkg/core/netmap/node/options_test.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package node
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/nspcc-dev/neofs-api-go/object"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestInfo_Price(t *testing.T) {
|
||||
var info Info
|
||||
|
||||
// too small value
|
||||
info.opts = []string{"/Price:0.01048575"}
|
||||
require.Equal(t, uint64(0), info.Price())
|
||||
|
||||
// min value
|
||||
info.opts = []string{"/Price:0.01048576"}
|
||||
require.Equal(t, uint64(1), info.Price())
|
||||
|
||||
// big value
|
||||
info.opts = []string{"/Price:1000000000.666"}
|
||||
require.Equal(t, uint64(1000000000.666*1e8/object.UnitsMB), info.Price())
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue