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

Unified Diff: tools/gn/config_values_extractors_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
« no previous file with comments | « tools/gn/config_unittest.cc ('k') | tools/gn/filesystem_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/config_values_extractors_unittest.cc
diff --git a/tools/gn/config_values_extractors_unittest.cc b/tools/gn/config_values_extractors_unittest.cc
index b8875eafa854385c7a4ad6a43b8a34e49c8b4991..05aa0530c0d8322e8b51c2775c788bbdf21fe0ea 100644
--- a/tools/gn/config_values_extractors_unittest.cc
+++ b/tools/gn/config_values_extractors_unittest.cc
@@ -35,18 +35,19 @@ TEST(ConfigValuesExtractors, IncludeOrdering) {
// (uniquified) to each one so we can check what comes out the other end.
// Set up dep2, direct and all dependent configs.
- Config dep2_all(setup.settings(), Label(SourceDir("//dep2/"), "all"));
+ Config dep2_all(setup.settings(), Label(SourceDir("//dep2/"), "all"), {});
dep2_all.own_values().cflags().push_back("--dep2-all");
dep2_all.own_values().include_dirs().push_back(SourceDir("//dep2/all/"));
ASSERT_TRUE(dep2_all.OnResolved(&err));
- Config dep2_direct(setup.settings(), Label(SourceDir("//dep2/"), "direct"));
+ Config dep2_direct(setup.settings(), Label(SourceDir("//dep2/"), "direct"),
+ {});
dep2_direct.own_values().cflags().push_back("--dep2-direct");
dep2_direct.own_values().include_dirs().push_back(
SourceDir("//dep2/direct/"));
ASSERT_TRUE(dep2_direct.OnResolved(&err));
- Target dep2(setup.settings(), Label(SourceDir("//dep2/"), "dep2"));
+ Target dep2(setup.settings(), Label(SourceDir("//dep2/"), "dep2"), {});
dep2.set_output_type(Target::SOURCE_SET);
dep2.visibility().SetPublic();
dep2.SetToolchain(setup.toolchain());
@@ -55,23 +56,25 @@ TEST(ConfigValuesExtractors, IncludeOrdering) {
// Set up dep1, direct and all dependent configs. Also set up a subconfig
// on "dep1_all" to test sub configs.
- Config dep1_all_sub(setup.settings(), Label(SourceDir("//dep1"), "allch"));
+ Config dep1_all_sub(setup.settings(), Label(SourceDir("//dep1"), "allch"),
+ {});
dep1_all_sub.own_values().cflags().push_back("--dep1-all-sub");
ASSERT_TRUE(dep1_all_sub.OnResolved(&err));
- Config dep1_all(setup.settings(), Label(SourceDir("//dep1/"), "all"));
+ Config dep1_all(setup.settings(), Label(SourceDir("//dep1/"), "all"), {});
dep1_all.own_values().cflags().push_back("--dep1-all");
dep1_all.own_values().include_dirs().push_back(SourceDir("//dep1/all/"));
dep1_all.configs().push_back(LabelConfigPair(&dep1_all_sub));
ASSERT_TRUE(dep1_all.OnResolved(&err));
- Config dep1_direct(setup.settings(), Label(SourceDir("//dep1/"), "direct"));
+ Config dep1_direct(setup.settings(), Label(SourceDir("//dep1/"), "direct"),
+ {});
dep1_direct.own_values().cflags().push_back("--dep1-direct");
dep1_direct.own_values().include_dirs().push_back(
SourceDir("//dep1/direct/"));
ASSERT_TRUE(dep1_direct.OnResolved(&err));
- Target dep1(setup.settings(), Label(SourceDir("//dep1/"), "dep1"));
+ Target dep1(setup.settings(), Label(SourceDir("//dep1/"), "dep1"), {});
dep1.set_output_type(Target::SOURCE_SET);
dep1.visibility().SetPublic();
dep1.SetToolchain(setup.toolchain());
@@ -80,13 +83,13 @@ TEST(ConfigValuesExtractors, IncludeOrdering) {
dep1.private_deps().push_back(LabelTargetPair(&dep2));
// Set up target, direct and all dependent configs.
- Config target_all(setup.settings(), Label(SourceDir("//target/"), "all"));
+ Config target_all(setup.settings(), Label(SourceDir("//target/"), "all"), {});
target_all.own_values().cflags().push_back("--target-all");
target_all.own_values().include_dirs().push_back(SourceDir("//target/all/"));
ASSERT_TRUE(target_all.OnResolved(&err));
Config target_direct(setup.settings(),
- Label(SourceDir("//target/"), "direct"));
+ Label(SourceDir("//target/"), "direct"), {});
target_direct.own_values().cflags().push_back("--target-direct");
target_direct.own_values().include_dirs().push_back(
SourceDir("//target/direct/"));
@@ -94,13 +97,13 @@ TEST(ConfigValuesExtractors, IncludeOrdering) {
// This config is applied directly to target.
Config target_config(setup.settings(),
- Label(SourceDir("//target/"), "config"));
+ Label(SourceDir("//target/"), "config"), {});
target_config.own_values().cflags().push_back("--target-config");
target_config.own_values().include_dirs().push_back(
SourceDir("//target/config/"));
ASSERT_TRUE(target_config.OnResolved(&err));
- Target target(setup.settings(), Label(SourceDir("//target/"), "target"));
+ Target target(setup.settings(), Label(SourceDir("//target/"), "target"), {});
target.set_output_type(Target::SOURCE_SET);
target.SetToolchain(setup.toolchain());
target.all_dependent_configs().push_back(LabelConfigPair(&target_all));
« no previous file with comments | « tools/gn/config_unittest.cc ('k') | tools/gn/filesystem_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698