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

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

Issue 1453843003: tools/gn: mark first TestTarget parameter as const (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/test_with_scope.h ('k') | no next file » | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "tools/gn/test_with_scope.h" 5 #include "tools/gn/test_with_scope.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "tools/gn/parser.h" 8 #include "tools/gn/parser.h"
9 #include "tools/gn/tokenizer.h" 9 #include "tools/gn/tokenizer.h"
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 input_file_.SetContents(input); 149 input_file_.SetContents(input);
150 150
151 tokens_ = Tokenizer::Tokenize(&input_file_, &parse_err_); 151 tokens_ = Tokenizer::Tokenize(&input_file_, &parse_err_);
152 if (!parse_err_.has_error()) 152 if (!parse_err_.has_error())
153 parsed_ = Parser::Parse(tokens_, &parse_err_); 153 parsed_ = Parser::Parse(tokens_, &parse_err_);
154 } 154 }
155 155
156 TestParseInput::~TestParseInput() { 156 TestParseInput::~TestParseInput() {
157 } 157 }
158 158
159 TestTarget::TestTarget(TestWithScope& setup, 159 TestTarget::TestTarget(const TestWithScope& setup,
160 const std::string& label_string, 160 const std::string& label_string,
161 Target::OutputType type) 161 Target::OutputType type)
162 : Target(setup.settings(), setup.ParseLabel(label_string)) { 162 : Target(setup.settings(), setup.ParseLabel(label_string)) {
163 visibility().SetPublic(); 163 visibility().SetPublic();
164 set_output_type(type); 164 set_output_type(type);
165 SetToolchain(setup.toolchain()); 165 SetToolchain(setup.toolchain());
166 } 166 }
167 167
168 TestTarget::~TestTarget() { 168 TestTarget::~TestTarget() {
169 } 169 }
OLDNEW
« no previous file with comments | « tools/gn/test_with_scope.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698