mirror of https://bitbucket.org/ausocean/av.git
Improved error message
This commit is contained in:
parent
76909221a9
commit
e6c2cf5f00
|
@ -28,6 +28,7 @@ LICENSE
|
||||||
package parser
|
package parser
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
@ -68,9 +69,10 @@ func TestH264Parser(t *testing.T) {
|
||||||
select {
|
select {
|
||||||
case parser.InputChan() <- data[i]:
|
case parser.InputChan() <- data[i]:
|
||||||
case frame := <-parser.OutputChan():
|
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 {
|
if err != nil {
|
||||||
t.Errorf("Should not have got error creating output file!")
|
t.Errorf("Unexpected error creating %q: %v", path, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
out.Write(frame)
|
out.Write(frame)
|
||||||
|
|
Loading…
Reference in New Issue