Skip to content

go-bdd/assert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assert library Build Status Coverage Status

The aim of this project is to provide very simple and flexible assert library with as less dependencies as possible. What's the main difference comparision to other libraries is that it just return an error when the validation fails. It doesn't provide any complex error reporting.

Usage

Available assertions:

  • Equals
  • NotEquals
  • ObjectsAreEqual
  • Nil
  • NotNil

Here's an example:

package main_test

import "github.com/go-bdd/assert"

func TestEqual(t *testing.T) {
	if err := assert.Equals(1, 2); err == nil {
		t.Errorf("considered numbers should not be equal: %s", err)
	}

	if err := assert.Equals(5, 5); err != nil {
		t.Errorf("considered numbers should be equal: %s", err)
	}
}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages