Categorygithub.com/go-zoox/testify
repositorypackage
1.0.2
Repository: https://github.com/go-zoox/testify.git
Documentation: pkg.go.dev

# README

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.