22 lines
349 B
Go
22 lines
349 B
Go
package assert
|
|
|
|
// True asserts that the given value is true
|
|
func True(t test, value bool) {
|
|
if value {
|
|
return
|
|
}
|
|
|
|
t.Errorf(formatMessage("True", true, value))
|
|
t.FailNow()
|
|
}
|
|
|
|
// False asserts that the given value is false
|
|
func False(t test, value bool) {
|
|
if !value {
|
|
return
|
|
}
|
|
|
|
t.Errorf(formatMessage("False", false, value))
|
|
t.FailNow()
|
|
}
|