Skip to content

go-zoox/testify

Repository files navigation

Testify - a simple test enhancement library

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get github.com/go-zoox/testify

Getting Started

import (
  "testing"
  "github.com/go-zoox/testify"
)

func TestSomething(t *testing.T) {
  // assert ok
  testify.Assert(t, true, "this should be true")

  // equality
  testify.Equal(t, 123, 123, "they should be equal")

  // inequality
  testify.NotEqual(t, 123, 456, "they should not be equal")

  // enums
  testify.Enums(t, []string{"foo", "bar", "baz", "qux"}, "quux", "quux should be in the list")

  // type
  testify.Type(t, 123, "int", "they should be the same type")

  // range
  testify.Range(t, 0, 123, 100, "100 should be in the range")
}

License

GoZoox is released under the MIT License.

About

Testing Enhancement Tools

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages