suite

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComposedOnlyIf added in v0.4.3

type ComposedOnlyIf interface {
	Flat() []OnlyIf
}

type OnlyIf added in v0.4.0

type OnlyIf interface {
	Check(scope Scope) bool
	String() string
}

func OnlyIfs added in v0.4.0

func OnlyIfs(onlyIfs ...OnlyIf) OnlyIf

type Scope

type Scope struct {
	Service  *protogen.Service
	Resource *annotations.ResourceDescriptor
	Message  *protogen.Message
}

type Suite

type Suite struct {
	Name       string
	Tests      []Test
	TestGroups []TestGroup
}

Suite contains a suite of tests for a method.

func (Suite) Enabled

func (m Suite) Enabled(scope Scope) bool

type Test

type Test struct {
	Name     string
	Doc      []string
	OnlyIf   OnlyIf
	Generate func(f *protogen.GeneratedFile, scope Scope) error
}

Test is one test in the generated code.

func (Test) Enabled

func (t Test) Enabled(scope Scope) bool

type TestGroup

type TestGroup struct {
	OnlyIf         OnlyIf
	GenerateBefore func(f *protogen.GeneratedFile, scope Scope) error
	Tests          []Test
}

TestGroup contains multiple tests in the generated code that share some setup code.

func (TestGroup) Enabled

func (tg TestGroup) Enabled(scope Scope) bool

Jump to

Keyboard shortcuts

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