mirror of
https://github.com/awnumar/memguard.git
synced 2026-02-06 17:59:49 +00:00
19 lines
329 B
Go
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")
|
|
}
|
|
}
|
|
}
|