From 83c3b9732f299b11d7b022014994f428f4be2f5c Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 30 Apr 2017 00:35:59 +0200 Subject: Add sig pkg --- sig/sig_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sig/sig_test.go (limited to 'sig/sig_test.go') diff --git a/sig/sig_test.go b/sig/sig_test.go new file mode 100644 index 0000000..06be3c0 --- /dev/null +++ b/sig/sig_test.go @@ -0,0 +1,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) + } +} -- cgit v1.2.3