testcase

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONDeserializationSucceeds

type JSONDeserializationSucceeds[Entity any] string

JSONDeserializationSucceeds is a simple testcase that just tests that a given string can be JSON-deserialized into an entity type.

func (JSONDeserializationSucceeds[Entity]) Run

func (tc JSONDeserializationSucceeds[Entity]) Run(t *testing.T)

Run tests whether deserializing the raw string represented by this testcase into a pointer to a value of type Entity succeeds.

type Map

type Map[TC Testcase] map[string]TC

Map contains testcases. It maps names of subtests to testcases.

func (Map[TC]) Run

func (m Map[TC]) Run(t *testing.T)

Run runs all the tests contained in m as subtests.

type Testcase

type Testcase interface {
	// Run execute the testcase.
	Run(t *testing.T)
}

Testcase represents any testcase.

Jump to

Keyboard shortcuts

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