utils

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2024 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertMissingSerializationInterfacesFor

func AssertMissingSerializationInterfacesFor[T any](t *testing.T, missingSerializers []string)

func AssertNotSamePointer

func AssertNotSamePointer(t *testing.T, expected, actual any)

func AssertSerializationInterfacesFor

func AssertSerializationInterfacesFor[T any](t *testing.T, idx int, tC TestCase, cfg TestConfig, serializers []string)

func Must

func Must[T any](a T, v any) T

func ToPointer

func ToPointer[T any](v T) *T

Types

type Expected

type Expected struct {
	AsSerialized string
	IsInvalid    bool
}

type TestCase

type TestCase struct {
	From     string
	Enum     any
	Expected Expected
}

type TestConfig

type TestConfig struct {
	SupportUndefined bool
	HasDefault       bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL