mirror of
https://github.com/danog/gllvm.git
synced 2024-11-26 21:24:42 +01:00
put gocyclo out of it's misery.
This commit is contained in:
parent
09a17df1bc
commit
7320529b18
@ -112,6 +112,12 @@ func Test_file_type(t *testing.T) {
|
|||||||
objectFile := "../data/bhello.notanextensionthatwerecognize"
|
objectFile := "../data/bhello.notanextensionthatwerecognize"
|
||||||
exeFile := "../data/bhello"
|
exeFile := "../data/bhello"
|
||||||
|
|
||||||
|
BinaryFile(t, fictionalFile, dataDir, sourceFile, objectFile, exeFile)
|
||||||
|
PlainFile(t, fictionalFile, dataDir, sourceFile, objectFile, exeFile)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func BinaryFile(t *testing.T, fictionalFile string, dataDir string, sourceFile string, objectFile string, exeFile string) {
|
||||||
var binaryFileType shared.BinaryType
|
var binaryFileType shared.BinaryType
|
||||||
binaryFileType = shared.GetBinaryType(fictionalFile)
|
binaryFileType = shared.GetBinaryType(fictionalFile)
|
||||||
|
|
||||||
@ -149,48 +155,6 @@ func Test_file_type(t *testing.T) {
|
|||||||
} else if DEBUG {
|
} else if DEBUG {
|
||||||
fmt.Printf("GetBinaryType(%v) = %v\n", exeFile, binaryFileType)
|
fmt.Printf("GetBinaryType(%v) = %v\n", exeFile, binaryFileType)
|
||||||
}
|
}
|
||||||
|
|
||||||
PlainFile(t, fictionalFile, dataDir, sourceFile, objectFile, exeFile)
|
|
||||||
|
|
||||||
/*
|
|
||||||
var plain bool
|
|
||||||
plain = shared.IsPlainFile(fictionalFile)
|
|
||||||
|
|
||||||
if plain {
|
|
||||||
t.Errorf("shared.IsPlainFile(%v) returned %v\n", fictionalFile, plain)
|
|
||||||
} else if DEBUG {
|
|
||||||
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", fictionalFile, plain)
|
|
||||||
}
|
|
||||||
|
|
||||||
plain = shared.IsPlainFile(dataDir)
|
|
||||||
if plain {
|
|
||||||
t.Errorf("shared.IsPlainFile(%v) returned %v\n", dataDir, plain)
|
|
||||||
} else if DEBUG {
|
|
||||||
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", dataDir, plain)
|
|
||||||
}
|
|
||||||
|
|
||||||
plain = shared.IsPlainFile(sourceFile)
|
|
||||||
if !plain {
|
|
||||||
t.Errorf("shared.IsPlainFile(%v) returned %v\n", sourceFile, plain)
|
|
||||||
} else if DEBUG {
|
|
||||||
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", sourceFile, plain)
|
|
||||||
}
|
|
||||||
|
|
||||||
plain = shared.IsPlainFile(objectFile)
|
|
||||||
if !plain {
|
|
||||||
t.Errorf("shared.IsPlainFile(%v) returned %v\n", objectFile, plain)
|
|
||||||
} else if DEBUG {
|
|
||||||
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", objectFile, plain)
|
|
||||||
}
|
|
||||||
|
|
||||||
plain = shared.IsPlainFile(exeFile)
|
|
||||||
if !plain {
|
|
||||||
t.Errorf("shared.IsPlainFile(%v) returned %v\n", exeFile, plain)
|
|
||||||
} else if DEBUG {
|
|
||||||
fmt.Printf("shared.IsPlainFile(%v) returned %v\n", exeFile, plain)
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func PlainFile(t *testing.T, fictionalFile string, dataDir string, sourceFile string, objectFile string, exeFile string) {
|
func PlainFile(t *testing.T, fictionalFile string, dataDir string, sourceFile string, objectFile string, exeFile string) {
|
||||||
|
Loading…
Reference in New Issue
Block a user