MainCaseTest

package
v0.0.0-...-63b2ac5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

func RegisterMain

func RegisterMain(test IMyMainTester)

Types

type BootArgs

type BootArgs struct {
	// contains filtered or unexported fields
}

----------start----------BootArgs impl IMyMainArgser----------start----------

func (*BootArgs) SetParseFlagFunc

func (receiver *BootArgs) SetParseFlagFunc(flagDefine func(flag *flag.FlagSet))

type DefaultCaseMain

type DefaultCaseMain struct {
	BootArgs
	// contains filtered or unexported fields
}

func (*DefaultCaseMain) Describe

func (receiver *DefaultCaseMain) Describe() string

func (*DefaultCaseMain) MainTest

func (receiver *DefaultCaseMain) MainTest()

func (*DefaultCaseMain) Name

func (receiver *DefaultCaseMain) Name() string

type FlagByteValue

type FlagByteValue byte

----------start----------自定义参数类型----------start----------

func NewFlagByteValue

func NewFlagByteValue(defvalue byte, pointvalue *byte) *FlagByteValue

func (*FlagByteValue) Set

func (bv *FlagByteValue) Set(val string) error

func (*FlagByteValue) String

func (bv *FlagByteValue) String() string

type IMyMainArgser

type IMyMainArgser interface {
	SetParseFlagFunc(func(flag *flag.FlagSet))
	// contains filtered or unexported methods
}

----------start----------Test Case Interface----------start----------

type IMyMainTester

type IMyMainTester interface {
	IMyMainArgser
	IRegisterTestCase
}

func NewDefaultHelloMain

func NewDefaultHelloMain() IMyMainTester

func NewMainTest

func NewMainTest(name, describe string, execFunc func()) IMyMainTester

func NewMainTestDefine

func NewMainTestDefine(name, describe string, execFunc func(), flagDefine func(flag *flag.FlagSet)) IMyMainTester

func NewMainTestInterface

func NewMainTestInterface(name, describe string, testCase MainTestCaser) IMyMainTester

func TryGetTestCase

func TryGetTestCase(args *MainArgs) IMyMainTester

type IRegisterTestCase

type IRegisterTestCase interface {
	/*
		测试程序入口
	*/
	MainTest()

	/*
		测试模块名称
	*/
	Name() string
	/*
		测试模块描述
	*/
	Describe() string
}

type MainArgs

type MainArgs struct {
	// contains filtered or unexported fields
}

----------start----------Main Args----------start----------

type MainTestCaser

type MainTestCaser interface {
	ExecFunc() func()
	FlagDefine() func(xflag *flag.FlagSet)
}

type RegexInfo

type RegexInfo struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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