assert

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2015 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-assert Build Status

Asserts to Go testing

View the docs.

Installation

$ go get github.com/frozzare/go-assert

Example

package mypack

import (
  "testing"
  "github.com/frozzare/go-assert"
)

func TestName(t *testing.T) {
  assert.Equal(t, "Foo", "Foo")
}

License

MIT © Fredrik Forsmo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(t *testing.T, expected, actual interface{})

Equal will test if the expected and actual value is the same match.

func Fail

func Fail(t *testing.T, expected, actual interface{})

Fail will print a failing message to the terminal.

func False

func False(t *testing.T, actual bool)

False will test the actual value and see if it's false or not.

func Nil

func Nil(t *testing.T, actual interface{}, args ...interface{})

Nil will test the actual value and see if it's nil or not.

func NotEqual

func NotEqual(t *testing.T, expected, actual interface{})

NotEqual will test if the expected and actual value is not a match.

func NotNil

func NotNil(t *testing.T, actual interface{})

NotNil test check if the actual value is not nil.

func True

func True(t *testing.T, actual bool)

True will test the actual value and see if it's true or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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