Documentation
¶
Index ¶
- func AssertArray(handler *Handler)
- func AssertFloat(handler *Handler)
- func AssertMap(handler *Handler)
- func AssertStruct(handler *Handler)
- func DefaultAssertEqual(handler *Handler)
- func GetAssertArrayRange(start *int, end *int) func(*Handler)
- func NewAssertConfig() *assertConfig
- func NewTestHelper(t *testing.T) *testHelper
- type AssertError
- type Handler
- type IEqual
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertArray ¶
func AssertArray(handler *Handler)
func AssertFloat ¶
func AssertFloat(handler *Handler)
func AssertStruct ¶
func AssertStruct(handler *Handler)
func DefaultAssertEqual ¶
func DefaultAssertEqual(handler *Handler)
func GetAssertArrayRange ¶
func NewAssertConfig ¶
func NewAssertConfig() *assertConfig
Types ¶
type AssertError ¶
type AssertError struct {
// contains filtered or unexported fields
}
AssertError 断言错误
func (*AssertError) String ¶
func (err *AssertError) String() string
type Handler ¶
type Handler struct { FullExpect interface{} FullActual interface{} FieldName string Expect interface{} Actual interface{} Ev reflect.Value Av reflect.Value // contains filtered or unexported fields }
测试过程中用来表示一个测试对象
func (*Handler) AssertWithError ¶
func (h *Handler) AssertWithError() (err interface{})
func (*Handler) ChangeValue ¶
func (h *Handler) ChangeValue(expect, actual interface{})
Click to show internal directories.
Click to hide internal directories.