1package plugin
2
3import (
4	"errors"
5	"testing"
6)
7
8func TestBasicError_ImplementsError(t *testing.T) {
9	var _ error = new(BasicError)
10}
11
12func TestBasicError_MatchesMessage(t *testing.T) {
13	err := errors.New("foo")
14	wrapped := NewBasicError(err)
15
16	if wrapped.Error() != err.Error() {
17		t.Fatalf("bad: %#v", wrapped.Error())
18	}
19}
20
21func TestNewBasicError_nil(t *testing.T) {
22	r := NewBasicError(nil)
23	if r != nil {
24		t.Fatalf("bad: %#v", r)
25	}
26}
27