aboutsummaryrefslogtreecommitdiff
path: root/sig/sig_test.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-04-30 00:35:59 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-04-30 00:35:59 +0200
commit83c3b9732f299b11d7b022014994f428f4be2f5c (patch)
treec8b900dc4c11c9ca3144f48a139963bc2a5cacbf /sig/sig_test.go
parent1a87fe8789699298eccbecc93e8016a73283cfec (diff)
Add sig pkg
Diffstat (limited to 'sig/sig_test.go')
-rw-r--r--sig/sig_test.go20
1 files changed, 20 insertions, 0 deletions
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)
+ }
+}