memguard/core/errors_test.go
2019-08-01 21:43:56 +01:00

19 lines
329 B
Go

package core
import "testing"
func TestError(t *testing.T) {
for i := range errors {
if errors[i].s != errors[i].Error() {
t.Error("error string does not match")
}
}
}
func TestIsXError(t *testing.T) {
for i := range errors {
if !isXError(errors[i], errors[i].c) {
t.Error("error should match itself")
}
}
}