summaryrefslogtreecommitdiffstats
path: root/src/parsers_test.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-12-19 18:59:29 (GMT)
committerEvan Martin <martine@danga.com>2011-12-19 19:18:47 (GMT)
commit8b929cf7c82b5ff84a874c5a25e919446c3874d5 (patch)
tree634d0eac640d4877560dc22250cb5191c5794e69 /src/parsers_test.cc
parentca46af55eb61373b92e49e936a65a465ed277f51 (diff)
downloadNinja-8b929cf7c82b5ff84a874c5a25e919446c3874d5.zip
Ninja-8b929cf7c82b5ff84a874c5a25e919446c3874d5.tar.gz
Ninja-8b929cf7c82b5ff84a874c5a25e919446c3874d5.tar.bz2
split out depfile parser tests into new file
Diffstat (limited to 'src/parsers_test.cc')
-rw-r--r--src/parsers_test.cc34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/parsers_test.cc b/src/parsers_test.cc
index 0e6d532..71cfed3 100644
--- a/src/parsers_test.cc
+++ b/src/parsers_test.cc
@@ -16,7 +16,6 @@
#include <gtest/gtest.h>
-#include "depfile_parser.h"
#include "graph.h"
#include "state.h"
@@ -487,36 +486,3 @@ TEST_F(ParserTest, DefaultStatements) {
EXPECT_EQ("b", nodes[1]->path());
EXPECT_EQ("c", nodes[2]->path());
}
-
-TEST(DepfileParser, Basic) {
- DepfileParser parser;
- string err;
- EXPECT_TRUE(parser.Parse(
-"build/ninja.o: ninja.cc ninja.h eval_env.h manifest_parser.h\n",
- &err));
- ASSERT_EQ("", err);
- EXPECT_EQ("build/ninja.o", parser.out_.AsString());
- EXPECT_EQ(4u, parser.ins_.size());
-}
-
-TEST(DepfileParser, EarlyNewlineAndWhitespace) {
- DepfileParser parser;
- string err;
- EXPECT_TRUE(parser.Parse(
-" \\\n"
-" out: in\n",
- &err));
- ASSERT_EQ("", err);
-}
-
-TEST(DepfileParser, Continuation) {
- DepfileParser parser;
- string err;
- EXPECT_TRUE(parser.Parse(
-"foo.o: \\\n"
-" bar.h baz.h\n",
- &err));
- ASSERT_EQ("", err);
- EXPECT_EQ("foo.o", parser.out_.AsString());
- EXPECT_EQ(2u, parser.ins_.size());
-}