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

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

Issue 14272007: Update the remaining include paths of base/string_piece.h to its new location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « media/base/audio_hash.h ('k') | media/base/video_frame.cc » ('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"
6
5 #include <sstream> 7 #include <sstream>
6 8
7 #include "media/base/ranges.h" 9 #include "base/strings/string_piece.h"
8
9 #include "base/string_piece.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 // Human-readable output operator, for debugging/testability. 14 // Human-readable output operator, for debugging/testability.
15 template<class T> 15 template<class T>
16 std::ostream& operator<<(std::ostream& os, const Ranges<T>& r) { 16 std::ostream& operator<<(std::ostream& os, const Ranges<T>& r) {
17 os << "{ "; 17 os << "{ ";
18 for(size_t i = 0; i < r.size(); ++i) 18 for(size_t i = 0; i < r.size(); ++i)
19 os << "[" << r.start(i) << "," << r.end(i) << ") "; 19 os << "[" << r.start(i) << "," << r.end(i) << ") ";
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // first range and ends at the end of the last range. 142 // first range and ends at the end of the last range.
143 b.clear(); 143 b.clear();
144 ASSERT_EQ(b.Add(0, 12), 1u) << b; 144 ASSERT_EQ(b.Add(0, 12), 1u) << b;
145 ASSERT_RANGES(a, "{ [0,1) [4,7) [10,12) }"); 145 ASSERT_RANGES(a, "{ [0,1) [4,7) [10,12) }");
146 ASSERT_RANGES(b, "{ [0,12) }"); 146 ASSERT_RANGES(b, "{ [0,12) }");
147 ASSERT_RANGES(a.IntersectionWith(b), "{ [0,1) [4,7) [10,12) }"); 147 ASSERT_RANGES(a.IntersectionWith(b), "{ [0,1) [4,7) [10,12) }");
148 ASSERT_RANGES(b.IntersectionWith(a), "{ [0,1) [4,7) [10,12) }"); 148 ASSERT_RANGES(b.IntersectionWith(a), "{ [0,1) [4,7) [10,12) }");
149 } 149 }
150 150
151 } // namespace media 151 } // namespace media
OLDNEW
« no previous file with comments | « media/base/audio_hash.h ('k') | media/base/video_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698