#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/base/converting_audio_fifo.h"
#include <memory>
#include "media/base/audio_bus.h"
#include "media/base/audio_parameters.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
constexpr int kDefaultChannels = …;
constexpr int kDefaultFrames = …;
constexpr int kInputSampleRate = …;
struct TestAudioParams { … };
const AudioParameters kDefaultParams = …;
constexpr int kTestChannels[] = …;
constexpr int kTestSampleRates[] = …;
constexpr int kTestOutputFrames[] = …;
class ConvertingAudioFifoTest
: public ::testing::TestWithParam<std::tuple<int, int, int>> { … };
TEST_F(ConvertingAudioFifoTest, Construct) { … }
TEST_F(ConvertingAudioFifoTest, EmptyFlush) { … }
TEST_F(ConvertingAudioFifoTest, PushFlush) { … }
TEST_F(ConvertingAudioFifoTest, PushFlushFlush) { … }
TEST_P(ConvertingAudioFifoTest, PushFlushTwice) { … }
TEST_P(ConvertingAudioFifoTest, Push_NotEnoughFrames) { … }
TEST_P(ConvertingAudioFifoTest, Push_EnoughFrames) { … }
TEST_P(ConvertingAudioFifoTest, Push_MoreThanEnoughFrames) { … }
TEST_P(ConvertingAudioFifoTest, Push_MoreThanEnoughFrames_PartialDrain) { … }
TEST_F(ConvertingAudioFifoTest, Push_MoreThanEnoughFrames_IsFifoOrder) { … }
TEST_P(ConvertingAudioFifoTest, Push_VaryingFrames) { … }
TEST_P(ConvertingAudioFifoTest, Push_VaryingChannels) { … }
INSTANTIATE_TEST_SUITE_P(…);
}