kubernetes/staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/cbor_test.go

func TestRecognizesData(t *testing.T) {}

type stubWriter

func (w stubWriter) Write([]byte) (int, error) {}

type anyObject

func (p anyObject) GetObjectKind() schema.ObjectKind {}

func (anyObject) DeepCopyObject() runtime.Object {}

func (p anyObject) MarshalCBOR() ([]byte, error) {}

func (p *anyObject) UnmarshalCBOR(in []byte) error {}

type structWithRawFields

func (structWithRawFields) GetObjectKind() schema.ObjectKind {}

func (structWithRawFields) DeepCopyObject() runtime.Object {}

type structWithEmbeddedMetas

func (structWithEmbeddedMetas) DeepCopyObject() runtime.Object {}

func TestEncode(t *testing.T) {}

func TestDecode(t *testing.T) {}

type textMarshalerObject

func (p textMarshalerObject) GetObjectKind() schema.ObjectKind {}

func (textMarshalerObject) DeepCopyObject() runtime.Object {}

func (textMarshalerObject) MarshalText() ([]byte, error) {}

func TestMetaFactoryInterpret(t *testing.T) {}

type stubTyper

func (t stubTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) {}

func (stubTyper) Recognizes(schema.GroupVersionKind) bool {}

type stubCreater

func (c stubCreater) New(gvk schema.GroupVersionKind) (runtime.Object, error) {}

type notRegisteredTyper

func (notRegisteredTyper) ObjectKinds(obj runtime.Object) ([]schema.GroupVersionKind, bool, error) {}

func (notRegisteredTyper) Recognizes(schema.GroupVersionKind) bool {}

type stubMetaFactory

func (mf stubMetaFactory) Interpret([]byte) (*schema.GroupVersionKind, error) {}

type oneMapField

func (o oneMapField) DeepCopyObject() runtime.Object {}

func (o oneMapField) GetObjectKind() schema.ObjectKind {}

type eightStringFields

func (o eightStringFields) DeepCopyObject() runtime.Object {}

func (o eightStringFields) GetObjectKind() schema.ObjectKind {}

// TestEncodeNondeterministic tests that repeated encodings of multi-field structs and maps do not
// encode to precisely the same bytes when repeatedly encoded with EncodeNondeterministic. When
// using EncodeNondeterministic, the order of items in CBOR maps should be intentionally shuffled to
// prevent applications from inadvertently depending on encoding determinism. All permutations do
// not necessarily have equal probability.
func TestEncodeNondeterministic(t *testing.T) {}