Ninja
StateTestWithBuiltinRules Struct Reference

A base test fixture that includes a State object with a builtin "cat" rule. More...

#include <test.h>

Inheritance diagram for StateTestWithBuiltinRules:

Public Member Functions

void AddCatRule (State *state)
 Add a "cat" rule to state.
 
NodeGetNode (const std::string &path)
 Short way to get a Node by its path from state_.
 
 StateTestWithBuiltinRules ()
 

Public Attributes

State state_
 

Detailed Description

A base test fixture that includes a State object with a builtin "cat" rule.

Definition at line 30 of file test.h.

Constructor & Destructor Documentation

◆ StateTestWithBuiltinRules()

StateTestWithBuiltinRules::StateTestWithBuiltinRules ( )

Definition at line 85 of file test.cc.

References AddCatRule(), and state_.

Member Function Documentation

◆ AddCatRule()

void StateTestWithBuiltinRules::AddCatRule ( State * state)

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().

◆ GetNode()

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

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().

Member Data Documentation

◆ state_


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