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

Unified Diff: tools/gn/command_format_unittest.cc

Issue 613083003: gn format: support absolute file system paths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: help Created 6 years, 2 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
Index: tools/gn/command_format_unittest.cc
diff --git a/tools/gn/command_format_unittest.cc b/tools/gn/command_format_unittest.cc
index 060542935b4cfca30be09daa86adfaa5540d1600..cad69a4ac759052371ac4d6a382c85eedd75bb32 100644
--- a/tools/gn/command_format_unittest.cc
+++ b/tools/gn/command_format_unittest.cc
@@ -6,19 +6,25 @@
#include "base/strings/string_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "tools/gn/commands.h"
+#include "tools/gn/setup.h"
namespace commands {
-bool FormatFileToString(const std::string& input_filename,
+bool FormatFileToString(Setup* setup,
+ const SourceFile& file,
bool dump_tree,
std::string* output);
} // namespace commands
#define FORMAT_TEST(n) \
TEST(Format, n) { \
+ ::Setup setup; \
std::string out; \
std::string expected; \
EXPECT_TRUE(commands::FormatFileToString( \
- "//tools/gn/format_test_data/" #n ".gn", false, &out)); \
+ &setup, \
+ SourceFile("//tools/gn/format_test_data/" #n ".gn"), \
+ false, \
+ &out)); \
ASSERT_TRUE(base::ReadFileToString( \
base::FilePath(FILE_PATH_LITERAL("tools/gn/format_test_data/") \
FILE_PATH_LITERAL(#n) \

Powered by Google App Engine
This is Rietveld 408576698