| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "tools/gn/target.h" | 5 #include "tools/gn/target.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "tools/gn/build_settings.h" | 10 #include "tools/gn/build_settings.h" |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 ASSERT_TRUE(f.OnResolved(&err)); | 900 ASSERT_TRUE(f.OnResolved(&err)); |
| 901 | 901 |
| 902 ASSERT_TRUE(e.OnResolved(&err)); | 902 ASSERT_TRUE(e.OnResolved(&err)); |
| 903 ASSERT_TRUE(c.OnResolved(&err)); | 903 ASSERT_TRUE(c.OnResolved(&err)); |
| 904 ASSERT_TRUE(a.OnResolved(&err)); | 904 ASSERT_TRUE(a.OnResolved(&err)); |
| 905 | 905 |
| 906 // A gets its data from B and F. | 906 // A gets its data from B and F. |
| 907 ASSERT_EQ(a.bundle_data().file_rules().size(), 2u); | 907 ASSERT_EQ(a.bundle_data().file_rules().size(), 2u); |
| 908 ASSERT_EQ(a.bundle_data().file_rules()[0].sources().size(), 2u); | 908 ASSERT_EQ(a.bundle_data().file_rules()[0].sources().size(), 2u); |
| 909 ASSERT_EQ(a.bundle_data().file_rules()[1].sources().size(), 3u); | 909 ASSERT_EQ(a.bundle_data().file_rules()[1].sources().size(), 3u); |
| 910 ASSERT_EQ(a.bundle_data().asset_catalog_sources().size(), 4u); | 910 ASSERT_EQ(a.bundle_data().assets_catalog_sources().size(), 1u); |
| 911 ASSERT_EQ(a.bundle_data().bundle_deps().size(), 2u); | 911 ASSERT_EQ(a.bundle_data().bundle_deps().size(), 2u); |
| 912 | 912 |
| 913 // C gets its data from D. | 913 // C gets its data from D. |
| 914 ASSERT_EQ(c.bundle_data().file_rules().size(), 1u); | 914 ASSERT_EQ(c.bundle_data().file_rules().size(), 1u); |
| 915 ASSERT_EQ(c.bundle_data().file_rules()[0].sources().size(), 1u); | 915 ASSERT_EQ(c.bundle_data().file_rules()[0].sources().size(), 1u); |
| 916 ASSERT_EQ(c.bundle_data().bundle_deps().size(), 1u); | 916 ASSERT_EQ(c.bundle_data().bundle_deps().size(), 1u); |
| 917 | 917 |
| 918 // E does not have any bundle_data information but gets a list of | 918 // E does not have any bundle_data information but gets a list of |
| 919 // bundle_deps to propagate them during target resolution. | 919 // bundle_deps to propagate them during target resolution. |
| 920 ASSERT_TRUE(e.bundle_data().file_rules().empty()); | 920 ASSERT_TRUE(e.bundle_data().file_rules().empty()); |
| 921 ASSERT_TRUE(e.bundle_data().asset_catalog_sources().empty()); | 921 ASSERT_TRUE(e.bundle_data().assets_catalog_sources().empty()); |
| 922 ASSERT_EQ(e.bundle_data().bundle_deps().size(), 2u); | 922 ASSERT_EQ(e.bundle_data().bundle_deps().size(), 2u); |
| 923 } | 923 } |
| OLD | NEW |