mock

package
v0.0.0-...-77f7900 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(hasError bool, err error) func(*testing.T)

Error tests a returned error value against an expected

Types

type Crosser

type Crosser struct{ Called, HasError bool }

func (*Crosser) Cross

func (m *Crosser) Cross(...evo.Genome) (evo.Genome, error)

type Evaluator

type Evaluator struct{ Called, HasError bool }

func (*Evaluator) Evaluate

func (m *Evaluator) Evaluate(p evo.Phenome) (evo.Result, error)

type Experiment

type Experiment struct {
	Crosser
	Mutator
	Populator
	Searcher
	Selector
	Speciator
	Transcriber
	Translator
	// contains filtered or unexported fields
}

func (*Experiment) Subscribers

func (m *Experiment) Subscribers() []evo.Subscription

type Mutator

type Mutator struct{ Called, HasError bool }

func (*Mutator) Mutate

func (m *Mutator) Mutate(*evo.Genome) error

type Populator

type Populator struct {
	Called, HasError bool
	PopSize          int
	LastGID          int64
}

func (*Populator) Populate

func (m *Populator) Populate() (evo.Population, error)

type Searcher

type Searcher struct{ Called, HasError bool }

func (*Searcher) Search

func (m *Searcher) Search(evo.Evaluator, []evo.Phenome) ([]evo.Result, error)

type Seeder

type Seeder struct{ Called, HasError bool }

func (*Seeder) Seed

func (m *Seeder) Seed() (evo.Genome, error)

type Selector

type Selector struct{ Called, HasError bool }

func (*Selector) Select

func (m *Selector) Select(evo.Population) ([]evo.Genome, [][]evo.Genome, error)

type Speciator

type Speciator struct{ Called, ErrorOn int }

func (*Speciator) Speciate

func (m *Speciator) Speciate(*evo.Population) error

type Transcriber

type Transcriber struct{ Called, HasError bool }

func (*Transcriber) Transcribe

func (m *Transcriber) Transcribe(evo.Substrate) (evo.Substrate, error)

type Translator

type Translator struct{ Called, HasError bool }

func (*Translator) Translate

func (m *Translator) Translate(evo.Substrate) (evo.Network, error)

Jump to

Keyboard shortcuts

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