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

Unified Diff: tools/gn/target_unittest.cc

Issue 51693002: GN: toolchain threading cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/target.cc ('k') | tools/gn/test_with_scope.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target_unittest.cc
diff --git a/tools/gn/target_unittest.cc b/tools/gn/target_unittest.cc
index ea1700f79ee83f48b03adfbee674ce51fbf7024a..ef213b5286fa9d1ab9a064182280e742a057ea79 100644
--- a/tools/gn/target_unittest.cc
+++ b/tools/gn/target_unittest.cc
@@ -15,16 +15,17 @@ class TargetTest : public testing::Test {
public:
TargetTest()
: build_settings_(),
- toolchain_(Label(SourceDir("//tc/"), "tc")),
- settings_(&build_settings_, &toolchain_, std::string()) {
+ settings_(&build_settings_, std::string()),
+ toolchain_(&settings_, Label(SourceDir("//tc/"), "tc")) {
+ settings_.set_toolchain_label(toolchain_.label());
}
virtual ~TargetTest() {
}
protected:
BuildSettings build_settings_;
- Toolchain toolchain_;
Settings settings_;
+ Toolchain toolchain_;
};
} // namespace
@@ -122,15 +123,15 @@ TEST_F(TargetTest, DependentConfigs) {
b.deps().push_back(LabelTargetPair(&c));
// Normal non-inherited config.
- Config config(Label(SourceDir("//foo/"), "config"));
+ Config config(&settings_, Label(SourceDir("//foo/"), "config"));
c.configs().push_back(LabelConfigPair(&config));
// All dependent config.
- Config all(Label(SourceDir("//foo/"), "all"));
+ Config all(&settings_, Label(SourceDir("//foo/"), "all"));
c.all_dependent_configs().push_back(LabelConfigPair(&all));
// Direct dependent config.
- Config direct(Label(SourceDir("//foo/"), "direct"));
+ Config direct(&settings_, Label(SourceDir("//foo/"), "direct"));
c.direct_dependent_configs().push_back(LabelConfigPair(&direct));
c.OnResolved();
« no previous file with comments | « tools/gn/target.cc ('k') | tools/gn/test_with_scope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698