diff --git a/testutils/pkg.go b/testutils/pkg.go index 569cd80..93f789f 100644 --- a/testutils/pkg.go +++ b/testutils/pkg.go @@ -129,6 +129,8 @@ func (p *TestPackage) CreateContext(filename string) *gas.Context { func (p *TestPackage) Close() { if p.ondisk { err := os.RemoveAll(p.Path) - log.Println(err) + if err != nil { + log.Fatal(err) + } } } diff --git a/testutils/source.go b/testutils/source.go index 2fc9bb0..11fe535 100644 --- a/testutils/source.go +++ b/testutils/source.go @@ -473,7 +473,7 @@ body, err := ioutil.ReadFile(f) if err != nil { log.Printf("Error: %v\n", err) } -log.Print(f) +log.Print(body) }`, 1}, {` package main @@ -493,8 +493,7 @@ func main() { fmt.Printf("Error: %v\n", err) } body := make([]byte, 5) - n1, err := f.Read(body) - if err != nil { + if _, err = f.Read(body); err != nil { fmt.Printf("Error: %v\n", err) } fmt.Fprintf(w, "%s", body)