diff options
author | Ayke van Laethem <[email protected]> | 2021-08-15 16:03:17 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2021-08-16 21:19:26 +0200 |
commit | 59d53182bb30e7b1de8076550057b465b28a4ccb (patch) | |
tree | cee52f90cae0b44daf67206af5c6861b1a149e63 /main_test.go | |
parent | 25c7bfd404448a159a52f41930ac210bca6f1b53 (diff) | |
download | tinygo-59d53182bb30e7b1de8076550057b465b28a4ccb.tar.gz tinygo-59d53182bb30e7b1de8076550057b465b28a4ccb.zip |
all: use new testing features of Go 1.14 and 1.15
This simplifies the tests a bit.
Diffstat (limited to 'main_test.go')
-rw-r--r-- | main_test.go | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/main_test.go b/main_test.go index 8159951cf..bbc1a062d 100644 --- a/main_test.go +++ b/main_test.go @@ -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, |