blob: 4449f4c633109afe24a61770268b9ed25e737b08 [file] [log] [blame]
andrew@webrtc.org50b2efe2013-04-29 17:27:29 +00001/*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "testing/gtest/include/gtest/gtest.h"
12#include "webrtc/common_audio/resampler/include/push_resampler.h"
13
14// Quality testing of PushResampler is handled through output_mixer_unittest.cc.
15
16namespace webrtc {
17
andrew@webrtc.orgc1eb5602013-06-03 19:00:29 +000018TEST(PushResamplerTest, VerifiesInputParameters) {
andrew@webrtc.orgf5a33f12014-04-19 00:32:07 +000019 PushResampler<int16_t> resampler;
andrew@webrtc.orgc1eb5602013-06-03 19:00:29 +000020 EXPECT_EQ(-1, resampler.InitializeIfNeeded(-1, 16000, 1));
21 EXPECT_EQ(-1, resampler.InitializeIfNeeded(16000, -1, 1));
22 EXPECT_EQ(-1, resampler.InitializeIfNeeded(16000, 16000, 0));
23 EXPECT_EQ(-1, resampler.InitializeIfNeeded(16000, 16000, 3));
24 EXPECT_EQ(0, resampler.InitializeIfNeeded(16000, 16000, 1));
25 EXPECT_EQ(0, resampler.InitializeIfNeeded(16000, 16000, 2));
andrew@webrtc.org50b2efe2013-04-29 17:27:29 +000026}
27
andrew@webrtc.org50b2efe2013-04-29 17:27:29 +000028} // namespace webrtc