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

Side by Side Diff: tools/gn/c_include_iterator_unittest.cc

Issue 1549203002: Switch to standard integer types in tools/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « tools/gn/c_include_iterator.cc ('k') | tools/gn/command_args.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h>
6
5 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
6 #include "tools/gn/c_include_iterator.h" 8 #include "tools/gn/c_include_iterator.h"
7 #include "tools/gn/input_file.h" 9 #include "tools/gn/input_file.h"
8 #include "tools/gn/location.h" 10 #include "tools/gn/location.h"
9 11
10 namespace { 12 namespace {
11 13
12 bool RangeIs(const LocationRange& range, 14 bool RangeIs(const LocationRange& range,
13 int line, int begin_char, int end_char) { 15 int line, int begin_char, int end_char) {
14 return range.begin().line_number() == line && 16 return range.begin().line_number() == line &&
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 InputFile file(SourceFile("//foo.cc")); 150 InputFile file(SourceFile("//foo.cc"));
149 file.SetContents(buffer); 151 file.SetContents(buffer);
150 152
151 base::StringPiece contents; 153 base::StringPiece contents;
152 LocationRange range; 154 LocationRange range;
153 155
154 CIncludeIterator iter(&file); 156 CIncludeIterator iter(&file);
155 EXPECT_TRUE(iter.GetNextIncludeString(&contents, &range)); 157 EXPECT_TRUE(iter.GetNextIncludeString(&contents, &range));
156 EXPECT_EQ("foo/bar.h", contents); 158 EXPECT_EQ("foo/bar.h", contents);
157 } 159 }
OLDNEW
« no previous file with comments | « tools/gn/c_include_iterator.cc ('k') | tools/gn/command_args.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698