summaryrefslogtreecommitdiffstats
path: root/src/msvc_helper_test.cc
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2015-06-18 22:41:47 (GMT)
committerScott Graham <scottmg@chromium.org>2015-06-18 22:41:47 (GMT)
commitfd4b140467887be6cb96154d28b9636fe387c69d (patch)
tree5720c9a8ea1089a66c63ed39fd2a76ffe31c5197 /src/msvc_helper_test.cc
parent38aba9dbe68b800038f1cefc827362c126c7b212 (diff)
downloadNinja-fd4b140467887be6cb96154d28b9636fe387c69d.zip
Ninja-fd4b140467887be6cb96154d28b9636fe387c69d.tar.gz
Ninja-fd4b140467887be6cb96154d28b9636fe387c69d.tar.bz2
propagate include normalization failure to caller instead
Diffstat (limited to 'src/msvc_helper_test.cc')
-rw-r--r--src/msvc_helper_test.cc25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/msvc_helper_test.cc b/src/msvc_helper_test.cc
index 29db650..49d27c1 100644
--- a/src/msvc_helper_test.cc
+++ b/src/msvc_helper_test.cc
@@ -46,11 +46,12 @@ TEST(CLParserTest, FilterInputFilename) {
TEST(CLParserTest, ParseSimple) {
CLParser parser;
- string output = parser.Parse(
+ string output, err;
+ ASSERT_TRUE(parser.Parse(
"foo\r\n"
"Note: inc file prefix: foo.h\r\n"
"bar\r\n",
- "Note: inc file prefix:");
+ "Note: inc file prefix:", &output, &err));
ASSERT_EQ("foo\nbar\n", output);
ASSERT_EQ(1u, parser.includes_.size());
@@ -59,20 +60,22 @@ TEST(CLParserTest, ParseSimple) {
TEST(CLParserTest, ParseFilenameFilter) {
CLParser parser;
- string output = parser.Parse(
+ string output, err;
+ ASSERT_TRUE(parser.Parse(
"foo.cc\r\n"
"cl: warning\r\n",
- "");
+ "", &output, &err));
ASSERT_EQ("cl: warning\n", output);
}
TEST(CLParserTest, ParseSystemInclude) {
CLParser parser;
- string output = parser.Parse(
+ string output, err;
+ ASSERT_TRUE(parser.Parse(
"Note: including file: c:\\Program Files\\foo.h\r\n"
"Note: including file: d:\\Microsoft Visual Studio\\bar.h\r\n"
"Note: including file: path.h\r\n",
- "");
+ "", &output, &err));
// We should have dropped the first two includes because they look like
// system headers.
ASSERT_EQ("", output);
@@ -82,11 +85,12 @@ TEST(CLParserTest, ParseSystemInclude) {
TEST(CLParserTest, DuplicatedHeader) {
CLParser parser;
- string output = parser.Parse(
+ string output, err;
+ ASSERT_TRUE(parser.Parse(
"Note: including file: foo.h\r\n"
"Note: including file: bar.h\r\n"
"Note: including file: foo.h\r\n",
- "");
+ "", &output, &err));
// We should have dropped one copy of foo.h.
ASSERT_EQ("", output);
ASSERT_EQ(2u, parser.includes_.size());
@@ -94,11 +98,12 @@ TEST(CLParserTest, DuplicatedHeader) {
TEST(CLParserTest, DuplicatedHeaderPathConverted) {
CLParser parser;
- string output = parser.Parse(
+ string output, err;
+ ASSERT_TRUE(parser.Parse(
"Note: including file: sub/foo.h\r\n"
"Note: including file: bar.h\r\n"
"Note: including file: sub\\foo.h\r\n",
- "");
+ "", &output, &err));
// We should have dropped one copy of foo.h.
ASSERT_EQ("", output);
ASSERT_EQ(2u, parser.includes_.size());