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

Fixture for tests involving Plan. More...

Inheritance diagram for PlanTest:
Inheritance graph
[legend]

Public Member Functions

void AddAssertionFailure ()
 
void AddCatRule (State *state)
 Add a "cat" rule to state. More...
 
int AssertionFailures () const
 
bool Check (bool condition, const char *file, int line, const char *error)
 
bool Failed () const
 
void FindWorkSorted (deque< Edge * > *ret, int count)
 Because FindWork does not return Edges in any sort of predictable order,. More...
 
NodeGetNode (const string &path)
 Short way to get a Node by its path from state_. More...
 
virtual void Run ()=0
 
virtual void SetUp ()
 
virtual void TearDown ()
 
void TestPoolWithDepthOne (const char *test_case)
 

Public Attributes

Plan plan_
 
State state_
 

Detailed Description

Fixture for tests involving Plan.

Definition at line 27 of file build_test.cc.

Member Function Documentation

void testing::Test::AddAssertionFailure ( )
inlineinherited

Definition at line 41 of file test.h.

References testing::Test::assertion_failures_.

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 85 of file test.cc.

References AssertParse().

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

int testing::Test::AssertionFailures ( ) const
inlineinherited

Definition at line 40 of file test.h.

References testing::Test::assertion_failures_.

bool testing::Test::Check ( bool  condition,
const char *  file,
int  line,
const char *  error 
)
inherited

Definition at line 115 of file ninja_test.cc.

References testing::Test::failed_, and LinePrinter::PrintOnNewLine().

bool testing::Test::Failed ( ) const
inlineinherited

Definition at line 39 of file test.h.

References testing::Test::failed_.

Referenced by main().

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

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

Definition at line 33 of file build_test.cc.

References ASSERT_FALSE, ASSERT_TRUE, Plan::FindWork(), Plan::more_to_do(), Edge::outputs_, and plan_.

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

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

Definition at line 91 of file test.cc.

References EXPECT_FALSE, State::GetNode(), and StateTestWithBuiltinRules::state_.

Referenced by BuildTest::Dirty(), and TestPoolWithDepthOne().

virtual void testing::Test::Run ( )
pure virtualinherited

Referenced by main().

virtual void testing::Test::SetUp ( )
inlinevirtualinherited

Reimplemented in BuildWithDepsLogTest, BuildTest, and CleanTest.

Definition at line 35 of file test.h.

Referenced by main(), and BuildTest::SetUp().

virtual void testing::Test::TearDown ( )
inlinevirtualinherited

Reimplemented in BuildWithDepsLogTest.

Definition at line 36 of file test.h.

Referenced by main().

void PlanTest::TestPoolWithDepthOne ( const char *  test_case)

Member Data Documentation

Plan PlanTest::plan_

Definition at line 28 of file build_test.cc.

Referenced by FindWorkSorted(), and TestPoolWithDepthOne().

State StateTestWithBuiltinRules::state_
inherited

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