Ninja
Classes | Functions
graph_test.cc File Reference
#include "graph.h"
#include "build.h"
#include "test.h"
Include dependency graph for graph_test.cc:

Go to the source code of this file.

Classes

struct  GraphTest
 

Functions

 TEST_F (GraphTest, MissingImplicit)
 
 TEST_F (GraphTest, ModifiedImplicit)
 
 TEST_F (GraphTest, FunkyMakefilePath)
 
 TEST_F (GraphTest, ExplicitImplicit)
 
 TEST_F (GraphTest, ImplicitOutputParse)
 
 TEST_F (GraphTest, ImplicitOutputMissing)
 
 TEST_F (GraphTest, ImplicitOutputOutOfDate)
 
 TEST_F (GraphTest, ImplicitOutputOnlyParse)
 
 TEST_F (GraphTest, ImplicitOutputOnlyMissing)
 
 TEST_F (GraphTest, ImplicitOutputOnlyOutOfDate)
 
 TEST_F (GraphTest, PathWithCurrentDirectory)
 
 TEST_F (GraphTest, RootNodes)
 
 TEST_F (GraphTest, VarInOutPathEscaping)
 
 TEST_F (GraphTest, DepfileWithCanonicalizablePath)
 
 TEST_F (GraphTest, DepfileRemoved)
 
 TEST_F (GraphTest, RuleVariablesInScope)
 
 TEST_F (GraphTest, DepfileOverride)
 
 TEST_F (GraphTest, DepfileOverrideParent)
 
 TEST_F (GraphTest, NestedPhonyPrintsDone)
 
 TEST_F (GraphTest, PhonySelfReferenceError)
 
 TEST_F (GraphTest, DependencyCycle)
 
 TEST_F (GraphTest, CycleInEdgesButNotInNodes1)
 
 TEST_F (GraphTest, CycleInEdgesButNotInNodes2)
 
 TEST_F (GraphTest, CycleInEdgesButNotInNodes3)
 
 TEST_F (GraphTest, CycleInEdgesButNotInNodes4)
 
 TEST_F (GraphTest, CycleWithLengthZeroFromDepfile)
 
 TEST_F (GraphTest, CycleWithLengthOneFromDepfile)
 
 TEST_F (GraphTest, CycleWithLengthOneFromDepfileOneHopAway)
 

Function Documentation

◆ TEST_F() [1/28]

TEST_F ( GraphTest  ,
MissingImplicit   
)

Definition at line 27 of file graph_test.cc.

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

◆ TEST_F() [2/28]

TEST_F ( GraphTest  ,
ModifiedImplicit   
)

Definition at line 43 of file graph_test.cc.

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

◆ TEST_F() [3/28]

TEST_F ( GraphTest  ,
FunkyMakefilePath   
)

Definition at line 59 of file graph_test.cc.

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

◆ TEST_F() [4/28]

TEST_F ( GraphTest  ,
ExplicitImplicit   
)

Definition at line 80 of file graph_test.cc.

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

◆ TEST_F() [5/28]

TEST_F ( GraphTest  ,
ImplicitOutputParse   
)

◆ TEST_F() [6/28]

TEST_F ( GraphTest  ,
ImplicitOutputMissing   
)

Definition at line 116 of file graph_test.cc.

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

◆ TEST_F() [7/28]

TEST_F ( GraphTest  ,
ImplicitOutputOutOfDate   
)

Definition at line 130 of file graph_test.cc.

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

◆ TEST_F() [8/28]

TEST_F ( GraphTest  ,
ImplicitOutputOnlyParse   
)

◆ TEST_F() [9/28]

TEST_F ( GraphTest  ,
ImplicitOutputOnlyMissing   
)

Definition at line 157 of file graph_test.cc.

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

◆ TEST_F() [10/28]

TEST_F ( GraphTest  ,
ImplicitOutputOnlyOutOfDate   
)

Definition at line 169 of file graph_test.cc.

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

◆ TEST_F() [11/28]

TEST_F ( GraphTest  ,
PathWithCurrentDirectory   
)

Definition at line 183 of file graph_test.cc.

References ASSERT_EQ, ASSERT_NO_FATAL_FAILURE, AssertParse(), EXPECT_FALSE, and EXPECT_TRUE.

◆ TEST_F() [12/28]

TEST_F ( GraphTest  ,
RootNodes   
)

Definition at line 200 of file graph_test.cc.

References ASSERT_NO_FATAL_FAILURE, AssertParse(), and EXPECT_EQ.

◆ TEST_F() [13/28]

TEST_F ( GraphTest  ,
VarInOutPathEscaping   
)

◆ TEST_F() [14/28]

TEST_F ( GraphTest  ,
DepfileWithCanonicalizablePath   
)

Definition at line 231 of file graph_test.cc.

References ASSERT_EQ, ASSERT_NO_FATAL_FAILURE, AssertParse(), EXPECT_FALSE, and EXPECT_TRUE.

◆ TEST_F() [15/28]

TEST_F ( GraphTest  ,
DepfileRemoved   
)

Definition at line 249 of file graph_test.cc.

References ASSERT_EQ, ASSERT_NO_FATAL_FAILURE, AssertParse(), EXPECT_FALSE, and EXPECT_TRUE.

◆ TEST_F() [16/28]

TEST_F ( GraphTest  ,
RuleVariablesInScope   
)

◆ TEST_F() [17/28]

TEST_F ( GraphTest  ,
DepfileOverride   
)

Definition at line 285 of file graph_test.cc.

References ASSERT_NO_FATAL_FAILURE, AssertParse(), EXPECT_EQ, and Edge::GetBinding().

◆ TEST_F() [18/28]

TEST_F ( GraphTest  ,
DepfileOverrideParent   
)

Definition at line 297 of file graph_test.cc.

References ASSERT_NO_FATAL_FAILURE, AssertParse(), EXPECT_EQ, and Edge::GetBinding().

◆ TEST_F() [19/28]

TEST_F ( GraphTest  ,
NestedPhonyPrintsDone   
)

◆ TEST_F() [20/28]

TEST_F ( GraphTest  ,
PhonySelfReferenceError   
)

◆ TEST_F() [21/28]

TEST_F ( GraphTest  ,
DependencyCycle   
)

Definition at line 338 of file graph_test.cc.

References ASSERT_EQ, AssertParse(), and EXPECT_FALSE.

◆ TEST_F() [22/28]

TEST_F ( GraphTest  ,
CycleInEdgesButNotInNodes1   
)

Definition at line 350 of file graph_test.cc.

References ASSERT_EQ, AssertParse(), and EXPECT_FALSE.

◆ TEST_F() [23/28]

TEST_F ( GraphTest  ,
CycleInEdgesButNotInNodes2   
)

Definition at line 358 of file graph_test.cc.

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

◆ TEST_F() [24/28]

TEST_F ( GraphTest  ,
CycleInEdgesButNotInNodes3   
)

Definition at line 366 of file graph_test.cc.

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

◆ TEST_F() [25/28]

TEST_F ( GraphTest  ,
CycleInEdgesButNotInNodes4   
)

Definition at line 375 of file graph_test.cc.

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

◆ TEST_F() [26/28]

TEST_F ( GraphTest  ,
CycleWithLengthZeroFromDepfile   
)

Definition at line 389 of file graph_test.cc.

References ASSERT_EQ, AssertParse(), EXPECT_EQ, EXPECT_FALSE, and Edge::inputs_.

◆ TEST_F() [27/28]

TEST_F ( GraphTest  ,
CycleWithLengthOneFromDepfile   
)

Definition at line 411 of file graph_test.cc.

References ASSERT_EQ, AssertParse(), EXPECT_EQ, EXPECT_FALSE, and Edge::inputs_.

◆ TEST_F() [28/28]

TEST_F ( GraphTest  ,
CycleWithLengthOneFromDepfileOneHopAway   
)

Definition at line 437 of file graph_test.cc.

References ASSERT_EQ, AssertParse(), EXPECT_EQ, EXPECT_FALSE, and Edge::inputs_.