Ninja
PlanTest Struct Reference

Fixture for tests involving Plan. More...

Inheritance diagram for PlanTest:

Public Member Functions

void AddCatRule (State *state)
 Add a "cat" rule to state.
 
void FindWorkSorted (deque< Edge * > *ret, int count)
 Because FindWork does not return Edges in any sort of predictable order,.
 
NodeGetNode (const std::string &path)
 Short way to get a Node by its path from state_.
 
void PrepareForTarget (const char *node, BuildLog *log=NULL)
 
void TestPoolWithDepthOne (const char *test_case)
 

Public Attributes

Plan plan_
 
State state_
 

Detailed Description

Fixture for tests involving Plan.

Definition at line 39 of file build_test.cc.

Member Function Documentation

◆ AddCatRule()

void StateTestWithBuiltinRules::AddCatRule ( State * state)
inherited

Add a "cat" rule to state.

Used by some tests; it's otherwise done by the ctor to state_.

Definition at line 89 of file test.cc.

References AssertParse().

Referenced by BuildTest::RebuildTarget(), and StateTestWithBuiltinRules().

◆ FindWorkSorted()

void PlanTest::FindWorkSorted ( deque< Edge * > * ret,
int count )
inline

Because FindWork does not return Edges in any sort of predictable order,.

Definition at line 45 of file build_test.cc.

References CompareEdgesByOutput::cmp(), and plan_.

◆ GetNode()

Node * StateTestWithBuiltinRules::GetNode ( const std::string & path)
inherited

Short way to get a Node by its path from state_.

Definition at line 95 of file test.cc.

References state_.

Referenced by BuildTest::Dirty(), PlanTest::PrepareForTarget(), TestPhonyUseCase(), and PlanTest::TestPoolWithDepthOne().

◆ PrepareForTarget()

void PlanTest::PrepareForTarget ( const char * node,
BuildLog * log = NULL )
inline

Definition at line 56 of file build_test.cc.

References StateTestWithBuiltinRules::GetNode(), and plan_.

◆ TestPoolWithDepthOne()

void PlanTest::TestPoolWithDepthOne ( const char * test_case)

Member Data Documentation

◆ plan_

Plan PlanTest::plan_

Definition at line 40 of file build_test.cc.

Referenced by FindWorkSorted(), PrepareForTarget(), and TestPoolWithDepthOne().

◆ state_


The documentation for this struct was generated from the following file: