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

Unified Diff: tools/gn/ninja_target_writer_unittest.cc

Issue 561273003: Add public deps to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 6 years, 3 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/ninja_group_target_writer_unittest.cc ('k') | tools/gn/target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_target_writer_unittest.cc
diff --git a/tools/gn/ninja_target_writer_unittest.cc b/tools/gn/ninja_target_writer_unittest.cc
index 08cde8fccdffbb7230aab30efc37f7d88838bbfe..31c58dc5804fa520e1fde3c6c27bb4765778bdf8 100644
--- a/tools/gn/ninja_target_writer_unittest.cc
+++ b/tools/gn/ninja_target_writer_unittest.cc
@@ -37,6 +37,7 @@ TEST(NinjaTargetWriter, WriteInputDepsStampAndGetDep) {
// Make a base target that's a hard dep (action).
Target base_target(setup.settings(), Label(SourceDir("//foo/"), "base"));
base_target.set_output_type(Target::ACTION);
+ base_target.visibility().SetPublic();
base_target.SetToolchain(setup.toolchain());
base_target.action_values().set_script(SourceFile("//foo/script.py"));
@@ -44,19 +45,21 @@ TEST(NinjaTargetWriter, WriteInputDepsStampAndGetDep) {
// included) and a source (should not be included).
Target target(setup.settings(), Label(SourceDir("//foo/"), "target"));
target.set_output_type(Target::EXECUTABLE);
+ target.visibility().SetPublic();
target.SetToolchain(setup.toolchain());
target.inputs().push_back(SourceFile("//foo/input.txt"));
target.sources().push_back(SourceFile("//foo/source.txt"));
- target.deps().push_back(LabelTargetPair(&base_target));
+ target.public_deps().push_back(LabelTargetPair(&base_target));
// Dependent action to test that action sources will be treated the same as
// inputs.
Target action(setup.settings(), Label(SourceDir("//foo/"), "action"));
action.set_output_type(Target::ACTION);
+ action.visibility().SetPublic();
action.SetToolchain(setup.toolchain());
action.action_values().set_script(SourceFile("//foo/script.py"));
action.sources().push_back(SourceFile("//foo/action_source.txt"));
- action.deps().push_back(LabelTargetPair(&target));
+ action.public_deps().push_back(LabelTargetPair(&target));
ASSERT_TRUE(base_target.OnResolved(&err));
ASSERT_TRUE(target.OnResolved(&err));
« no previous file with comments | « tools/gn/ninja_group_target_writer_unittest.cc ('k') | tools/gn/target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698