Improved error message

This commit is contained in:
saxon 2018-07-04 22:19:45 +09:30
parent 76909221a9
commit e6c2cf5f00
1 changed files with 4 additions and 2 deletions

View File

@ -28,6 +28,7 @@ LICENSE
package parser
import (
"fmt"
"io/ioutil"
"log"
"os"
@ -68,9 +69,10 @@ func TestH264Parser(t *testing.T) {
select {
case parser.InputChan() <- data[i]:
case frame := <-parser.OutputChan():
out, err := os.Create("testOutput/" + strconv.Itoa(n) + ".h264_frame")
path := fmt.Sprintf("testOutput/" + strconv.Itoa(n) + "h264_frame")
out, err := os.Create(path)
if err != nil {
t.Errorf("Should not have got error creating output file!")
t.Errorf("Unexpected error creating %q: %v", path, err)
return
}
out.Write(frame)