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

Unified Diff: tools/gn/ninja_create_bundle_target_writer_unittest.cc

Issue 2940873002: Implement tracking of BUILD.gn files used to define target, toolchain or (Closed)
Patch Set: Fix compilation after rebase. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/ninja_copy_target_writer_unittest.cc ('k') | tools/gn/ninja_group_target_writer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_create_bundle_target_writer_unittest.cc
diff --git a/tools/gn/ninja_create_bundle_target_writer_unittest.cc b/tools/gn/ninja_create_bundle_target_writer_unittest.cc
index 15885baf739079a9c9976bcf80bff38d6013312e..070659d028a41d5c09c396b6676d7e718f9a309c 100644
--- a/tools/gn/ninja_create_bundle_target_writer_unittest.cc
+++ b/tools/gn/ninja_create_bundle_target_writer_unittest.cc
@@ -28,7 +28,7 @@ TEST(NinjaCreateBundleTargetWriter, Run) {
Err err;
TestWithScope setup;
- Target bundle_data(setup.settings(), Label(SourceDir("//foo/"), "data"));
+ Target bundle_data(setup.settings(), Label(SourceDir("//foo/"), "data"), {});
bundle_data.set_output_type(Target::BUNDLE_DATA);
bundle_data.sources().push_back(SourceFile("//foo/input1.txt"));
bundle_data.sources().push_back(SourceFile("//foo/input2.txt"));
@@ -41,7 +41,8 @@ TEST(NinjaCreateBundleTargetWriter, Run) {
Target create_bundle(
setup.settings(),
Label(SourceDir("//baz/"), "bar", setup.toolchain()->label().dir(),
- setup.toolchain()->label().name()));
+ setup.toolchain()->label().name()),
+ {});
SetupBundleDataDir(&create_bundle.bundle_data(), "//out/Debug");
create_bundle.set_output_type(Target::CREATE_BUNDLE);
create_bundle.private_deps().push_back(LabelTargetPair(&bundle_data));
@@ -70,7 +71,7 @@ TEST(NinjaCreateBundleTargetWriter, AssetCatalog) {
Err err;
TestWithScope setup;
- Target bundle_data(setup.settings(), Label(SourceDir("//foo/"), "data"));
+ Target bundle_data(setup.settings(), Label(SourceDir("//foo/"), "data"), {});
bundle_data.set_output_type(Target::BUNDLE_DATA);
bundle_data.sources().push_back(
SourceFile("//foo/Foo.xcassets/Contents.json"));
@@ -91,7 +92,8 @@ TEST(NinjaCreateBundleTargetWriter, AssetCatalog) {
Target create_bundle(
setup.settings(),
Label(SourceDir("//baz/"), "bar", setup.toolchain()->label().dir(),
- setup.toolchain()->label().name()));
+ setup.toolchain()->label().name()),
+ {});
SetupBundleDataDir(&create_bundle.bundle_data(), "//out/Debug");
create_bundle.set_output_type(Target::CREATE_BUNDLE);
create_bundle.private_deps().push_back(LabelTargetPair(&bundle_data));
@@ -123,7 +125,8 @@ TEST(NinjaCreateBundleTargetWriter, PhonyTarget) {
Target create_bundle(
setup.settings(),
Label(SourceDir("//baz/"), "bar", setup.toolchain()->label().dir(),
- setup.toolchain()->label().name()));
+ setup.toolchain()->label().name()),
+ {});
SetupBundleDataDir(&create_bundle.bundle_data(), "//out/Debug");
create_bundle.set_output_type(Target::CREATE_BUNDLE);
create_bundle.SetToolchain(setup.toolchain());
@@ -147,7 +150,7 @@ TEST(NinjaCreateBundleTargetWriter, Complex) {
TestWithScope setup;
Target bundle_data0(setup.settings(),
- Label(SourceDir("//qux/"), "info_plist"));
+ Label(SourceDir("//qux/"), "info_plist"), {});
bundle_data0.set_output_type(Target::BUNDLE_DATA);
bundle_data0.sources().push_back(SourceFile("//qux/qux-Info.plist"));
bundle_data0.action_values().outputs() =
@@ -156,7 +159,7 @@ TEST(NinjaCreateBundleTargetWriter, Complex) {
bundle_data0.visibility().SetPublic();
ASSERT_TRUE(bundle_data0.OnResolved(&err));
- Target bundle_data1(setup.settings(), Label(SourceDir("//foo/"), "data"));
+ Target bundle_data1(setup.settings(), Label(SourceDir("//foo/"), "data"), {});
bundle_data1.set_output_type(Target::BUNDLE_DATA);
bundle_data1.sources().push_back(SourceFile("//foo/input1.txt"));
bundle_data1.sources().push_back(SourceFile("//foo/input2.txt"));
@@ -166,7 +169,8 @@ TEST(NinjaCreateBundleTargetWriter, Complex) {
bundle_data1.visibility().SetPublic();
ASSERT_TRUE(bundle_data1.OnResolved(&err));
- Target bundle_data2(setup.settings(), Label(SourceDir("//foo/"), "assets"));
+ Target bundle_data2(setup.settings(), Label(SourceDir("//foo/"), "assets"),
+ {});
bundle_data2.set_output_type(Target::BUNDLE_DATA);
bundle_data2.sources().push_back(
SourceFile("//foo/Foo.xcassets/Contents.json"));
@@ -184,7 +188,8 @@ TEST(NinjaCreateBundleTargetWriter, Complex) {
bundle_data2.visibility().SetPublic();
ASSERT_TRUE(bundle_data2.OnResolved(&err));
- Target bundle_data3(setup.settings(), Label(SourceDir("//quz/"), "assets"));
+ Target bundle_data3(setup.settings(), Label(SourceDir("//quz/"), "assets"),
+ {});
bundle_data3.set_output_type(Target::BUNDLE_DATA);
bundle_data3.sources().push_back(
SourceFile("//quz/Quz.xcassets/Contents.json"));
@@ -205,7 +210,8 @@ TEST(NinjaCreateBundleTargetWriter, Complex) {
Target create_bundle(
setup.settings(),
Label(SourceDir("//baz/"), "bar", setup.toolchain()->label().dir(),
- setup.toolchain()->label().name()));
+ setup.toolchain()->label().name()),
+ {});
SetupBundleDataDir(&create_bundle.bundle_data(), "//out/Debug");
create_bundle.set_output_type(Target::CREATE_BUNDLE);
create_bundle.private_deps().push_back(LabelTargetPair(&bundle_data0));
@@ -249,14 +255,14 @@ TEST(NinjaCreateBundleTargetWriter, CodeSigning) {
Err err;
TestWithScope setup;
- Target executable(setup.settings(), Label(SourceDir("//baz/"), "quz"));
+ Target executable(setup.settings(), Label(SourceDir("//baz/"), "quz"), {});
executable.set_output_type(Target::EXECUTABLE);
executable.sources().push_back(SourceFile("//baz/quz.c"));
executable.SetToolchain(setup.toolchain());
executable.visibility().SetPublic();
ASSERT_TRUE(executable.OnResolved(&err));
- Target bundle_data(setup.settings(), Label(SourceDir("//foo/"), "data"));
+ Target bundle_data(setup.settings(), Label(SourceDir("//foo/"), "data"), {});
bundle_data.set_output_type(Target::BUNDLE_DATA);
bundle_data.sources().push_back(SourceFile("//foo/input1.txt"));
bundle_data.sources().push_back(SourceFile("//foo/input2.txt"));
@@ -269,7 +275,8 @@ TEST(NinjaCreateBundleTargetWriter, CodeSigning) {
Target create_bundle(
setup.settings(),
Label(SourceDir("//baz/"), "bar", setup.toolchain()->label().dir(),
- setup.toolchain()->label().name()));
+ setup.toolchain()->label().name()),
+ {});
SetupBundleDataDir(&create_bundle.bundle_data(), "//out/Debug");
create_bundle.set_output_type(Target::CREATE_BUNDLE);
create_bundle.bundle_data().set_code_signing_script(
« no previous file with comments | « tools/gn/ninja_copy_target_writer_unittest.cc ('k') | tools/gn/ninja_group_target_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698