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

Side by Side Diff: tools/gn/target_unittest.cc

Issue 1804263003: Consider bundle_data as public_deps of create_bundle targets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@{interstitial}
Patch Set: Second round of comments Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « tools/gn/target.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « tools/gn/target.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698