jldb/lib/errs/error_test.go

27 lines
322 B
Go
Raw Permalink Normal View History

2023-10-13 09:43:27 +00:00
package errs
import (
"bytes"
"reflect"
"testing"
)
func TestError_Simple(t *testing.T) {
e := Archived
b := &bytes.Buffer{}
if err := e.Write(b); err != nil {
t.Fatal(err)
}
e2 := &Error{}
if err := e2.Read(b); err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(*e, *e2) {
t.Fatal("not equal")
}
}