aboutsummaryrefslogtreecommitdiff
path: root/sig/sig_test.go
blob: 06be3c03cc244058b65fc6b5cf0994f9287f02ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package sig

import (
	"bytes"
	"testing"
)

func TestSig(t *testing.T) {
	b := &Block{
		Comment: "comment",
		Bytes:   []byte{'t', 'e', 's', 't'},
	}
	b2, err := Decode(EncodeToMemory(b))
	if err != nil {
		t.Error(err)
	}
	if b.Comment != b2.Comment || !bytes.Equal(b.Bytes, b2.Bytes) {
		t.Errorf("got %v, want %v", b2, b)
	}
}