19a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org/*
29a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
39a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org *
49a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org *  Use of this source code is governed by a BSD-style license
59a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org *  that can be found in the LICENSE file in the root of the source
69a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org *  tree. An additional intellectual property rights grant can be found
79a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org *  in the file PATENTS.  All contributing project authors may
89a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org *  be found in the AUTHORS file in the root of the source tree.
99a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org */
109a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org
119a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org// Unit tests for ComfortNoise class.
129a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org
13e5abc854f3dc47de16067c2a41476c39b7626722henrik.lundin@webrtc.org#include "webrtc/modules/audio_coding/neteq/comfort_noise.h"
149a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org
1549d62206ededc5905d6121d42fdcce8ed665b2c0kjellander@webrtc.org#include "testing/gtest/include/gtest/gtest.h"
16e5abc854f3dc47de16067c2a41476c39b7626722henrik.lundin@webrtc.org#include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
17e5abc854f3dc47de16067c2a41476c39b7626722henrik.lundin@webrtc.org#include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
189a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org
199a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.orgnamespace webrtc {
209a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org
219a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.orgTEST(ComfortNoise, CreateAndDestroy) {
229a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org  int fs = 8000;
239a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org  MockDecoderDatabase db;
249a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org  SyncBuffer sync_buffer(1, 1000);
259a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org  ComfortNoise cn(fs, &db, &sync_buffer);
269a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org  EXPECT_CALL(db, Die());  // Called when |db| goes out of scope.
279a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org}
289a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org
299a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org// TODO(hlundin): Write more tests.
309a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org
319a400812ca0006d12e538d465ab6728a8ecd07aahenrik.lundin@webrtc.org}  // namespace webrtc
32