Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.
/ go-testutil Public archive

Package provides utilities for go code testing, powered by cmp

License

Notifications You must be signed in to change notification settings

avakarev/go-testutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

testutil

Utilities around cmp to help testing go code

NOTE: deprecated, merged into https://github.com/avakarev/go-util

Scheduled for deletion after 2023-09-01

Install

go get github.com/avakarev/go-testutil

Usage

package hello_test

import (
	"fmt"
	"testing"

	"github.com/avakarev/go-testutil"
)

func Hello() (string, error) {
	return "Hello World", nil
}

func TestHello(t *testing.T) {
	s, err := Hello()
	testutil.MustNoErr(err, t)
	testutil.Diff("Hello World", s, t)
}

License

go-testutil is licensed under MIT license. (see LICENSE)

About

Package provides utilities for go code testing, powered by cmp

Resources

License

Stars

Watchers

Forks

Packages

No packages published