| 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 |
| 11 TestWithScope::TestWithScope() | 11 TestWithScope::TestWithScope() |
| 12 : build_settings_(), | 12 : build_settings_(), |
| 13 settings_(&build_settings_, std::string()), | 13 settings_(&build_settings_, std::string()), |
| 14 toolchain_(&settings_, Label(SourceDir("//toolchain/"), "default")), | 14 toolchain_(&settings_, Label(SourceDir("//toolchain/"), "default")), |
| 15 scope_(&settings_) { | 15 scope_(&settings_), |
| 16 scope_progammatic_provider_(&scope_, true) { |
| 16 build_settings_.SetBuildDir(SourceDir("//out/Debug/")); | 17 build_settings_.SetBuildDir(SourceDir("//out/Debug/")); |
| 17 build_settings_.set_print_callback( | 18 build_settings_.set_print_callback( |
| 18 base::Bind(&TestWithScope::AppendPrintOutput, base::Unretained(this))); | 19 base::Bind(&TestWithScope::AppendPrintOutput, base::Unretained(this))); |
| 19 | 20 |
| 20 settings_.set_toolchain_label(toolchain_.label()); | 21 settings_.set_toolchain_label(toolchain_.label()); |
| 21 settings_.set_default_toolchain_label(toolchain_.label()); | 22 settings_.set_default_toolchain_label(toolchain_.label()); |
| 22 | 23 |
| 23 SetupToolchain(&toolchain_); | 24 SetupToolchain(&toolchain_); |
| 24 } | 25 } |
| 25 | 26 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 const std::string& label_string, | 150 const std::string& label_string, |
| 150 Target::OutputType type) | 151 Target::OutputType type) |
| 151 : Target(setup.settings(), setup.ParseLabel(label_string)) { | 152 : Target(setup.settings(), setup.ParseLabel(label_string)) { |
| 152 visibility().SetPublic(); | 153 visibility().SetPublic(); |
| 153 set_output_type(type); | 154 set_output_type(type); |
| 154 SetToolchain(setup.toolchain()); | 155 SetToolchain(setup.toolchain()); |
| 155 } | 156 } |
| 156 | 157 |
| 157 TestTarget::~TestTarget() { | 158 TestTarget::~TestTarget() { |
| 158 } | 159 } |
| OLD | NEW |