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

Unified Diff: tools/gn/ninja_build_writer_unittest.cc

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)
Patch Set: Fix compilation after rebase. Created 3 years, 6 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
Index: tools/gn/ninja_build_writer_unittest.cc
diff --git a/tools/gn/ninja_build_writer_unittest.cc b/tools/gn/ninja_build_writer_unittest.cc
index 98852313fd65cf1cf559ff57ce3dd37822dcefd8..4d2ebf0cd6f6691bbda08ca50df2a8d87b18f396 100644
--- a/tools/gn/ninja_build_writer_unittest.cc
+++ b/tools/gn/ninja_build_writer_unittest.cc
@@ -16,7 +16,7 @@ TEST(NinjaBuildWriter, TwoTargets) {
TestWithScope setup;
Err err;
- Target target_foo(setup.settings(), Label(SourceDir("//foo/"), "bar"));
+ Target target_foo(setup.settings(), Label(SourceDir("//foo/"), "bar"), {});
target_foo.set_output_type(Target::ACTION);
target_foo.action_values().set_script(SourceFile("//foo/script.py"));
target_foo.action_values().outputs() = SubstitutionList::MakeForTest(
@@ -24,7 +24,7 @@ TEST(NinjaBuildWriter, TwoTargets) {
target_foo.SetToolchain(setup.toolchain());
ASSERT_TRUE(target_foo.OnResolved(&err));
- Target target_bar(setup.settings(), Label(SourceDir("//bar/"), "bar"));
+ Target target_bar(setup.settings(), Label(SourceDir("//bar/"), "bar"), {});
target_bar.set_output_type(Target::ACTION);
target_bar.action_values().set_script(SourceFile("//bar/script.py"));
target_bar.action_values().outputs() = SubstitutionList::MakeForTest(
@@ -34,12 +34,13 @@ TEST(NinjaBuildWriter, TwoTargets) {
// Make a secondary toolchain that references a pool.
Label other_toolchain_label(SourceDir("//other/"), "toolchain");
- Pool other_pool(setup.settings(),
- Label(SourceDir("//other/"), "pool",
- other_toolchain_label.dir(),
- other_toolchain_label.name()));
+ Pool other_pool(
+ setup.settings(),
+ Label(SourceDir("//other/"), "pool", other_toolchain_label.dir(),
+ other_toolchain_label.name()),
+ {});
other_pool.set_depth(42);
- Toolchain other_toolchain(setup.settings(), other_toolchain_label);
+ Toolchain other_toolchain(setup.settings(), other_toolchain_label, {});
TestWithScope::SetupToolchain(&other_toolchain);
other_toolchain.GetTool(Toolchain::TYPE_LINK)->set_pool(
LabelPtrPair<Pool>(&other_pool));
@@ -101,7 +102,7 @@ TEST(NinjaBuildWriter, DuplicateOutputs) {
TestWithScope setup;
Err err;
- Target target_foo(setup.settings(), Label(SourceDir("//foo/"), "bar"));
+ Target target_foo(setup.settings(), Label(SourceDir("//foo/"), "bar"), {});
target_foo.set_output_type(Target::ACTION);
target_foo.action_values().set_script(SourceFile("//foo/script.py"));
target_foo.action_values().outputs() = SubstitutionList::MakeForTest(
@@ -109,7 +110,7 @@ TEST(NinjaBuildWriter, DuplicateOutputs) {
target_foo.SetToolchain(setup.toolchain());
ASSERT_TRUE(target_foo.OnResolved(&err));
- Target target_bar(setup.settings(), Label(SourceDir("//bar/"), "bar"));
+ Target target_bar(setup.settings(), Label(SourceDir("//bar/"), "bar"), {});
target_bar.set_output_type(Target::ACTION);
target_bar.action_values().set_script(SourceFile("//bar/script.py"));
target_bar.action_values().outputs() = SubstitutionList::MakeForTest(
« no previous file with comments | « tools/gn/ninja_binary_target_writer_unittest.cc ('k') | tools/gn/ninja_bundle_data_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698