aboutsummaryrefslogtreecommitdiff
path: root/enc_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'enc_test.go')
-rw-r--r--enc_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/enc_test.go b/enc_test.go
index 6cbdb67..a6b1c2b 100644
--- a/enc_test.go
+++ b/enc_test.go
@@ -1,6 +1,9 @@
package main
-import "testing"
+import (
+ "bytes"
+ "testing"
+)
var b64enc = []byte(`RWRCSwAAAACzJBN2gC5//jVvDiV76rs4m2aKXkljqDpbOC0bBf7abZhV/Zygr6b0KIbSI56JQutwzsQeouxnnHuVTZp3IW4M9qdpe5Nh8Jrr5g7r0rHLPxEPmcv/dNru6ZjqI7CcGsY=`)
@@ -8,4 +11,8 @@ func TestUnmarshalEnc(t *testing.T) {
v := new(EncKey)
v.Unmarshal(b64enc)
t.Logf("%+v", v)
+ out, _ := v.Marshal()
+ if !bytes.Equal(b64enc, out) {
+ t.Errorf("expected %v, got %v", b64enc, out)
+ }
}