diff options
Diffstat (limited to 'src/msvc_helper_test.cc')
-rw-r--r-- | src/msvc_helper_test.cc | 25 |
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()); |