analyzer_test: Adding seams for testability

Signed-off-by: Simarpreet Singh <simar@linux.com>
This commit is contained in:
Simarpreet Singh
2019-11-18 14:42:36 -08:00
parent 95e89a424e
commit 985442dc1c
5 changed files with 68 additions and 26 deletions

View File

@@ -122,7 +122,7 @@ func TestExtractFiles(t *testing.T) {
file string // Test input file
filenames []string // Target files
FileMap extractor.FileMap // Expected output
opqDirs opqDirs // Expected output
opqDirs OPQDirs // Expected output
err error // Expected error to occur
}{
{
@@ -167,7 +167,7 @@ func TestExtractFiles(t *testing.T) {
t.Errorf("err: got %v, want %v", v.err, err)
}
if !reflect.DeepEqual(opqDirs, v.opqDirs) {
t.Errorf("opqDirs: got %v, want %v", opqDirs, v.opqDirs)
t.Errorf("OPQDirs: got %v, want %v", opqDirs, v.opqDirs)
}
if !reflect.DeepEqual(fm, v.FileMap) {
t.Errorf("FilesMap: got %v, want %v", fm, v.FileMap)