mirror of
https://github.com/RussellChamp/advent-of-code-2021.git
synced 2026-10-27 21:52:32 +00:00
18 lines
360 B
Go
18 lines
360 B
Go
package assert
|
|
|
|
import "testing"
|
|
|
|
func IsTrue(t *testing.T, expr bool, message string) {
|
|
if expr != true {
|
|
t.Logf("Expected true but got false: %s", message)
|
|
t.Fail()
|
|
}
|
|
}
|
|
|
|
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()
|
|
}
|
|
}
|