Ninja
Public Member Functions | Public Attributes | List of all members
PlanTest Struct Reference

Fixture for tests involving Plan. More...

Inheritance diagram for PlanTest:
Inheritance graph
[legend]

Public Member Functions

void AddCatRule (State *state)
 Add a "cat" rule to state. More...
 
void FindWorkSorted (deque< Edge * > *ret, int count)
 Because FindWork does not return Edges in any sort of predictable order,. More...
 
NodeGetNode (const std::string &path)
 Short way to get a Node by its path from state_. More...
 
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().

◆ 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(), Plan::FindWork(), and Plan::more_to_do().

◆ 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.

Referenced by TestPhonyUseCase().

◆ PrepareForTarget()

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

Definition at line 56 of file build_test.cc.

References Plan::AddTarget(), Plan::more_to_do(), and Plan::PrepareQueue().

◆ TestPoolWithDepthOne()

void PlanTest::TestPoolWithDepthOne ( const char *  test_case)

Definition at line 204 of file build_test.cc.

References AssertParse(), Edge::inputs_, Plan::kEdgeSucceeded, and Edge::outputs_.

Member Data Documentation

◆ plan_

Plan PlanTest::plan_

Definition at line 40 of file build_test.cc.

◆ state_

State StateTestWithBuiltinRules::state_
inherited

Definition at line 40 of file test.h.

Referenced by TestPhonyUseCase().


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