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

Side by Side Diff: media/base/ranges_unittest.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 5 years 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
« no previous file with comments | « media/base/ranges.h ('k') | media/base/seekable_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/ranges.h" 5 #include "media/base/ranges.h"
6 6
7 #include <stddef.h>
8
7 #include <sstream> 9 #include <sstream>
8 10
9 #include "base/strings/string_piece.h" 11 #include "base/strings/string_piece.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 13
12 namespace media { 14 namespace media {
13 15
14 // Human-readable output operator, for debugging/testability. 16 // Human-readable output operator, for debugging/testability.
15 template<class T> 17 template<class T>
16 std::ostream& operator<<(std::ostream& os, const Ranges<T>& r) { 18 std::ostream& operator<<(std::ostream& os, const Ranges<T>& r) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // first range and ends at the end of the last range. 144 // first range and ends at the end of the last range.
143 b.clear(); 145 b.clear();
144 ASSERT_EQ(b.Add(0, 12), 1u) << b; 146 ASSERT_EQ(b.Add(0, 12), 1u) << b;
145 ASSERT_RANGES(a, "{ [0,1) [4,7) [10,12) }"); 147 ASSERT_RANGES(a, "{ [0,1) [4,7) [10,12) }");
146 ASSERT_RANGES(b, "{ [0,12) }"); 148 ASSERT_RANGES(b, "{ [0,12) }");
147 ASSERT_RANGES(a.IntersectionWith(b), "{ [0,1) [4,7) [10,12) }"); 149 ASSERT_RANGES(a.IntersectionWith(b), "{ [0,1) [4,7) [10,12) }");
148 ASSERT_RANGES(b.IntersectionWith(a), "{ [0,1) [4,7) [10,12) }"); 150 ASSERT_RANGES(b.IntersectionWith(a), "{ [0,1) [4,7) [10,12) }");
149 } 151 }
150 152
151 } // namespace media 153 } // namespace media
OLDNEW
« no previous file with comments | « media/base/ranges.h ('k') | media/base/seekable_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698