fspl/errors/test-common.go

17 lines
377 B
Go

package errors
import "testing"
import "git.tebibyte.media/sashakoshka/fspl/testcommon"
func testString (test *testing.T, correct string, got string) {
if got != correct {
test.Logf("results do not match")
test.Fail()
}
testcommon.Compare(test, correct, got)
}
func testError (test *testing.T, correct string, err *Error) {
testString(test, correct, err.Format())
}