Files
advent-of-code-2021/utils/testing/assert.go
T

17 lines
360 B
Go
Raw Normal View History

2021-12-01 15:31:51 -05:00
package assert
import "testing"
2021-12-03 11:56:22 -05:00
func IsTrue(t *testing.T, expr bool, message string) {
if expr != true {
t.Logf("Expected true but got false: %s", message)
t.Fail()
}
}
2021-12-01 15:31:51 -05:00
func StrEquals(t *testing.T, actual, expected, message string) {
if actual != expected {
t.Logf("Expected value '%s' but got '%s': %s", expected, actual, message)
t.Fail()
}
}