| Index: tools/gn/target_unittest.cc
|
| diff --git a/tools/gn/target_unittest.cc b/tools/gn/target_unittest.cc
|
| index 151cb31f5549f57bc9fe663303626d5e1fc3310b..a8f031bc3582be1364ad54c680e8fc95a992451f 100644
|
| --- a/tools/gn/target_unittest.cc
|
| +++ b/tools/gn/target_unittest.cc
|
| @@ -225,6 +225,27 @@ TEST(Target, InheritCompleteStaticLib) {
|
| EXPECT_TRUE(a_inherited.IndexOf(&b) != static_cast<size_t>(-1));
|
| }
|
|
|
| +TEST(Target, InheritCompleteStaticLibNoStaticLibDeps) {
|
| + TestWithScope setup;
|
| + Err err;
|
| +
|
| + // Create a dependency chain:
|
| + // A (complete static lib) -> B (static lib)
|
| + Target a(setup.settings(), Label(SourceDir("//foo/"), "a"));
|
| + a.set_output_type(Target::STATIC_LIBRARY);
|
| + a.visibility().SetPublic();
|
| + a.set_complete_static_lib(true);
|
| + a.SetToolchain(setup.toolchain());
|
| + Target b(setup.settings(), Label(SourceDir("//foo/"), "b"));
|
| + b.set_output_type(Target::STATIC_LIBRARY);
|
| + b.visibility().SetPublic();
|
| + b.SetToolchain(setup.toolchain());
|
| +
|
| + a.public_deps().push_back(LabelTargetPair(&b));
|
| + ASSERT_TRUE(b.OnResolved(&err));
|
| + ASSERT_FALSE(a.OnResolved(&err));
|
| +}
|
| +
|
| TEST(Target, GetComputedOutputName) {
|
| TestWithScope setup;
|
| Err err;
|
|
|