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

Unified Diff: tools/gn/path_output_unittest.cc

Issue 406453002: Hook up symbol files to the Windows GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/path_output.cc ('k') | tools/gn/variables.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/path_output_unittest.cc
diff --git a/tools/gn/path_output_unittest.cc b/tools/gn/path_output_unittest.cc
index 389f96a40451db4b87f88c3ebdb4f84cbf071161..217f6dcfc3b30409dcd59bd289c0a25f98ce5d1c 100644
--- a/tools/gn/path_output_unittest.cc
+++ b/tools/gn/path_output_unittest.cc
@@ -5,6 +5,7 @@
#include <sstream>
#include "testing/gtest/include/gtest/gtest.h"
+#include "tools/gn/output_file.h"
#include "tools/gn/path_output.h"
#include "tools/gn/source_dir.h"
#include "tools/gn/source_file.h"
@@ -213,8 +214,6 @@ TEST(PathOutput, WriteDir) {
// Output inside current dir.
{
std::ostringstream out;
-
-
writer.WriteDir(out, SourceDir("//out/Debug/"),
PathOutput::DIR_INCLUDE_LAST_SLASH);
EXPECT_EQ("./", out.str());
@@ -237,6 +236,26 @@ TEST(PathOutput, WriteDir) {
PathOutput::DIR_NO_LAST_SLASH);
EXPECT_EQ("foo", out.str());
}
+
+ // WriteDir using an OutputFile.
+ {
+ std::ostringstream out;
+ writer.WriteDir(out, OutputFile("foo/"),
+ PathOutput::DIR_INCLUDE_LAST_SLASH);
+ EXPECT_EQ("foo/", out.str());
+ }
+ {
+ std::ostringstream out;
+ writer.WriteDir(out, OutputFile("foo/"),
+ PathOutput::DIR_NO_LAST_SLASH);
+ EXPECT_EQ("foo", out.str());
+ }
+ {
+ std::ostringstream out;
+ writer.WriteDir(out, OutputFile(),
+ PathOutput::DIR_INCLUDE_LAST_SLASH);
+ EXPECT_EQ("", out.str());
+ }
}
{
// Empty build dir writer.
« no previous file with comments | « tools/gn/path_output.cc ('k') | tools/gn/variables.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698