You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
325 B

  1. package errors
  2. import (
  3. "errors"
  4. "testing"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestErrorHeight(t *testing.T) {
  8. e1 := ErrHeightMismatch(2, 3)
  9. e1.Error()
  10. assert.True(t, IsHeightMismatchErr(e1))
  11. e2 := errors.New("foobar")
  12. assert.False(t, IsHeightMismatchErr(e2))
  13. assert.False(t, IsHeightMismatchErr(nil))
  14. }