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

Unified Diff: tools/gn/path_output_unittest.cc

Issue 213353004: GN: Move towards only using / on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: only generate / in various places Created 6 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 side-by-side diff with in-line comments
Download patch
Index: tools/gn/path_output_unittest.cc
diff --git a/tools/gn/path_output_unittest.cc b/tools/gn/path_output_unittest.cc
index 49f29c9a55bbadca719e0eb3469063e3cf9acc52..063f7f736bf974f2a6b44c60502dcb38499c4ef5 100644
--- a/tools/gn/path_output_unittest.cc
+++ b/tools/gn/path_output_unittest.cc
@@ -11,7 +11,7 @@
TEST(PathOutput, Basic) {
SourceDir build_dir("//out/Debug/");
- PathOutput writer(build_dir, ESCAPE_NONE, false);
+ PathOutput writer(build_dir, ESCAPE_NONE);
{
// Normal source-root path.
std::ostringstream out;
@@ -52,7 +52,7 @@ TEST(PathOutput, Basic) {
// Same as basic but the output dir is the root.
TEST(PathOutput, BasicInRoot) {
SourceDir build_dir("//");
- PathOutput writer(build_dir, ESCAPE_NONE, false);
+ PathOutput writer(build_dir, ESCAPE_NONE);
{
// Normal source-root path.
std::ostringstream out;
@@ -69,7 +69,7 @@ TEST(PathOutput, BasicInRoot) {
TEST(PathOutput, NinjaEscaping) {
SourceDir build_dir("//out/Debug/");
- PathOutput writer(build_dir, ESCAPE_NINJA, false);
+ PathOutput writer(build_dir, ESCAPE_NINJA);
{
// Spaces and $ in filenames.
std::ostringstream out;
@@ -86,7 +86,7 @@ TEST(PathOutput, NinjaEscaping) {
TEST(PathOutput, ShellEscaping) {
SourceDir build_dir("//out/Debug/");
- PathOutput writer(build_dir, ESCAPE_SHELL, false);
+ PathOutput writer(build_dir, ESCAPE_SHELL);
{
// Spaces in filenames should get quoted.
std::ostringstream out;
@@ -113,21 +113,17 @@ TEST(PathOutput, ShellEscaping) {
TEST(PathOutput, SlashConversion) {
SourceDir build_dir("//out/Debug/");
- PathOutput writer(build_dir, ESCAPE_NINJA, true);
+ PathOutput writer(build_dir, ESCAPE_NINJA);
{
std::ostringstream out;
writer.WriteFile(out, SourceFile("//foo/bar.cc"));
-#if defined(OS_WIN)
- EXPECT_EQ("..\\..\\foo\\bar.cc", out.str());
-#else
EXPECT_EQ("../../foo/bar.cc", out.str());
-#endif
}
}
TEST(PathOutput, InhibitQuoting) {
SourceDir build_dir("//out/Debug/");
- PathOutput writer(build_dir, ESCAPE_SHELL, false);
+ PathOutput writer(build_dir, ESCAPE_SHELL);
writer.set_inhibit_quoting(true);
{
// We should get unescaped spaces in the output with no quotes.
@@ -140,7 +136,7 @@ TEST(PathOutput, InhibitQuoting) {
TEST(PathOutput, WriteDir) {
{
SourceDir build_dir("//out/Debug/");
- PathOutput writer(build_dir, ESCAPE_NINJA, false);
+ PathOutput writer(build_dir, ESCAPE_NINJA);
{
std::ostringstream out;
writer.WriteDir(out, SourceDir("//foo/bar/"),
@@ -216,7 +212,7 @@ TEST(PathOutput, WriteDir) {
}
{
// Empty build dir writer.
- PathOutput root_writer(SourceDir("//"), ESCAPE_NINJA, false);
+ PathOutput root_writer(SourceDir("//"), ESCAPE_NINJA);
{
std::ostringstream out;
root_writer.WriteDir(out, SourceDir("//"),
« tools/gn/build_settings.cc ('K') | « tools/gn/path_output.cc ('k') | tools/gn/setup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698