aboutsummaryrefslogtreecommitdiff
path: root/internal/nametransform/longnames_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-04-10 12:36:43 +0200
committerJakob Unterwurzacher2016-04-10 12:36:43 +0200
commit63d3e517349a6c4774a3f75f2fa039c780eaf5f9 (patch)
tree9a2265fd2b85991b4cc85f3304cff88c0dc26828 /internal/nametransform/longnames_test.go
parente42e46c97cc46b731b63f1edfe1a4407161057f9 (diff)
longnames: use symbolic constants instead of naked ints
Diffstat (limited to 'internal/nametransform/longnames_test.go')
-rw-r--r--internal/nametransform/longnames_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/nametransform/longnames_test.go b/internal/nametransform/longnames_test.go
index dc4098c..62073ec 100644
--- a/internal/nametransform/longnames_test.go
+++ b/internal/nametransform/longnames_test.go
@@ -6,17 +6,17 @@ import (
func TestIsLongName(t *testing.T) {
n := "gocryptfs.longname.LkwUdALvV_ANnzQN6ZZMYnxxfARD3IeZWCKnxGJjYmU=.name"
- if IsLongName(n) != 2 {
+ if IsLongName(n) != LongNameFilename {
t.Errorf("False negative")
}
n = "gocryptfs.longname.LkwUdALvV_ANnzQN6ZZMYnxxfARD3IeZWCKnxGJjYmU="
- if IsLongName(n) != 1 {
+ if IsLongName(n) != LongNameContent {
t.Errorf("False negative")
}
n = "LkwUdALvV_ANnzQN6ZZMYnxxfARD3IeZWCKnxGJjYmU="
- if IsLongName(n) != 0 {
+ if IsLongName(n) != LongNameNone {
t.Errorf("False positive")
}
}