Ninja
Classes | Functions
manifest_parser_test.cc File Reference
#include "manifest_parser.h"
#include <map>
#include <vector>
#include "graph.h"
#include "state.h"
#include "test.h"
Include dependency graph for manifest_parser_test.cc:

Go to the source code of this file.

Classes

struct  ParserTest
 

Functions

 TEST_F (ParserTest, Empty)
 
 TEST_F (ParserTest, Rules)
 
 TEST_F (ParserTest, RuleAttributes)
 
 TEST_F (ParserTest, IgnoreIndentedComments)
 
 TEST_F (ParserTest, IgnoreIndentedBlankLines)
 
 TEST_F (ParserTest, ResponseFiles)
 
 TEST_F (ParserTest, InNewline)
 
 TEST_F (ParserTest, Variables)
 
 TEST_F (ParserTest, VariableScope)
 
 TEST_F (ParserTest, Continuation)
 
 TEST_F (ParserTest, Backslash)
 
 TEST_F (ParserTest, Comment)
 
 TEST_F (ParserTest, Dollars)
 
 TEST_F (ParserTest, EscapeSpaces)
 
 TEST_F (ParserTest, CanonicalizeFile)
 
 TEST_F (ParserTest, PathVariables)
 
 TEST_F (ParserTest, CanonicalizePaths)
 
 TEST_F (ParserTest, DuplicateEdgeWithMultipleOutputs)
 
 TEST_F (ParserTest, NoDeadPointerFromDuplicateEdge)
 
 TEST_F (ParserTest, DuplicateEdgeWithMultipleOutputsError)
 
 TEST_F (ParserTest, DuplicateEdgeInIncludedFile)
 
 TEST_F (ParserTest, PhonySelfReferenceIgnored)
 
 TEST_F (ParserTest, PhonySelfReferenceKept)
 
 TEST_F (ParserTest, ReservedWords)
 
 TEST_F (ParserTest, Errors)
 
 TEST_F (ParserTest, MissingInput)
 
 TEST_F (ParserTest, MultipleOutputs)
 
 TEST_F (ParserTest, MultipleOutputsWithDeps)
 
 TEST_F (ParserTest, SubNinja)
 
 TEST_F (ParserTest, MissingSubNinja)
 
 TEST_F (ParserTest, DuplicateRuleInDifferentSubninjas)
 
 TEST_F (ParserTest, DuplicateRuleInDifferentSubninjasWithInclude)
 
 TEST_F (ParserTest, Include)
 
 TEST_F (ParserTest, BrokenInclude)
 
 TEST_F (ParserTest, Implicit)
 
 TEST_F (ParserTest, OrderOnly)
 
 TEST_F (ParserTest, ImplicitOutput)
 
 TEST_F (ParserTest, ImplicitOutputEmpty)
 
 TEST_F (ParserTest, ImplicitOutputDupe)
 
 TEST_F (ParserTest, ImplicitOutputDupes)
 
 TEST_F (ParserTest, NoExplicitOutput)
 
 TEST_F (ParserTest, DefaultDefault)
 
 TEST_F (ParserTest, DefaultDefaultCycle)
 
 TEST_F (ParserTest, DefaultStatements)
 
 TEST_F (ParserTest, UTF8)
 
 TEST_F (ParserTest, CRLF)
 

Function Documentation

◆ TEST_F() [1/46]

TEST_F ( ParserTest  ,
Empty   
)

Definition at line 37 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, and AssertParse().

◆ TEST_F() [2/46]

TEST_F ( ParserTest  ,
Rules   
)

◆ TEST_F() [3/46]

TEST_F ( ParserTest  ,
RuleAttributes   
)

Definition at line 58 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, and AssertParse().

◆ TEST_F() [4/46]

TEST_F ( ParserTest  ,
IgnoreIndentedComments   
)

◆ TEST_F() [5/46]

TEST_F ( ParserTest  ,
IgnoreIndentedBlankLines   
)

Definition at line 92 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [6/46]

TEST_F ( ParserTest  ,
ResponseFiles   
)

◆ TEST_F() [7/46]

TEST_F ( ParserTest  ,
InNewline   
)

◆ TEST_F() [8/46]

TEST_F ( ParserTest  ,
Variables   
)

Definition at line 144 of file manifest_parser_test.cc.

References ASSERT_EQ, ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [9/46]

TEST_F ( ParserTest  ,
VariableScope   
)

Definition at line 169 of file manifest_parser_test.cc.

References ASSERT_EQ, ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [10/46]

TEST_F ( ParserTest  ,
Continuation   
)

◆ TEST_F() [11/46]

TEST_F ( ParserTest  ,
Backslash   
)

Definition at line 201 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [12/46]

TEST_F ( ParserTest  ,
Comment   
)

Definition at line 210 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [13/46]

TEST_F ( ParserTest  ,
Dollars   
)

Definition at line 217 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [14/46]

TEST_F ( ParserTest  ,
EscapeSpaces   
)

◆ TEST_F() [15/46]

TEST_F ( ParserTest  ,
CanonicalizeFile   
)

◆ TEST_F() [16/46]

TEST_F ( ParserTest  ,
PathVariables   
)

◆ TEST_F() [17/46]

TEST_F ( ParserTest  ,
CanonicalizePaths   
)

◆ TEST_F() [18/46]

TEST_F ( ParserTest  ,
DuplicateEdgeWithMultipleOutputs   
)

Definition at line 331 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, and AssertParse().

◆ TEST_F() [19/46]

TEST_F ( ParserTest  ,
NoDeadPointerFromDuplicateEdge   
)

Definition at line 343 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, and AssertParse().

◆ TEST_F() [20/46]

TEST_F ( ParserTest  ,
DuplicateEdgeWithMultipleOutputsError   
)

◆ TEST_F() [21/46]

TEST_F ( ParserTest  ,
DuplicateEdgeInIncludedFile   
)

◆ TEST_F() [22/46]

TEST_F ( ParserTest  ,
PhonySelfReferenceIgnored   
)

◆ TEST_F() [23/46]

TEST_F ( ParserTest  ,
PhonySelfReferenceKept   
)

◆ TEST_F() [24/46]

TEST_F ( ParserTest  ,
ReservedWords   
)

Definition at line 413 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, and AssertParse().

◆ TEST_F() [25/46]

TEST_F ( ParserTest  ,
Errors   
)

Definition at line 421 of file manifest_parser_test.cc.

References EXPECT_EQ, EXPECT_FALSE, and ManifestParser::ParseTest().

◆ TEST_F() [26/46]

TEST_F ( ParserTest  ,
MissingInput   
)

Definition at line 839 of file manifest_parser_test.cc.

References EXPECT_EQ, EXPECT_FALSE, and ManifestParser::Load().

◆ TEST_F() [27/46]

TEST_F ( ParserTest  ,
MultipleOutputs   
)

Definition at line 847 of file manifest_parser_test.cc.

References EXPECT_EQ, EXPECT_TRUE, and ManifestParser::ParseTest().

◆ TEST_F() [28/46]

TEST_F ( ParserTest  ,
MultipleOutputsWithDeps   
)

Definition at line 857 of file manifest_parser_test.cc.

References EXPECT_EQ, EXPECT_FALSE, and ManifestParser::ParseTest().

◆ TEST_F() [29/46]

TEST_F ( ParserTest  ,
SubNinja   
)

◆ TEST_F() [30/46]

TEST_F ( ParserTest  ,
MissingSubNinja   
)

Definition at line 893 of file manifest_parser_test.cc.

References EXPECT_EQ, EXPECT_FALSE, and ManifestParser::ParseTest().

◆ TEST_F() [31/46]

TEST_F ( ParserTest  ,
DuplicateRuleInDifferentSubninjas   
)

Definition at line 903 of file manifest_parser_test.cc.

References EXPECT_TRUE, and ManifestParser::ParseTest().

◆ TEST_F() [32/46]

TEST_F ( ParserTest  ,
DuplicateRuleInDifferentSubninjasWithInclude   
)

Definition at line 914 of file manifest_parser_test.cc.

References EXPECT_TRUE, and ManifestParser::ParseTest().

◆ TEST_F() [33/46]

TEST_F ( ParserTest  ,
Include   
)

Definition at line 927 of file manifest_parser_test.cc.

References ASSERT_EQ, ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [34/46]

TEST_F ( ParserTest  ,
BrokenInclude   
)

Definition at line 938 of file manifest_parser_test.cc.

References EXPECT_EQ, EXPECT_FALSE, and ManifestParser::ParseTest().

◆ TEST_F() [35/46]

TEST_F ( ParserTest  ,
Implicit   
)

◆ TEST_F() [36/46]

TEST_F ( ParserTest  ,
OrderOnly   
)

◆ TEST_F() [37/46]

TEST_F ( ParserTest  ,
ImplicitOutput   
)

◆ TEST_F() [38/46]

TEST_F ( ParserTest  ,
ImplicitOutputEmpty   
)

◆ TEST_F() [39/46]

TEST_F ( ParserTest  ,
ImplicitOutputDupe   
)

◆ TEST_F() [40/46]

TEST_F ( ParserTest  ,
ImplicitOutputDupes   
)

◆ TEST_F() [41/46]

TEST_F ( ParserTest  ,
NoExplicitOutput   
)

Definition at line 1014 of file manifest_parser_test.cc.

References EXPECT_TRUE, and ManifestParser::ParseTest().

◆ TEST_F() [42/46]

TEST_F ( ParserTest  ,
DefaultDefault   
)

Definition at line 1023 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [43/46]

TEST_F ( ParserTest  ,
DefaultDefaultCycle   
)

Definition at line 1036 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [44/46]

TEST_F ( ParserTest  ,
DefaultStatements   
)

Definition at line 1046 of file manifest_parser_test.cc.

References ASSERT_EQ, ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [45/46]

TEST_F ( ParserTest  ,
UTF8   
)

Definition at line 1066 of file manifest_parser_test.cc.

References ASSERT_NO_FATAL_FAILURE, and AssertParse().

◆ TEST_F() [46/46]

TEST_F ( ParserTest  ,
CRLF   
)

Definition at line 1073 of file manifest_parser_test.cc.

References EXPECT_TRUE, and ManifestParser::ParseTest().