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

Unified Diff: tools/gn/builder_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/builder.cc ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/builder_unittest.cc
diff --git a/tools/gn/builder_unittest.cc b/tools/gn/builder_unittest.cc
index bac91926ac8851e903251abb94c05fc9c722f8a9..b9b7e5fb50b75b267ef208426a6c0a88d19eda32 100644
--- a/tools/gn/builder_unittest.cc
+++ b/tools/gn/builder_unittest.cc
@@ -99,7 +99,7 @@ TEST_F(BuilderTest, BasicDeps) {
// The builder will take ownership of the pointers.
Target* a = new Target(&settings_, a_label);
- a->deps().push_back(LabelTargetPair(b_label));
+ a->public_deps().push_back(LabelTargetPair(b_label));
a->set_output_type(Target::EXECUTABLE);
builder_->ItemDefined(scoped_ptr<Item>(a));
@@ -145,6 +145,7 @@ TEST_F(BuilderTest, BasicDeps) {
// Add the C target.
Target* c = new Target(&settings_, c_label);
c->set_output_type(Target::STATIC_LIBRARY);
+ c->visibility().SetPublic();
builder_->ItemDefined(scoped_ptr<Item>(c));
// C only depends on the already-loaded toolchain so we shouldn't have
@@ -153,8 +154,9 @@ TEST_F(BuilderTest, BasicDeps) {
// Add the B target.
Target* b = new Target(&settings_, b_label);
- a->deps().push_back(LabelTargetPair(c_label));
+ a->public_deps().push_back(LabelTargetPair(c_label));
b->set_output_type(Target::SHARED_LIBRARY);
+ b->visibility().SetPublic();
builder_->ItemDefined(scoped_ptr<Item>(b));
// B depends only on the already-loaded C and toolchain so we shouldn't have
@@ -197,6 +199,7 @@ TEST_F(BuilderTest, ShouldGenerate) {
// First define B.
Target* b = new Target(&settings2, b_label);
+ b->visibility().SetPublic();
b->set_output_type(Target::EXECUTABLE);
builder_->ItemDefined(scoped_ptr<Item>(b));
@@ -206,7 +209,7 @@ TEST_F(BuilderTest, ShouldGenerate) {
// Define A with a dependency on B.
Target* a = new Target(&settings_, a_label);
- a->deps().push_back(LabelTargetPair(b_label));
+ a->public_deps().push_back(LabelTargetPair(b_label));
a->set_output_type(Target::EXECUTABLE);
builder_->ItemDefined(scoped_ptr<Item>(a));
« no previous file with comments | « tools/gn/builder.cc ('k') | tools/gn/command_desc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698