Ninja
graph_test.cc File Reference
#include "graph.h"
#include "build.h"
#include "command_collector.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, CommandCollector)
 
 TEST_F (GraphTest, CycleInEdgesButNotInNodes1)
 
 TEST_F (GraphTest, CycleInEdgesButNotInNodes2)
 
 TEST_F (GraphTest, CycleInEdgesButNotInNodes3)
 
 TEST_F (GraphTest, CycleInEdgesButNotInNodes4)
 
 TEST_F (GraphTest, CycleWithLengthOneFromDepfile)
 
 TEST_F (GraphTest, CycleWithLengthOneFromDepfileOneHopAway)
 
 TEST_F (GraphTest, CycleWithLengthZeroFromDepfile)
 
 TEST_F (GraphTest, DependencyCycle)
 
 TEST_F (GraphTest, DepfileOverride)
 
 TEST_F (GraphTest, DepfileOverrideParent)
 
 TEST_F (GraphTest, DepfileRemoved)
 
 TEST_F (GraphTest, DepfileWithCanonicalizablePath)
 
 TEST_F (GraphTest, DyndepFileCircular)
 
 TEST_F (GraphTest, DyndepFileError)
 
 TEST_F (GraphTest, DyndepFileMissing)
 
 TEST_F (GraphTest, DyndepFileNotClean)
 
 TEST_F (GraphTest, DyndepFileNotReady)
 
 TEST_F (GraphTest, DyndepFileReady)
 
 TEST_F (GraphTest, DyndepFileSecondNotReady)
 
 TEST_F (GraphTest, DyndepImplicitInputNewer)
 
 TEST_F (GraphTest, DyndepLoadExtraEntry)
 
 TEST_F (GraphTest, DyndepLoadImplicit)
 
 TEST_F (GraphTest, DyndepLoadMissingEntry)
 
 TEST_F (GraphTest, DyndepLoadMissingFile)
 
 TEST_F (GraphTest, DyndepLoadMultiple)
 
 TEST_F (GraphTest, DyndepLoadOutputWithMultipleRules1)
 
 TEST_F (GraphTest, DyndepLoadOutputWithMultipleRules2)
 
 TEST_F (GraphTest, DyndepLoadTrivial)
 
 TEST_F (GraphTest, EdgeQueuePriority)
 
 TEST_F (GraphTest, ExplicitImplicit)
 
 TEST_F (GraphTest, FunkyMakefilePath)
 
 TEST_F (GraphTest, ImplicitOutputMissing)
 
 TEST_F (GraphTest, ImplicitOutputOnlyMissing)
 
 TEST_F (GraphTest, ImplicitOutputOnlyOutOfDate)
 
 TEST_F (GraphTest, ImplicitOutputOnlyParse)
 
 TEST_F (GraphTest, ImplicitOutputOutOfDate)
 
 TEST_F (GraphTest, ImplicitOutputParse)
 
 TEST_F (GraphTest, InputsCollector)
 
 TEST_F (GraphTest, InputsCollectorWithEscapes)
 
 TEST_F (GraphTest, MissingImplicit)
 
 TEST_F (GraphTest, ModifiedImplicit)
 
 TEST_F (GraphTest, NestedPhonyPrintsDone)
 
 TEST_F (GraphTest, PathWithCurrentDirectory)
 
 TEST_F (GraphTest, PhonyDepsMtimes)
 
 TEST_F (GraphTest, PhonySelfReferenceError)
 
 TEST_F (GraphTest, RootNodes)
 
 TEST_F (GraphTest, RuleVariablesInScope)
 
 TEST_F (GraphTest, Validation)
 
 TEST_F (GraphTest, VarInOutPathEscaping)
 

Function Documentation

◆ TEST_F() [1/50]

◆ TEST_F() [2/50]

TEST_F ( GraphTest ,
CycleInEdgesButNotInNodes1  )

Definition at line 496 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [3/50]

TEST_F ( GraphTest ,
CycleInEdgesButNotInNodes2  )

Definition at line 504 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [4/50]

TEST_F ( GraphTest ,
CycleInEdgesButNotInNodes3  )

Definition at line 512 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [5/50]

TEST_F ( GraphTest ,
CycleInEdgesButNotInNodes4  )

Definition at line 521 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [6/50]

TEST_F ( GraphTest ,
CycleWithLengthOneFromDepfile  )

Definition at line 557 of file graph_test.cc.

References AssertParse(), and Edge::inputs_.

◆ TEST_F() [7/50]

TEST_F ( GraphTest ,
CycleWithLengthOneFromDepfileOneHopAway  )

Definition at line 583 of file graph_test.cc.

References AssertParse(), and Edge::inputs_.

◆ TEST_F() [8/50]

TEST_F ( GraphTest ,
CycleWithLengthZeroFromDepfile  )

Definition at line 535 of file graph_test.cc.

References AssertParse(), and Edge::inputs_.

◆ TEST_F() [9/50]

TEST_F ( GraphTest ,
DependencyCycle  )

Definition at line 484 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [10/50]

TEST_F ( GraphTest ,
DepfileOverride  )

Definition at line 431 of file graph_test.cc.

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

◆ TEST_F() [11/50]

TEST_F ( GraphTest ,
DepfileOverrideParent  )

Definition at line 443 of file graph_test.cc.

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

◆ TEST_F() [12/50]

TEST_F ( GraphTest ,
DepfileRemoved  )

Definition at line 395 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [13/50]

TEST_F ( GraphTest ,
DepfileWithCanonicalizablePath  )

Definition at line 377 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [14/50]

TEST_F ( GraphTest ,
DyndepFileCircular  )

◆ TEST_F() [15/50]

TEST_F ( GraphTest ,
DyndepFileError  )

Definition at line 856 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [16/50]

TEST_F ( GraphTest ,
DyndepFileMissing  )

Definition at line 843 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [17/50]

TEST_F ( GraphTest ,
DyndepFileNotClean  )

Definition at line 927 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [18/50]

TEST_F ( GraphTest ,
DyndepFileNotReady  )

Definition at line 952 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [19/50]

TEST_F ( GraphTest ,
DyndepFileReady  )

Definition at line 898 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [20/50]

TEST_F ( GraphTest ,
DyndepFileSecondNotReady  )

Definition at line 976 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [21/50]

TEST_F ( GraphTest ,
DyndepImplicitInputNewer  )

Definition at line 872 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [22/50]

TEST_F ( GraphTest ,
DyndepLoadExtraEntry  )

Definition at line 720 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [23/50]

TEST_F ( GraphTest ,
DyndepLoadImplicit  )

◆ TEST_F() [24/50]

TEST_F ( GraphTest ,
DyndepLoadMissingEntry  )

Definition at line 703 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [25/50]

TEST_F ( GraphTest ,
DyndepLoadMissingFile  )

Definition at line 689 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [26/50]

◆ TEST_F() [27/50]

TEST_F ( GraphTest ,
DyndepLoadOutputWithMultipleRules1  )

Definition at line 741 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [28/50]

TEST_F ( GraphTest ,
DyndepLoadOutputWithMultipleRules2  )

Definition at line 760 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [29/50]

TEST_F ( GraphTest ,
DyndepLoadTrivial  )

◆ TEST_F() [30/50]

TEST_F ( GraphTest ,
EdgeQueuePriority  )

Definition at line 1093 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [31/50]

TEST_F ( GraphTest ,
ExplicitImplicit  )

Definition at line 83 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [32/50]

TEST_F ( GraphTest ,
FunkyMakefilePath  )

Definition at line 62 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [33/50]

TEST_F ( GraphTest ,
ImplicitOutputMissing  )

Definition at line 119 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [34/50]

TEST_F ( GraphTest ,
ImplicitOutputOnlyMissing  )

Definition at line 160 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [35/50]

TEST_F ( GraphTest ,
ImplicitOutputOnlyOutOfDate  )

Definition at line 172 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [36/50]

TEST_F ( GraphTest ,
ImplicitOutputOnlyParse  )

Definition at line 149 of file graph_test.cc.

References AssertParse(), Edge::implicit_outs_, and Edge::outputs_.

◆ TEST_F() [37/50]

TEST_F ( GraphTest ,
ImplicitOutputOutOfDate  )

Definition at line 133 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [38/50]

TEST_F ( GraphTest ,
ImplicitOutputParse  )

Definition at line 107 of file graph_test.cc.

References AssertParse(), Edge::implicit_outs_, and Edge::outputs_.

◆ TEST_F() [39/50]

◆ TEST_F() [40/50]

TEST_F ( GraphTest ,
InputsCollectorWithEscapes  )

◆ TEST_F() [41/50]

TEST_F ( GraphTest ,
MissingImplicit  )

Definition at line 30 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [42/50]

TEST_F ( GraphTest ,
ModifiedImplicit  )

Definition at line 46 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [43/50]

TEST_F ( GraphTest ,
NestedPhonyPrintsDone  )

◆ TEST_F() [44/50]

TEST_F ( GraphTest ,
PathWithCurrentDirectory  )

Definition at line 186 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [45/50]

TEST_F ( GraphTest ,
PhonyDepsMtimes  )

Definition at line 1056 of file graph_test.cc.

References AssertParse(), Node::dirty(), Node::mtime(), and Node::Stat().

◆ TEST_F() [46/50]

TEST_F ( GraphTest ,
PhonySelfReferenceError  )

◆ TEST_F() [47/50]

TEST_F ( GraphTest ,
RootNodes  )

Definition at line 203 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [48/50]

TEST_F ( GraphTest ,
RuleVariablesInScope  )

Definition at line 420 of file graph_test.cc.

References AssertParse(), and Edge::EvaluateCommand().

◆ TEST_F() [49/50]

TEST_F ( GraphTest ,
Validation  )

Definition at line 1037 of file graph_test.cc.

References AssertParse().

◆ TEST_F() [50/50]

TEST_F ( GraphTest ,
VarInOutPathEscaping  )

Definition at line 362 of file graph_test.cc.

References AssertParse(), and Edge::EvaluateCommand().