frostfs-node/pkg/core/object/headers/enum_test.go
Stanislav Bogatyrev b7b5079934 Add Inner Ring code
2020-07-24 17:07:37 +03:00

34 lines
670 B
Go

package headers
import (
"testing"
"github.com/nspcc-dev/neofs-node/pkg/core/object"
"github.com/stretchr/testify/require"
)
func TestSupportedType(t *testing.T) {
for _, typ := range []Type{
TypeLink,
TypeUser,
TypeTransform,
TypeTombstone,
TypeSessionToken,
TypeHomomorphicHash,
TypePayloadChecksum,
TypeIntegrity,
TypeStorageGroup,
TypePublicKey,
} {
require.True(t, SupportedType(typ))
}
for _, typ := range []Type{
lowerUndefined,
upperUndefined,
object.TypeFromUint32(object.TypeToUint32(lowerUndefined) - 1),
object.TypeFromUint32(object.TypeToUint32(upperUndefined) + 1),
} {
require.False(t, SupportedType(typ))
}
}