Ninja
test.h File Reference
#include <gtest/gtest.h>
#include "disk_interface.h"
#include "manifest_parser.h"
#include "state.h"
Include dependency graph for test.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  VirtualFileSystem::Entry
 An entry for a single in-memory file. More...
 
struct  ScopedFilePath
 A class that records a file path and ensures that it is removed on destruction. More...
 
struct  ScopedTempDir
 
struct  StateTestWithBuiltinRules
 A base test fixture that includes a State object with a builtin "cat" rule. More...
 
struct  VirtualFileSystem
 An implementation of DiskInterface that uses an in-memory representation of disk state. More...
 

Functions

void AssertHash (const char *expected, uint64_t actual)
 
void AssertParse (State *state, const char *input, ManifestParserOptions=ManifestParserOptions())
 
void VerifyGraph (const State &state)
 

Function Documentation

◆ AssertHash()

void AssertHash ( const char * expected,
uint64_t actual )

Definition at line 109 of file test.cc.

References BuildLog::LogEntry::HashCommand().

Referenced by TEST_F().

◆ AssertParse()

void AssertParse ( State * state,
const char * input,
ManifestParserOptions opts = ManifestParserOptions() )

Definition at line 100 of file test.cc.

References ManifestParser::ParseTest(), and VerifyGraph().

Referenced by StateTestWithBuiltinRules::AddCatRule(), BuildTest::RebuildTarget(), BuildTest::SetUp(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TestPhonyUseCase(), and PlanTest::TestPoolWithDepthOne().

◆ VerifyGraph()

void VerifyGraph ( const State & state)

Definition at line 113 of file test.cc.

References State::edges_, Node::in_edge(), Node::out_edges(), and State::paths_.

Referenced by AssertParse(), and ParserTest::AssertParse().