OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |