all: use new testing features of Go 1.14 and 1.15

This simplifies the tests a bit.
This commit is contained in:
Ayke van Laethem
2021-08-15 16:03:17 +02:00
committed by Ron Evans
parent 25c7bfd404
commit 59d53182bb
7 changed files with 10 additions and 39 deletions
+1 -10
View File
@@ -210,16 +210,7 @@ func runTestWithConfig(name, target string, t *testing.T, options compileopts.Op
}
// Create a temporary directory for test output files.
tmpdir, err := ioutil.TempDir("", "tinygo-test")
if err != nil {
t.Fatal("could not create temporary directory:", err)
}
defer func() {
rerr := os.RemoveAll(tmpdir)
if rerr != nil {
t.Errorf("failed to remove temporary directory %q: %s", tmpdir, rerr.Error())
}
}()
tmpdir := t.TempDir()
// Determine whether we're on a system that supports environment variables
// and command line parameters (operating systems, WASI) or not (baremetal,