LkEngine 0.1.2
 
Loading...
Searching...
No Matches
LkEngine::LTestManager Class Reference

Public Types

using FTestCreator = std::function<std::shared_ptr<Test::LAutomationTest>()>
 

Public Member Functions

CORE_API bool RegisterAutomationTest (const std::string &TestName, Test::LAutomationTest *InTestInstance)
 
CORE_API bool UnregisterAutomationTest (const std::string &TestName, Test::LAutomationTest *InTestInstance)
 
CORE_API void RunTests (const Test::ETestSuite Suite=Test::ETestSuite::All) const
 
CORE_API bool StartTest (const std::string &TestName)
 
CORE_API bool StopTest (const std::string &TestName)
 
Test::LAutomationTestGetCurrentTest () const
 
FORCEINLINE CORE_API void SetCaptureStack (const bool Enabled)
 
void AddToSuite (const Test::ETestSuite Suite, FTestCreator CreatorFunc)
 
const std::vector< FTestCreator > & GetTests (const Test::ETestSuite Suite) const
 

Static Public Member Functions

static LTestManagerGet ()
 

Public Attributes

std::unordered_map< std::string, Test::LAutomationTest * > TestInstanceMap {}
 Test instances.
 
std::unordered_map< Test::ETestSuite, std::vector< FTestCreator > > TestCreatorMap
 

Member Typedef Documentation

◆ FTestCreator

using LkEngine::LTestManager::FTestCreator = std::function<std::shared_ptr<Test::LAutomationTest>()>

Function to create a test instance. Used in the test macros to register tests statically.

Member Function Documentation

◆ AddToSuite()

void LkEngine::LTestManager::AddToSuite ( const Test::ETestSuite Suite,
FTestCreator CreatorFunc )
inline

Add a test creator to a suite. The test creator function is what creates the test instance that is evaluated.

◆ GetCurrentTest()

Test::LAutomationTest * LkEngine::LTestManager::GetCurrentTest ( ) const
inline

Get the currently running test.

◆ RegisterAutomationTest()

bool LkEngine::LTestManager::RegisterAutomationTest ( const std::string & TestName,
Test::LAutomationTest * InTestInstance )

Register a test. Invoked in the LAutomationTestBase constructor.

◆ StartTest()

bool LkEngine::LTestManager::StartTest ( const std::string & TestName)

Start a test.

◆ StopTest()

bool LkEngine::LTestManager::StopTest ( const std::string & TestName)

Stop a test if it is running.

◆ UnregisterAutomationTest()

bool LkEngine::LTestManager::UnregisterAutomationTest ( const std::string & TestName,
Test::LAutomationTest * InTestInstance )

Unregister a test. Invoked in the LAutomationTestBase destructor.

Member Data Documentation

◆ TestCreatorMap

std::unordered_map<Test::ETestSuite, std::vector<FTestCreator> > LkEngine::LTestManager::TestCreatorMap

Test creator functions mapped to their corresponding test suites.


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