summaryrefslogtreecommitdiff
path: root/cryptfs/names_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-10-04 14:36:20 +0200
committerJakob Unterwurzacher2015-10-04 14:49:47 +0200
commit89fef80d32708874c95742db0a7b593bcfd3b31d (patch)
treeadffeac51b1e945e32583b07ab0328a3c2539aad /cryptfs/names_test.go
parent5bd08abf4095fb553355c9b007c8ae4a4314b970 (diff)
Run go fmt
Diffstat (limited to 'cryptfs/names_test.go')
-rw-r--r--cryptfs/names_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cryptfs/names_test.go b/cryptfs/names_test.go
index 7e20690..dd57242 100644
--- a/cryptfs/names_test.go
+++ b/cryptfs/names_test.go
@@ -1,8 +1,8 @@
package cryptfs
import (
- "testing"
"bytes"
+ "testing"
)
func TestTranslatePath(t *testing.T) {
@@ -14,7 +14,7 @@ func TestTranslatePath(t *testing.T) {
key := make([]byte, 16)
fs := NewCryptFS(key, true)
- for _, n := range(s) {
+ for _, n := range s {
c := fs.EncryptPath(n)
d, err := fs.DecryptPath(c)
if err != nil {
@@ -36,13 +36,13 @@ func TestPad16(t *testing.T) {
key := make([]byte, 16)
fs := NewCryptFS(key, true)
- for i := range(s) {
+ for i := range s {
orig := s[i]
padded := fs.pad16(orig)
if len(padded) <= len(orig) {
t.Errorf("Padded length not bigger than orig: %d", len(padded))
}
- if len(padded) % 16 != 0 {
+ if len(padded)%16 != 0 {
t.Errorf("Length is not aligend: %d", len(padded))
}
unpadded, err := fs.unPad16(padded)
@@ -52,7 +52,7 @@ func TestPad16(t *testing.T) {
if len(unpadded) != len(orig) {
t.Errorf("Size mismatch: orig=%d unpadded=%d", len(s[i]), len(unpadded))
}
- if ! bytes.Equal(orig, unpadded) {
+ if !bytes.Equal(orig, unpadded) {
t.Error("Content mismatch orig vs unpadded")
}
}