blob: 2bd7b894f42000f10b9e02a864a9f5bf9dfe14dc [file] [log] [blame]
henrik.lundin@webrtc.org9a400812013-01-29 12:09:21 +00001/*
2 * Copyright (c) 2012 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// Unit tests for Normal class.
12
13#include "webrtc/modules/audio_coding/neteq4/normal.h"
14
15#include <vector>
16
17#include "gtest/gtest.h"
18#include "webrtc/modules/audio_coding/neteq4/background_noise.h"
19#include "webrtc/modules/audio_coding/neteq4/expand.h"
20#include "webrtc/modules/audio_coding/neteq4/mock/mock_decoder_database.h"
21#include "webrtc/modules/audio_coding/neteq4/random_vector.h"
22#include "webrtc/modules/audio_coding/neteq4/sync_buffer.h"
23
24namespace webrtc {
25
26TEST(Normal, CreateAndDestroy) {
27 MockDecoderDatabase db;
28 int fs = 8000;
29 size_t channels = 1;
30 BackgroundNoise bgn(channels);
31 SyncBuffer sync_buffer(1, 1000);
32 RandomVector random_vector;
33 Expand expand(&bgn, &sync_buffer, &random_vector, fs, channels);
34 Normal normal(fs, &db, bgn, &expand);
35 EXPECT_CALL(db, Die()); // Called when |db| goes out of scope.
36}
37
38// TODO(hlundin): Write more tests.
39
40} // namespace webrtc