Skip to content

Commit 7320529

Browse files
committed
put gocyclo out of it's misery.
1 parent 09a17df commit 7320529

File tree

1 file changed

+6
-42
lines changed

1 file changed

+6
-42
lines changed

tests/entry_test.go

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ func Test_file_type(t *testing.T) {
112112
objectFile := "../data/bhello.notanextensionthatwerecognize"
113113
exeFile := "../data/bhello"
114114

115+
BinaryFile(t, fictionalFile, dataDir, sourceFile, objectFile, exeFile)
116+
PlainFile(t, fictionalFile, dataDir, sourceFile, objectFile, exeFile)
117+
118+
}
119+
120+
func BinaryFile(t *testing.T, fictionalFile string, dataDir string, sourceFile string, objectFile string, exeFile string) {
115121
var binaryFileType shared.BinaryType
116122
binaryFileType = shared.GetBinaryType(fictionalFile)
117123

@@ -149,48 +155,6 @@ func Test_file_type(t *testing.T) {
149155
} else if DEBUG {
150156
fmt.Printf("GetBinaryType(%v) = %v\n", exeFile, binaryFileType)
151157
}
152-
153-
PlainFile(t, fictionalFile, dataDir, sourceFile, objectFile, exeFile)
154-
155-
/*
156-
var plain bool
157-
plain = shared.IsPlainFile(fictionalFile)
158-
159-
if plain {
160-
t.Errorf("shared.IsPlainFile(%v) returned %v\n", fictionalFile, plain)
161-
} else if DEBUG {
162-
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", fictionalFile, plain)
163-
}
164-
165-
plain = shared.IsPlainFile(dataDir)
166-
if plain {
167-
t.Errorf("shared.IsPlainFile(%v) returned %v\n", dataDir, plain)
168-
} else if DEBUG {
169-
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", dataDir, plain)
170-
}
171-
172-
plain = shared.IsPlainFile(sourceFile)
173-
if !plain {
174-
t.Errorf("shared.IsPlainFile(%v) returned %v\n", sourceFile, plain)
175-
} else if DEBUG {
176-
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", sourceFile, plain)
177-
}
178-
179-
plain = shared.IsPlainFile(objectFile)
180-
if !plain {
181-
t.Errorf("shared.IsPlainFile(%v) returned %v\n", objectFile, plain)
182-
} else if DEBUG {
183-
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", objectFile, plain)
184-
}
185-
186-
plain = shared.IsPlainFile(exeFile)
187-
if !plain {
188-
t.Errorf("shared.IsPlainFile(%v) returned %v\n", exeFile, plain)
189-
} else if DEBUG {
190-
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", exeFile, plain)
191-
}
192-
*/
193-
194158
}
195159

196160
func PlainFile(t *testing.T, fictionalFile string, dataDir string, sourceFile string, objectFile string, exeFile string) {

0 commit comments

Comments
 (0)