Help us shape the future of Go! Take the 2026 Go Developer Survey

gotest

package module
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 2 Imported by: 0

README

gotest

Test assistant

Usage

    import (
        "testing"
        "github.com/schnack/gotest"
       )
    
    
    func TestExample(t *testing.T) {
    	// pass
    	if err := gotest.Expect(2 + 2).Eq(4); err != nil {
    		t.Error(err)
    	}
    }

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoTest

type GoTest interface {
	Eq(v interface{}) error
	Error(str string) error
	NotError() error
	Zero() error
	NotZero() error
	Nil() error
	NotNil() error
	True() error
	False() error
}

func Expect

func Expect(expect interface{}) GoTest

Jump to

Keyboard shortcuts

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