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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 | 814 |
815 ASSERT_TRUE(e.OnResolved(&err)); | 815 ASSERT_TRUE(e.OnResolved(&err)); |
816 ASSERT_TRUE(c.OnResolved(&err)); | 816 ASSERT_TRUE(c.OnResolved(&err)); |
817 ASSERT_TRUE(a.OnResolved(&err)); | 817 ASSERT_TRUE(a.OnResolved(&err)); |
818 | 818 |
819 // A gets its data from B and F. | 819 // A gets its data from B and F. |
820 ASSERT_EQ(a.bundle_data().file_rules().size(), 2u); | 820 ASSERT_EQ(a.bundle_data().file_rules().size(), 2u); |
821 ASSERT_EQ(a.bundle_data().file_rules()[0].sources().size(), 2u); | 821 ASSERT_EQ(a.bundle_data().file_rules()[0].sources().size(), 2u); |
822 ASSERT_EQ(a.bundle_data().file_rules()[1].sources().size(), 3u); | 822 ASSERT_EQ(a.bundle_data().file_rules()[1].sources().size(), 3u); |
823 ASSERT_EQ(a.bundle_data().asset_catalog_sources().size(), 4u); | 823 ASSERT_EQ(a.bundle_data().asset_catalog_sources().size(), 4u); |
| 824 ASSERT_EQ(a.bundle_data().bundle_deps().size(), 2u); |
824 | 825 |
825 // C gets its data from D. | 826 // C gets its data from D. |
826 ASSERT_EQ(c.bundle_data().file_rules().size(), 1u); | 827 ASSERT_EQ(c.bundle_data().file_rules().size(), 1u); |
827 ASSERT_EQ(c.bundle_data().file_rules()[0].sources().size(), 1u); | 828 ASSERT_EQ(c.bundle_data().file_rules()[0].sources().size(), 1u); |
| 829 ASSERT_EQ(c.bundle_data().bundle_deps().size(), 1u); |
| 830 |
| 831 // E does not have any bundle_data information but gets a list of |
| 832 // bundle_deps to propagate them during target resolution. |
| 833 ASSERT_TRUE(e.bundle_data().file_rules().empty()); |
| 834 ASSERT_TRUE(e.bundle_data().asset_catalog_sources().empty()); |
| 835 ASSERT_EQ(e.bundle_data().bundle_deps().size(), 2u); |
828 } | 836 } |
OLD | NEW |