From 1e7d3508e364e8e06c91669572b31b9aaab88938 Mon Sep 17 00:00:00 2001 From: Saxon Date: Wed, 8 May 2019 00:03:44 +0930 Subject: [PATCH] container/mts/encoder_test.go: simplified some code and improved commenting --- container/mts/encoder_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/container/mts/encoder_test.go b/container/mts/encoder_test.go index 62eeca0a..148d0e99 100644 --- a/container/mts/encoder_test.go +++ b/container/mts/encoder_test.go @@ -97,11 +97,9 @@ func TestEncodeVideo(t *testing.T) { }, } + // Create the dst and write the test data to encoder. dst := &destination{} - e := NewEncoder(nopCloser{dst}, 25, Video) - - // Write data. - _, err := e.Write(data) + _, err := NewEncoder(nopCloser{dst}, 25, Video).Write(data) if err != nil { t.Fatalf("could not write data to encoder, failed with err: %v\n", err) }