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

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

Issue 2105613003: Fix dependencies rules for create_bundle and bundle_data ninja steps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove stamps (to allow using hardlinks) Created 4 years, 5 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/runtime_deps_unittest.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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « tools/gn/runtime_deps_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698