KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KI_TEST::GIT_TEST_FIXTURE Class Reference

Give each test a backend and a temporary directory. More...

#include <git_test_fixture.h>

Inheritance diagram for KI_TEST::GIT_TEST_FIXTURE:
GIT_BACKEND_FIXTURE GIT_COMPARE_FIXTURE GIT_IGNORE_FIXTURE VCS_TEST_FIXTURE GIT_IGNORE_SUBDIR_FIXTURE

Public Member Functions

 GIT_TEST_FIXTURE ()
 
 ~GIT_TEST_FIXTURE ()
 Loading a project in a GUI app moves the working directory into it, so leave before the temp dir goes.
 
const wxString & TempPath () const
 
LIBGIT_BACKEND * Backend () const
 

Static Private Member Functions

static wxString toWxString (const std::filesystem::path &aPath)
 

Private Attributes

SCOPED_GIT_BACKEND m_backend
 
SCOPED_TEMP_DIR m_tempDir
 
SCOPED_TEMP_DIR m_configDir
 
SCOPED_GIT_CONFIG_SEARCH_PATH m_configSearchPath
 
wxString m_originalCwd
 
wxString m_tempPath
 

Detailed Description

Give each test a backend and a temporary directory.

Tests own their repository handles. Only repository config is read, so results do not depend on the user's global or system Git config.

Definition at line 85 of file git_test_fixture.h.

Constructor & Destructor Documentation

◆ GIT_TEST_FIXTURE()

KI_TEST::GIT_TEST_FIXTURE::GIT_TEST_FIXTURE ( )
inline

◆ ~GIT_TEST_FIXTURE()

KI_TEST::GIT_TEST_FIXTURE::~GIT_TEST_FIXTURE ( )
inline

Loading a project in a GUI app moves the working directory into it, so leave before the temp dir goes.

Definition at line 99 of file git_test_fixture.h.

References m_originalCwd.

Member Function Documentation

◆ Backend()

LIBGIT_BACKEND * KI_TEST::GIT_TEST_FIXTURE::Backend ( ) const
inline

Definition at line 102 of file git_test_fixture.h.

References m_backend.

◆ TempPath()

◆ toWxString()

static wxString KI_TEST::GIT_TEST_FIXTURE::toWxString ( const std::filesystem::path & aPath)
inlinestaticprivate

Definition at line 105 of file git_test_fixture.h.

Referenced by GIT_TEST_FIXTURE().

Member Data Documentation

◆ m_backend

SCOPED_GIT_BACKEND KI_TEST::GIT_TEST_FIXTURE::m_backend
private

Definition at line 115 of file git_test_fixture.h.

Referenced by Backend().

◆ m_configDir

SCOPED_TEMP_DIR KI_TEST::GIT_TEST_FIXTURE::m_configDir
private

Definition at line 117 of file git_test_fixture.h.

Referenced by GIT_TEST_FIXTURE().

◆ m_configSearchPath

SCOPED_GIT_CONFIG_SEARCH_PATH KI_TEST::GIT_TEST_FIXTURE::m_configSearchPath
private

Definition at line 118 of file git_test_fixture.h.

Referenced by GIT_TEST_FIXTURE().

◆ m_originalCwd

wxString KI_TEST::GIT_TEST_FIXTURE::m_originalCwd
private

Definition at line 119 of file git_test_fixture.h.

Referenced by GIT_TEST_FIXTURE(), and ~GIT_TEST_FIXTURE().

◆ m_tempDir

SCOPED_TEMP_DIR KI_TEST::GIT_TEST_FIXTURE::m_tempDir
private

Definition at line 116 of file git_test_fixture.h.

Referenced by GIT_TEST_FIXTURE().

◆ m_tempPath

wxString KI_TEST::GIT_TEST_FIXTURE::m_tempPath
private

Definition at line 120 of file git_test_fixture.h.

Referenced by GIT_TEST_FIXTURE(), and TempPath().


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