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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header_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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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/rtp_rtcp/source/rtcp_packet/common_header.h" 11 #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header.h"
12 12
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "webrtc/test/gtest.h"
14 14
15 using webrtc::rtcp::CommonHeader; 15 using webrtc::rtcp::CommonHeader;
16 16
17 namespace webrtc { 17 namespace webrtc {
18 namespace { 18 namespace {
19 const size_t kHeaderSizeBytes = 4; 19 const size_t kHeaderSizeBytes = 4;
20 } // namespace 20 } // namespace
21 21
22 TEST(RtcpCommonHeaderTest, TooSmallBuffer) { 22 TEST(RtcpCommonHeaderTest, TooSmallBuffer) {
23 uint8_t buffer[] = {0x80, 0x00, 0x00, 0x00}; 23 uint8_t buffer[] = {0x80, 0x00, 0x00, 0x00};
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 CommonHeader header; 95 CommonHeader header;
96 EXPECT_TRUE(header.Parse(buffer, sizeof(buffer))); 96 EXPECT_TRUE(header.Parse(buffer, sizeof(buffer)));
97 97
98 EXPECT_EQ(header.count(), 0x1e); 98 EXPECT_EQ(header.count(), 0x1e);
99 EXPECT_EQ(header.fmt(), 0x1e); 99 EXPECT_EQ(header.fmt(), 0x1e);
100 EXPECT_EQ(header.type(), 0xab); 100 EXPECT_EQ(header.type(), 0xab);
101 EXPECT_EQ(header.payload_size_bytes(), 0u); 101 EXPECT_EQ(header.payload_size_bytes(), 0u);
102 EXPECT_EQ(header.payload(), buffer + kHeaderSizeBytes); 102 EXPECT_EQ(header.payload(), buffer + kHeaderSizeBytes);
103 } 103 }
104 } // namespace webrtc 104 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698