diff --git a/algo/algo_test.go b/algo/algo_test.go index 38322aa..8434e3b 100644 --- a/algo/algo_test.go +++ b/algo/algo_test.go @@ -25,6 +25,12 @@ func TestDoRandomSearchExec(t *testing.T) { if err := os.RemoveAll(picsDir); err != nil { t.Error(err) } + + // if `stat` on picsDir succeeds now, something is wrong (namely the + // clean-up apparently did not succeed). + if _, err := os.Stat(picsDir); err == nil { + t.Error("picsDir should have already been cleaned up") + } } func TestDoSHCExec(t *testing.T) { @@ -39,6 +45,12 @@ func TestDoSHCExec(t *testing.T) { if err := os.RemoveAll(picsDir); err != nil { t.Error(err) } + + // if `stat` on picsDir succeeds now, something is wrong (namely the + // clean-up apparently did not succeed). + if _, err := os.Stat(picsDir); err == nil { + t.Error("picsDir should have already been cleaned up") + } } func TestNewValues(t *testing.T) {