packer-cn/vendor/github.com/approvals/go-approval-tests/utils/testing_utils.go

12 lines
281 B
Go
Raw Normal View History

2016-07-11 18:08:28 -04:00
package utils
import "testing"
// AssertEqual Example:
// AssertEqual(t, 10, number, "number")
func AssertEqual(t *testing.T, expected, actual interface{}, message string) {
if expected != actual {
t.Fatalf(message+"\n[expected != actual]\n[%s != %s]", expected, actual)
}
}