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

Unified Diff: tools/gn/ninja_create_bundle_target_writer_unittest.cc

Issue 1911873002: Store BundleData paths as SourceDirs rather than strings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-phony-bundle-target
Patch Set: Created 4 years, 8 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/create_bundle_target_generator.cc ('k') | no next file » | 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 44dd8941fc316840b966cdc511f89cd7db7278fb..d35b519adc2649e7253469185763c05b7443b463 100644
--- a/tools/gn/ninja_create_bundle_target_writer_unittest.cc
+++ b/tools/gn/ninja_create_bundle_target_writer_unittest.cc
@@ -14,10 +14,11 @@
namespace {
void SetupBundleDataDir(BundleData* bundle_data, const std::string& root_dir) {
- bundle_data->root_dir().assign(root_dir + "/bar.bundle");
- bundle_data->resources_dir().assign(bundle_data->root_dir() + "/Resources");
- bundle_data->executable_dir().assign(bundle_data->root_dir() + "/Executable");
- bundle_data->plugins_dir().assign(bundle_data->root_dir() + "/PlugIns");
+ std::string bundle_root_dir = root_dir + "/bar.bundle";
+ bundle_data->root_dir() = SourceDir(bundle_root_dir);
+ bundle_data->resources_dir() = SourceDir(bundle_root_dir + "/Resources");
+ bundle_data->executable_dir() = SourceDir(bundle_root_dir + "/Executable");
+ bundle_data->plugins_dir() = SourceDir(bundle_root_dir + "/PlugIns");
}
} // namespace
@@ -115,10 +116,11 @@ TEST(NinjaCreateBundleTargetWriter, BundleRootDirOutput) {
target.set_output_type(Target::CREATE_BUNDLE);
const std::string bundle_root_dir("//out/Debug/bar.bundle/Contents");
- target.bundle_data().root_dir().assign(bundle_root_dir);
- target.bundle_data().resources_dir().assign(bundle_root_dir + "/Resources");
- target.bundle_data().executable_dir().assign(bundle_root_dir + "/MacOS");
- target.bundle_data().plugins_dir().assign(bundle_root_dir + "/Plug Ins");
+ target.bundle_data().root_dir() = SourceDir(bundle_root_dir);
+ target.bundle_data().resources_dir() =
+ SourceDir(bundle_root_dir + "/Resources");
+ target.bundle_data().executable_dir() = SourceDir(bundle_root_dir + "/MacOS");
+ target.bundle_data().plugins_dir() = SourceDir(bundle_root_dir + "/Plug Ins");
std::vector<SourceFile> sources;
sources.push_back(SourceFile("//foo/input1.txt"));
« no previous file with comments | « tools/gn/create_bundle_target_generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698