From 91a77805916559090cf5fa04f76776692b61c12c Mon Sep 17 00:00:00 2001
From: mfenjiro <mohamed.fenjiro@savoirfairelinux.com>
Date: Thu, 10 Jan 2019 12:00:51 -0500
Subject: [PATCH] audio_frame_resizer: fixed unitTest

fixed getFormat

fixed testCase evaluating the sample of the queue

Change-Id: Id6ddb3ee90e674776bec53cfa81e984d47db3ef9
---
 test/unitTest/media/audio/test_audio_frame_resizer.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/unitTest/media/audio/test_audio_frame_resizer.cpp b/test/unitTest/media/audio/test_audio_frame_resizer.cpp
index cd8d9ed981..3aea8873e3 100644
--- a/test/unitTest/media/audio/test_audio_frame_resizer.cpp
+++ b/test/unitTest/media/audio/test_audio_frame_resizer.cpp
@@ -122,9 +122,9 @@ AudioFrameResizerTest::testDifferentFormat()
 {
     // frame format != q_->format_
     q_.reset(new AudioFrameResizer(format_, outputSize_, [this](std::shared_ptr<AudioFrame>&& f){ gotFrame(std::move(f)); }));
-    auto in = getFrame(960);
-    // XXX this should never be done, but use this as a shortcut for this test case
-    in->pointer()->channels = 1;
+    auto in = getFrame(outputSize_-27);
+    q_->enqueue(std::move(in));
+    CPPUNIT_ASSERT(q_->samples()==outputSize_-27);
     q_->setFormat(AudioFormat::MONO(), 960);
     CPPUNIT_ASSERT(q_->samples() == 0);
 }
-- 
GitLab