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

Side by Side Diff: webrtc/modules/desktop_capture/differ_block_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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 "testing/gmock/include/gmock/gmock.h" 11 #include "webrtc/test/gmock.h"
12 #include "webrtc/modules/desktop_capture/differ_block.h" 12 #include "webrtc/modules/desktop_capture/differ_block.h"
13 13
14 namespace webrtc { 14 namespace webrtc {
15 15
16 // Run 900 times to mimic 1280x720. 16 // Run 900 times to mimic 1280x720.
17 // TODO(fbarchard): Remove benchmark once performance is non-issue. 17 // TODO(fbarchard): Remove benchmark once performance is non-issue.
18 static const int kTimesToRun = 900; 18 static const int kTimesToRun = 900;
19 19
20 static void GenerateData(uint8_t* data, int size) { 20 static void GenerateData(uint8_t* data, int size) {
21 for (int i = 0; i < size; ++i) { 21 for (int i = 0; i < size; ++i) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 PrepareBuffers(block1, block2); 77 PrepareBuffers(block1, block2);
78 block2[0] += 1; 78 block2[0] += 1;
79 79
80 for (int i = 0; i < kTimesToRun; ++i) { 80 for (int i = 0; i < kTimesToRun; ++i) {
81 int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel); 81 int result = BlockDifference(block1, block2, kBlockSize * kBytesPerPixel);
82 EXPECT_EQ(1, result); 82 EXPECT_EQ(1, result);
83 } 83 }
84 } 84 }
85 85
86 } // namespace webrtc 86 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698