*: upgrade tests to use T.Cleanup()
This commit is contained in:
parent
0cec99a3ea
commit
2c81fc8b8e
41 changed files with 137 additions and 220 deletions
|
@ -62,10 +62,10 @@ func TestCompiler(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
err = os.MkdirAll(exampleSavePath, os.ModePerm)
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
t.Cleanup(func() {
|
||||
err := os.RemoveAll(exampleSavePath)
|
||||
require.NoError(t, err)
|
||||
}()
|
||||
})
|
||||
outfile := exampleSavePath + "/test.nef"
|
||||
_, err = compiler.CompileAndSave(exampleCompilePath+"/"+infos[0].Name(), &compiler.Options{Outfile: outfile})
|
||||
require.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue