Home | History | Annotate | Download | only in neteq
      1 /*
      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/neteq/normal.h"
     14 
     15 #include <vector>
     16 
     17 #include "gtest/gtest.h"
     18 #include "webrtc/modules/audio_coding/neteq/background_noise.h"
     19 #include "webrtc/modules/audio_coding/neteq/expand.h"
     20 #include "webrtc/modules/audio_coding/neteq/mock/mock_decoder_database.h"
     21 #include "webrtc/modules/audio_coding/neteq/random_vector.h"
     22 #include "webrtc/modules/audio_coding/neteq/sync_buffer.h"
     23 
     24 namespace webrtc {
     25 
     26 TEST(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
     41