add tests for fswatcher package

This commit is contained in:
Dominic Breuker
2018-02-27 09:56:05 +01:00
committed by Dominic Breuker
parent 94a12cf031
commit 1deb4838a5
14 changed files with 277 additions and 199 deletions

View File

@@ -39,7 +39,8 @@ func TestWalk(t *testing.T) {
}
for i, tt := range tests {
dirCh, errCh, doneCh := Walk(tt.root, tt.depth)
w := &Walker{}
dirCh, errCh, doneCh := w.Walk(tt.root, tt.depth)
dirs, errs := getAllDirsAndErrors(dirCh, errCh)
if !reflect.DeepEqual(dirs, tt.result) {