Index: tools/gn/target_unittest.cc |
diff --git a/tools/gn/target_unittest.cc b/tools/gn/target_unittest.cc |
index 426243ece8ccc14479f847d6902f405c028325e3..e7c4c31bd820abec72376840827b21241f5387ca 100644 |
--- a/tools/gn/target_unittest.cc |
+++ b/tools/gn/target_unittest.cc |
@@ -386,6 +386,8 @@ TEST(Target, PublicConfigs) { |
Label pub_config_label(SourceDir("//a/"), "pubconfig"); |
Config pub_config(setup.settings(), pub_config_label); |
+ std::string lib_name("testlib"); |
+ pub_config.own_values().libs().push_back(lib_name); |
ASSERT_TRUE(pub_config.OnResolved(&err)); |
// This is the destination target that has a public config. |
@@ -406,6 +408,11 @@ TEST(Target, PublicConfigs) { |
ASSERT_EQ(1u, dep_on_pub.configs().size()); |
EXPECT_EQ(&pub_config, dep_on_pub.configs()[0].ptr); |
+ // Libs have special handling, check that they were forwarded from the |
+ // public config to all_libs. |
+ ASSERT_EQ(1u, dep_on_pub.all_libs().size()); |
+ ASSERT_EQ(lib_name, dep_on_pub.all_libs()[0]); |
+ |
// This target has a private dependency on dest for forwards configs. |
TestTarget forward(setup, "//a:f", Target::SOURCE_SET); |
forward.private_deps().push_back(LabelTargetPair(&dest)); |