From 76909221a93cc13bc06e50fe3c5f255110862fec Mon Sep 17 00:00:00 2001 From: saxon Date: Wed, 4 Jul 2018 22:15:24 +0930 Subject: [PATCH] Using out instead of outputFile --- parser/parser_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/parser/parser_test.go b/parser/parser_test.go index d1e5f2cb..dfb95f11 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -68,13 +68,13 @@ func TestH264Parser(t *testing.T) { select { case parser.InputChan() <- data[i]: case frame := <-parser.OutputChan(): - outputFile, err := os.Create("testOutput/" + strconv.Itoa(n) + ".h264_frame") + out, err := os.Create("testOutput/" + strconv.Itoa(n) + ".h264_frame") if err != nil { t.Errorf("Should not have got error creating output file!") return } - outputFile.Write(frame) - outputFile.Close() + out.Write(frame) + out.Close() n++ default: } @@ -113,13 +113,13 @@ func TestMJPEGParser(t *testing.T) { log.Println("Writing jpegs to files!") for i := 0; len(parser.GetOutputChan()) > 0; i++ { // Open a new output file - outputFile, err := os.Create("testOutput/image" + strconv.Itoa(i) + ".jpeg") + out, err := os.Create("testOutput/image" + strconv.Itoa(i) + ".jpeg") if err != nil { t.Errorf("Should not have got error creating output file!") return } - outputFile.Write(<-parser.GetOutputChan()) - outputFile.Close() + out.Write(<-parser.GetOutputChan()) + out.Close() } } */