test

package
v0.0.0-...-c450bf1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// None はテストが開始されていない状態
	None = 1 + iota
	// Waiting はテスト開始を待機している状態
	Waiting
	// Executing はテスト実行中の状態
	Executing
)

Variables

This section is empty.

Functions

func LoopFSEvent

func LoopFSEvent(c *Context)

LoopFSEvent はファイル監視イベントを処理するループ

func LoopTest

func LoopTest(c *Context)

LoopTest はテストを実行するループ

Types

type Config

type Config struct {
	// Dir は監視対象のディレクトリパス
	Dir string
	// Args は go test に渡す引数
	Args []string
	// Recursive はサブディレクトリを監視するかどうか
	Recursive bool
}

Config はWatcherの設定を保持する

func NewConfig

func NewConfig(c *cli.Context) (*Config, error)

NewConfig は設定情報を生成する

func (*Config) Show

func (c *Config) Show()

Show はコンフィグの情報を表示する

type Context

type Context struct {
	Config      *Config
	Watcher     *notify.Watcher
	Directories []string
	Changed     *file.PairMap
	State       int
	Triggered   bool
	Done        chan error
}

Context はテスト実行時の情報を保持する

func NewContext

func NewContext(config *Config) (*Context, error)

NewContext はコンフィグから実行情報を生成する

Jump to

Keyboard shortcuts

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