Copy certifiers from light-client

This commit is contained in:
Ethan Frey
2017-10-24 12:34:36 +02:00
parent 775e100d2c
commit b4fd6e876e
22 changed files with 2258 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package errors
import (
"errors"
"testing"
"github.com/stretchr/testify/assert"
)
func TestErrorHeight(t *testing.T) {
e1 := ErrHeightMismatch(2, 3)
e1.Error()
assert.True(t, IsHeightMismatchErr(e1))
e2 := errors.New("foobar")
assert.False(t, IsHeightMismatchErr(e2))
assert.False(t, IsHeightMismatchErr(nil))
}