Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: webrtc/modules/audio_coding/neteq/neteq_unittest.cc

Issue 2358993004: Enable the -Wundef warning for clang (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/audio_coding/neteq/include/neteq.h" 11 #include "webrtc/modules/audio_coding/neteq/include/neteq.h"
12 12
13 #include <math.h> 13 #include <math.h>
14 #include <stdlib.h> 14 #include <stdlib.h>
15 #include <string.h> // memset 15 #include <string.h> // memset
16 16
17 #include <algorithm> 17 #include <algorithm>
18 #include <memory> 18 #include <memory>
19 #include <set> 19 #include <set>
20 #include <string> 20 #include <string>
21 #include <vector> 21 #include <vector>
22 22
23 #include "gflags/gflags.h" 23 #include "gflags/gflags.h"
24 #include "testing/gtest/include/gtest/gtest.h" 24 #include "webrtc/test/gtest.h"
25 #include "webrtc/base/ignore_wundef.h"
25 #include "webrtc/base/sha1digest.h" 26 #include "webrtc/base/sha1digest.h"
26 #include "webrtc/base/stringencode.h" 27 #include "webrtc/base/stringencode.h"
27 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h" 28 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
28 #include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h" 29 #include "webrtc/modules/audio_coding/neteq/tools/audio_loop.h"
29 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h" 30 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
30 #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h" 31 #include "webrtc/modules/audio_coding/codecs/pcm16b/pcm16b.h"
31 #include "webrtc/modules/include/module_common_types.h" 32 #include "webrtc/modules/include/module_common_types.h"
32 #include "webrtc/test/testsupport/fileutils.h" 33 #include "webrtc/test/testsupport/fileutils.h"
33 #include "webrtc/typedefs.h" 34 #include "webrtc/typedefs.h"
34 35
35 #ifdef WEBRTC_NETEQ_UNITTEST_BITEXACT 36 #ifdef WEBRTC_NETEQ_UNITTEST_BITEXACT
37 RTC_PUSH_IGNORING_WUNDEF()
36 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD 38 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
37 #include "external/webrtc/webrtc/modules/audio_coding/neteq/neteq_unittest.pb.h" 39 #include "external/webrtc/webrtc/modules/audio_coding/neteq/neteq_unittest.pb.h"
38 #else 40 #else
39 #include "webrtc/audio_coding/neteq/neteq_unittest.pb.h" 41 #include "webrtc/audio_coding/neteq/neteq_unittest.pb.h"
40 #endif 42 #endif
43 RTC_POP_IGNORING_WUNDEF()
41 #endif 44 #endif
42 45
43 DEFINE_bool(gen_ref, false, "Generate reference files."); 46 DEFINE_bool(gen_ref, false, "Generate reference files.");
44 47
45 namespace { 48 namespace {
46 49
47 const std::string& PlatformChecksum(const std::string& checksum_general, 50 const std::string& PlatformChecksum(const std::string& checksum_general,
48 const std::string& checksum_android, 51 const std::string& checksum_android,
49 const std::string& checksum_win_32, 52 const std::string& checksum_win_32,
50 const std::string& checksum_win_64) { 53 const std::string& checksum_win_64) {
51 #ifdef WEBRTC_ANDROID 54 #if defined(WEBRTC_ANDROID)
52 return checksum_android; 55 return checksum_android;
53 #elif WEBRTC_WIN 56 #elif defined(WEBRTC_WIN)
54 #ifdef WEBRTC_ARCH_64_BITS 57 #ifdef WEBRTC_ARCH_64_BITS
55 return checksum_win_64; 58 return checksum_win_64;
56 #else 59 #else
57 return checksum_win_32; 60 return checksum_win_32;
58 #endif // WEBRTC_ARCH_64_BITS 61 #endif // WEBRTC_ARCH_64_BITS
59 #else 62 #else
60 return checksum_general; 63 return checksum_general;
61 #endif // WEBRTC_WIN 64 #endif // WEBRTC_WIN
62 } 65 }
63 66
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 if (muted) { 1589 if (muted) {
1587 EXPECT_TRUE(AudioFramesEqualExceptData(out_frame1, out_frame2)); 1590 EXPECT_TRUE(AudioFramesEqualExceptData(out_frame1, out_frame2));
1588 } else { 1591 } else {
1589 EXPECT_TRUE(AudioFramesEqual(out_frame1, out_frame2)); 1592 EXPECT_TRUE(AudioFramesEqual(out_frame1, out_frame2));
1590 } 1593 }
1591 } 1594 }
1592 EXPECT_FALSE(muted); 1595 EXPECT_FALSE(muted);
1593 } 1596 }
1594 1597
1595 } // namespace webrtc 1598 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/neteq/neteq_stereo_unittest.cc ('k') | webrtc/modules/audio_coding/neteq/normal_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698