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

Side by Side Diff: webrtc/modules/desktop_capture/desktop_region_unittest.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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
(...skipping 25 matching lines...) Expand all
36 it.Advance(); 36 it.Advance();
37 } 37 }
38 EXPECT_TRUE(it.IsAtEnd()); 38 EXPECT_TRUE(it.IsAtEnd());
39 } 39 }
40 40
41 } // namespace 41 } // namespace
42 42
43 // Verify that regions are empty when created. 43 // Verify that regions are empty when created.
44 TEST(DesktopRegionTest, Empty) { 44 TEST(DesktopRegionTest, Empty) {
45 DesktopRegion r; 45 DesktopRegion r;
46 CompareRegion(r, NULL, 0); 46 CompareRegion(r, nullptr, 0);
47 } 47 }
48 48
49 // Verify that empty rectangles are ignored. 49 // Verify that empty rectangles are ignored.
50 TEST(DesktopRegionTest, AddEmpty) { 50 TEST(DesktopRegionTest, AddEmpty) {
51 DesktopRegion r; 51 DesktopRegion r;
52 DesktopRect rect = DesktopRect::MakeXYWH(1, 2, 0, 0); 52 DesktopRect rect = DesktopRect::MakeXYWH(1, 2, 0, 0);
53 r.AddRect(rect); 53 r.AddRect(rect);
54 CompareRegion(r, NULL, 0); 54 CompareRegion(r, nullptr, 0);
55 } 55 }
56 56
57 // Verify that regions with a single rectangles are handled properly. 57 // Verify that regions with a single rectangles are handled properly.
58 TEST(DesktopRegionTest, SingleRect) { 58 TEST(DesktopRegionTest, SingleRect) {
59 DesktopRegion r; 59 DesktopRegion r;
60 DesktopRect rect = DesktopRect::MakeXYWH(1, 2, 3, 4); 60 DesktopRect rect = DesktopRect::MakeXYWH(1, 2, 3, 4);
61 r.AddRect(rect); 61 r.AddRect(rect);
62 CompareRegion(r, &rect, 1); 62 CompareRegion(r, &rect, 1);
63 } 63 }
64 64
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 5 + RadmonInt(10) * 5, 5 + RadmonInt(10) * 5)); 701 5 + RadmonInt(10) * 5, 5 + RadmonInt(10) * 5));
702 } 702 }
703 703
704 // Iterate over the rectangles. 704 // Iterate over the rectangles.
705 for (DesktopRegion::Iterator it(r); !it.IsAtEnd(); it.Advance()) { 705 for (DesktopRegion::Iterator it(r); !it.IsAtEnd(); it.Advance()) {
706 } 706 }
707 } 707 }
708 } 708 }
709 709
710 } // namespace webrtc 710 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698